Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




All Things In Form Text Boxes List Boxes...Saving


Is the a command thats save every thing that is changed changed in form ...all text boxes all list boxes ...everything that has changed




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Saving Text For List/combo Boxes
I'm still having trouble with something, i need to save simple words to a file, not a type or nethin like that, just a list of words

how do i do that...also its for later use to load the words into a combo or list, how would i make it so that was possible?

im stuck! ¬_¬

Xtrava

Web Control, List Boxes, Text Boxes, Please Help This Is Winding Me Up!
Hi guys i need some help with the webcontrol function in VB6

Part of my program needs to put listbox data from the program into a text box on the web and then click a submit button...

The list box i have has a list of multiple directories in (for the location of my files), from there i just want the program to put the top directory of the list box into a text box on the web and click a submit button on the web (its for uploading a queue of files), then after that has finished uploading, do the next directory in the list box... etc

It sounds pretty simple but i have no idea how to do it...

Thanks for any help you can give me, i will write a really good review about you and good rating etc.

Any knowledge of this would be greatly appreciated

thanks a bunch

toodle pipples

Alex

Combo And List Boxes To Text Boxes?
Connecting sub-menus to rich text boxes is fine is most cases but the user does not always want to use menus to load and display text. Applying the same technique as sub menus to text boxes with combo or list boxes just wont work could someone please help me out with this one.

Both combo and list boxes will for example:

Contain an alphabetic list.
When the user clicks on a file it should locate the text file from the drive.
It should then open it into a rich text box on the same form.

Could this be possible?

Please any help will greatly be appreciated.

List Boxes And Text Boxes
Ok i have a list box that has a list of movies to choose from then you choose how many tickets you want i want to know how to display them in a text box and how to clear the dat file that i saved it in

List Boxes And Text Boxes
I have a list box with a bunch of items in it. I'm trying to make it so that when you click on an item in a list, the text appears in a text box. I don't know too much.. but what I have so far is

Private Sub List1_Click()
Dim i As Integer
Text1.Text = List1.List(i)
End Sub

What this does is when I click an item, it makes the text of the textbox the first item in the list. How do I change it so that I can pick an item from the list and have the text of that item displayed in the text box? Thanks in advance!

List Boxes = Text Boxes
Hi I'm new here (and to VB). I'm using VB in Excel and trying to get a list box to write to a series of three text boxes. I have a mobile phone user form and the list box has a selection of phones in it. I want the user to be able to choose three phones from the same list box and have the results display - one in each box. Can I do this and, if so, how?

Combo Boxes...saving List
Ok, I have this combobox where the user can type in a name and add and delete the name from this combobox. Well when the program is shutdown it resets the list. How could I save the list? I thuoght about registry but that would work would it? How would the program know what reg entries to open when the program was loaded? Anyone know how I could do this?

Saving List Boxes 1problem <ReS0lvEd>
VB Code:
Click_CmdSave ()Dim List as Stringopen "C:Example.txt" for append as #1list=LstName.listcount 'This is where i Get the IssuePrint #1, listclose #1end sub


Problem #1 :When i CLick CmdSave, Nothing happens, which is good (means no Errors), But when i open the txt File : the number 1 apears, but if i Put ( list=lstname.listindex) it puts a -1 there, i want it to display the actual Word(s) that are in the listbox. How would i do so?

Theorys On Saving Settings AND List Boxes
right, here is what i have...

a list box...

what would be a good way of saving the things contained in this box, so that i can load up the file it saved to, and have everything there again??

and is it possible to click on something in a list box and modyfy it... eg...

___________________
|----------ListBox----------|
|<http>craigh</http>---|
|__________________|

there is my listbox with one list item... if i click on that item, in another box i want

<http>craigh</http>

to appear, ready for modyfying, anyone know how?

thanks in advance

Jaffer

Add Text To Text Boxes Like List Boxes
ill explain this the best i can i want the user to type in some text then click "Add" and the text will be added to a textbox i know you can do this alot easyier with list boxes with the .AddItem but how would i do it so far if got this


VB Code:
Text1.Text = "" & Text2.Text


But as you notice it just overwrites the text allready in the box and doesnt ass it

Saving Text Boxes As Htm Files?? Please Help.
I have this prog that makes websites ans stuff but at the mo i have to copy the final code into notepad and save as an htm/html file. I am trying to just save the contents of that box as a web file, Is this possible?

I have this so far:::::

cm_dialog1 is my common dialog box

Private Sub Command4_Click()
cm_dialog1.Filter = "*.htm"
cm_dialog1.ShowSave
fNumber = FreeFile
Open cm_dialog1.FileName For Output As #fNumber
Print #fNumber, StringValue
Close #fNumber
End Sub

Thanks
Steve-o

Saving Information In Text Boxes.
I have many text boxes on a form that I would like to save the informaton from. The idea is that I then can load those text boxes back up with the same information later. Is there an easy way to save all the text boxes without writing code for each individual one?

Thanks,

Dylan

Saving Txt In Rich Text Boxes
How do you save plain text in a rich text box?

Saving Multiple Text Boxes To A File
A few weeks ago i posted this question and PWNettle posted the following:

To save (at Form_Unload perhaps):
Dim lngFile As Long

lngFile = FreeFile

Open App.Path & "data.txt" For Input As #lngFile

Print #lngFile, Text1.Text
Print #lngFile, Text2.Text
Print #lngFile, Text3.Text
' Etc, as needed.

Close #lngFile

To read (at Form_Load perhaps):
Dim lngFile As Long
Dim strLine As String

lngFile = FreeFile

Open App.Path & "data.txt" For Input As #lngFile

Line Input #lngFile, strLine
Text1.Text = strLine
Line Input #lngFile, strLine
Text2.Text = strLine
Line Input #lngFile, strLine
Text3.Text = strLine
' Etc, as needed.

Close #lngFile

i'm not sure i'm interpretting the:

Open App.Path & "data.txt" For Input As #lngFile

right, as whatever i do results in an error. Can anyone give me a suggestion for the: Open App.Path & "data.txt" as an example?

This would be much appreciated!

Mat

Saving And Opening From Multiple Text Boxes
how can i save the data from multiple text boxes into a single file, which can then be opened and the data returned to the appropriate text boxes? cheers for any help!

Newbie-Opening And Saving Text Files In Text Boxes
I'm trying to find a way to save text from a text box as a .txt file or .rtf and then be able to retrieve files of similar type and open them in a text box on my program. There must be a way to do this, I'm just not able to figure it out. Help?

Altering The Form Of Message Boxes And Query Boxes.
I have used the standard message box (msgbox) and query box in one of my programs which will be distributed. However, the boxes look awful! How do I change their properties, such as font, text size, picture (to the left of the box), button picture, button size etc...

Hope someone can help me out!

Many thanks,

Steve.

Saving Mutilple Text Boxes To A Single File!!!
help i need help saving data from 11 text boxes to a single file! can anyone help me please!

How To Get My List In Several Text Boxes
in my project i get my list in a list box
bt i want to get my list in different textbox

heres the code

Dim roomString As String
Dim roomData As String
Dim roomDataHex As String
roomData = Left(strData, 3)
roomDataHex = HextoAscii("02 02 C4")
If roomData = roomDataHex Then Text1.Text = strData

Dim dataUser As String
Dim rstring() As String
Dim a As Integer

If Len(Text1) > 27 Then
dataUser = Mid(Text1, 16, Len(Text1) - (Len(Room.Text) + 21))
rstring = Split(dataUser, ";")

Dim values As Variant

List1.Clear
values = rstring
For a = LBound(values) To UBound(values)
List1.AddItem values(a)
Next a
End If

please help me..

Text &amp; List Boxes
Hey there everyone, by viewing the image below you can see a screen of the GUI of my application, basically im making a little something to make my life a bit easier.. I would like the text from text boxes 1, 2 and 3 to be listed in the listbox when a command button is clicked, however i dont want the text to appear in the list box like Text1Text2Text3 as i would prefer the words to be divided by spaces or a symbol.. Refer to the image for more in-depth information. Help is more than appreciated.

Text And List Boxes
Howdy All

My question is how do you scroll down a text box in code? and how to you highlight an item in a listbox and then scroll down to the next one and highlight that so you can sort of check a listboxes content line by line.

thanx

------------------
Mooose

Can You Have Multiple Colours In Text Boxes, Or Richtext Boxes(etc)?
Is there anyway you can have each word in a text box a different colour? Like:

[RED] My Name [/RED]
[BLUE] What's up! [/BLUE]

or something similar?

I don't care if you can't do it in a text box but is there anyway to do it in any type of "text box"?

If sub classing is involved could you please point me to a tutorial?


Thanks a lot.

Saving Text Of Mulitple Text Boxes To Txt File
I have a form with multiple text boxes that need to be filled out. I want the content of each of the text boxes to save into one text file on the local pc.

How would I do this.

Combo Boxes Or List Boxes?????
A bit of a beginners question. Hope it makes sense

I dont know which is the best to use. Here is the problem:

I want some kind of drop down list that allows the user to pick one of 12 items. Then that item is linked to a set of numbers. For e.g. if user chooses the item "A" then this means the numbers 0.025689 and 0.85696 is linked to each. Now do i use a combo or a list item or something else.

In addition what kind of code do you use to enter new items in a combo box or list item box. I tried to use:

ComboBox1.AddItem "A"
ComboBox1.AddItem "B"

within the combo box private sub - but when i play it back the combo box is empty. Any ideas???

Thanks

List Boxes Vs Check Boxes
How much harder are List boxes to program compared to Check boxes?

DataList Boxes Vs. List Boxes
OK - I currently have a DataList box which displays all of my records using the "List Field" Property. I need to enable a multiselect feature though. So I decided to use the REGULAR List Box, since it has a multiselect property. Yet, I cant seem to get the list box to have all of the records in there (or any of them for that matter). Is there a similar property in regular list boxes like the "List Field" Property, or is there a similar property in DataList Boxes which can enable multiselect?

Someone help!

Form Location And List Boxes
Hey people, hate to sound like an idiot but i'm a VB newb! Anyhow, I have a form of a set size which I would like to position on the right side of the screen. Which property can I use to set the startup position of the form, or is there any code where I can set its coordinates without resizing it?

Also, I have a list box containing all the windows default fonts. I want the user to be able to click on the font, then click on a command button I have to select it. How do I manipulate the individual items in a list box? Thanks in advance for answers to both questions!

Text Files &amp; List Boxes
i know someone will probably laugh and solve this with 3 lines of code, but i have to ask because it's bugging me.

I have a listbox which i want to use as a favourites section. I also have a text file which contains ip addresses, each one on a new line. I have the script to write to the file to add new "favourites" however i need a piece of code to read each line of the text file, then show each one in the list box.

i have all the rest sorted (the double click script to load the game etc, the favourites are for counterstrike btw) but i just need this code to read the file and create the list

thanks in advance

{EDIT}

found the code i needed guys, thanks to anyone who looked anyway

Text Bolding And List Boxes
Hello again all. I have a very interesting question. Is it possible to bold or change font colors for text segments in a listbox? (i.e. Listbox1 has the following item in it:
11/19 - Test Data) I would either like to bold or change the font color of the date only. Is that possible? Thanx

List Boxes .Text Property
I was planning on changing the text in listboxes using:

ListBox.Text = "new text"

...but yeah that didn't work.

Is possible to change the text of an item in the listbox once it has been added or change their indexes without rebuilding the listbox?

List Boxes &amp; Text Files
I am making an MP3 player and am storing the playlist in a txt file.
When the app loads I need it to go through the file and add an entry into List1 when it reaches a line break, so the list box contains what the the txt file contains, with a new entry for each line.

Any one know how?

List Boxes Text Formatting
Thanks Mathew for your help on previous query!

If I'm transferring items from list to list, as in a questionnaire, and say listbox2 has category "Height", when you click on that listbox 3 allows selecting say "tall" and list box4 is where the final selections are listed. How can I have the text "Height:" waiting or appearing in listbox4 so that when the user selects tall it appears in listbox 4 as Height: Tall, and so on for weight, age etc...

Detecting Same Text In List Boxes
i have this problem: i made a chat program (like IRC) and its supposed to show everyone's names (whoever is online) in a listbox called lstName. and i'm wondering how i could detect if a name has been added to the list that already exists, it would be automaticaly deleted. this problem has been driving me insane!

Aligning Text In List Boxes
Just a quickie, how can i centre the text in my list boxes? does it need coding or is there an option somewhere?

cheers, pk



Edited by - kilgour on 3/9/2004 3:36:48 PM

Removing Items Form List Boxes!
i have got a listbox having items>

a
a
a
b
b
n
b
a
a
a

when i click a button i want all the items "a" to be removed form the listbox! so that it will look like this>

b
b
n
b

with all the "a" removed!

HOW ADD CHECK BOXES AND TEXT BOXES IN FLEXGRID
Hi,

i use flexgrid for data entry. i want to add text boxes in column and check boxes in another column. how to add this .

help me.
thanks in advance
bye.

Reading From An XML Into Various Text Boxes And A Combo List
HI, I've done lots of searching in the forum and others trying to find a solution to my problem but I can't seem to grasp the logic or find a suitable example. Just wondered if someone could help.

My program loads and is passed an xml file automatically, the structure is something like this

<customer>
<dob>08/08/1990</dob>
<sex>Female</sex>
<forename>Sally</forename>
<surname>SMITH</surname>
<custom_id>12345</custom_id>
<address>
<housename>The Cottage</housename>
<housenumber>20</housenumber>
<roadname>Harrow Road</roadname>
<locality>coleswood</locality>
<county>W yorkshire</county>
<postcode>LT12 3NQ</postcode>
</address>
<books><book><isdn>1234</isdn><author>D. SMITH</author><issuedate>21.11.2006</issuedate></book><book><isdn>3456></isdn><author>E. JONES</author><issuedate>17.10.2006</issuedate></book></books>

etc

My problem is how do I assign each entry to a text box, i.e. txtDOB.Text=08/08/1990
txtForename.Text=Sally
etc
and also when it gets to the <books> section I want to be able to put each entry into a list, this one can be variable, it could have one or two books or as many as a hundred.

I would appreciate an example as the ones I've seen don't really cover what I want to do, or more likely I'm missing what I'm supposed to be doing.

Greatly appreciate any help / advice, many thanks

Adding Multiple Text Boxes To A List
im lost with this..
basically what i have is 4 text boxes that im trying to add to a list depending on if they have text in them or not..


Code:
If Text1.text = "" Or Text2.text = "" Then
MsgBox ("you must provide a question/answer!")
Exit Sub
ElseIf Len(Text1.text & Text2.text & Text3.text & Text4.text) > 0 Then
List1.AddItem (Text1.text) & ":" & (Text2.text) & ":" & (Text3.text) & ":" & (Text4.text)
ElseIf Text3.text = "" Then
List1.AddItem (Text1.text) & ":" & (Text2.text) & ":" & (Text4.text)
ElseIf Text3.text = "" And Text4.text = "" Then
List1.AddItem (Text1.text) & ":" & (Text2.text)
End If
so what its saying is first, if all the text boxes have data, add them all. that works fine
the next lines are, if theres no text in the text3, then just add 1,2, and 4 etc..
the problem with this is, if theres not text in text3, it still adds the ":"
what i get is this in my list
cow:dog::cat
the problem is the same with all the other if's. im sure this is confusing.. cuz im confused writting it, but it was worth a shot

Split Text- Then Place Into Two List Boxes
Hi,
I am looking for an answer on the following:

I have in List Box(lstTrolley) for example "pears $0.50". I would like to place(by clicking once) "pears" into List Box(lstProduct) and "$0.50" into List Box(lstPrice).

Thanks a million for your help
Andonny

Problems Clearing Text And List Boxes
I had to make a code for a form. I included a CLEAR button to clear everything in the form. But for some reason I am getting an error. Its the "invalid procedure call or arguement". it highlights a line of code that i used to seperate the first and last names that were loaded into a listbox from a text file. this is the line of code that is highlighted. let me know if you all need a different part of my code.


Code:
'show first name
strTemp = lstEmployees.Text
intSpacePos = InStr(1, strTemp, " ")
strFirstName = Left(strTemp, intSpacePos - 1)


Anyone have any ideas?

List Boxes: Text On Left, Numbers On Right, But On Same Row
I have a list box with strings and numbers, i want to know if its possible to have the string part alligned on the left and the numbers on the right side of the list box. I used:

list.AddItem "string: " & variableamount

i used a TAB space after the : to try to set all the numbers, but they are always a few spaces off. But if i can put the numbers against the right side of the box, it will look better anyway. Well thanks.
Red

Chaning Text Attributes In List Boxes
Is there a way to change the colour and style of text in a lost box indipendantly from the other items in the box? So you could have....

ITEM 1
ITEM 2
ITEM 3
ITEM 4

... ?

Grabbing Text, Scrolling Down List Boxes
Hi,

I want code or help with a few things, Firstly.

Whats the API to click a button a specific window(I have the windows handle, and i want to click a button on that window, its a text button if that makes a difference).

Next i want to scroll through a list box and then grab text from the text box below it. I can grab the text from the text box but i'm having trouble coding API to scroll through (down) a list box.

Thanks.

[02/03] List Box Selection Not Populating Text Boxes
I have a customer form that has several text boxes and a list box. When the user fills out the customer information and clicks the save button the customer name gets added to the list box. So if there are 3 customer names in the list box and the user selects the first line, the last line added shows up. I have my text boxes saved to a class and then pulling from an array when selecting from the list box. Can anyone look at some of my code to see if my logic is wrong?

'Global Variable - customerclass is the class name
Dim CustArray(5) As CustomerClass

'Save button - saves to class then adds to the list box
Customer.CustID = Integer.Parse(txtCustNum.text)
Customer.LName = txtLastName.text
Customer.FName = txtFirstName.text
Customer.CustStreet = txtStreet.text

lstCustomer.Items.Add(Customer.FName & " " & Customer.LName)
CustArray(lstCustomer.Items.Count) = Customer

'CustFields Procedure to populate the txtbxs when item in list box is selected
txtCustNum.Text = Customer.CustID
txtLastName.Text = Customer.LName
txtFirstName.Text = Customer.FName
txtStreet.Text = Customer.CustStreet

'Find button
If lstCustomer.SelectedIndex = -1 Then
MessageBox.Show("Blah, Blah, Blah") Exit Sub
End If
Customer = CustArray(lstCustomer.SelectedIndex)
CustFields()

Filtering A Text File To List Boxes
Hey,
i need some help with a VB project,

2 list boxes and a text file with all of the peoples names in them, they also have small codes next to them for example, 12Y7 and 43G2

i need to filter the text file so it puts all the codes with Y into one list and the ones with G into the other, with the names they are saved with


i'm not sure if that makes much sence

thanks

Populate Text Boxes From List Box - RESOLVED
Hi all,

I have a list box which displays information from an Access DB. I want to be able to click on an item in the list box and have information corresponding to my choice pulled from the DB and displayed in the text boxes.

Really haev no clue how to do this and any help would be greatly appreciated!

Heres code for my list box:


VB Code:
Private Sub cmdSearchNow_Click()Srch = txtSearchgcomDentware.CommandText = "SELECT Patient_ID, Surname, First_Name, Address FROM tblPatient_Details WHERE Surname like '" & Srch & "%' ORDER BY Surname ASC"Set grsDentware = gcomDentware.Execute If (Not grsDentware.EOF) Then    'If there are drug names in the table then call fill list box in module code      'lblID.Caption = grsDentware!Patient_ID      Call Fill_ListBox(lstNames, "FNameSurnameAdd")      txtSearch = ""   Else      MsgBox "There are no clients in the DB with that name", vbExclamation    'If the specified field is blank then show this message   End If   grsDentware.Close End Sub  Public Sub Fill_ListBox(ListBox As ListBox, Field As String)If (Field = "FNameSurnameAdd") Then         FNameSurname = grsDentware!First_Name & " " & grsDentware!Surname & " - " & grsDentware!Address         ListBox.AddItem FNameSurnameEnd Sub

Disabling HTML In Text/list Boxes
Is there a way to hide HTML code in a list box? Look at the pic.

I dont want the html to be there, just the message.

List Boxes And Filtering Using Text Box Criteria
Hope someone out there can help me. I have a database and have created a form that has a List box that is populated by 4 columns from a database table. I used the wizard to do this. There approximately 250 records.

What I’d like to do is have a Search Button on the form and a Text Box that the user can enter search criteria into.

The idea being that the Search Button is pressed and the records are filtered using the search criteria.

The user should then click on a result to open up further detail in another form (that bit I’ve achieved).

I have been completely unsuccessful in achieving the search.

Form = FrmSearch
List = lstBox
Command Button = cmdSearch
Text Box = txtSearch

Be grateful for any tips or code anyone can suggest.

Linking List Box To Text Boxes With ADO Controls
We are struggling with data list boxes. We are trying to have the data in selected text boxes change to the current record source when a particular item is selected from a list box.

We are using the Biblio Database that comes the VB6 to prove it out. We have created a ADO connection and have the Titles as a list box and when we select a particular title we are trying to have 3 text boxes, (ISBN, Comments, Year Publilshed) update to the data associated with the selected title in the list box.

Any help would be greatly appreciated

Sean Gearin
sgearin@modicon.com
978 975-9348

Thanks in advance

Copyright © 2005-08 www.BigResource.com, All rights reserved