Jason_Kha
asked on
Save context of listbox
How do I save the context of my listbox so that when i open my document. All my items will still be there.
When you say context, do you mean the contents of what is in the list box saved to a document so that you can read from a file to load the contents of the listbox back into the listbox when you re open the application or something like that ? Or are you referring to something else ?
Hi Jason_Kha,
You can use the Index property of the listbox to go through the items and add them to a file.
Bye
---
Harish
You can use the Index property of the listbox to go through the items and add them to a file.
Bye
---
Harish
ASKER
gecko au2003 Yeah thats what I meant I don't know what I was thinking typing "context".
Here is one PAQ with regards to writing a text file :
https://www.experts-exchange.com/questions/21147755/Writing-to-text-files.html
Here is a good website to take you through using the FSO ( File System Object ).
The File System Object (FSO) enables you to manipulate the files, folders and drives as well as read and write to sequential files. Before using the FSO, you have to add the "Microsoft Scripting Runtime Library" to the current project by selecting "Project", "References" from the menu bar. Alternatively you can use the CreateObject function to create the reference at run-time.
If you would like I could paste the code in here in a little while and show you were all the code goes or you can try and use them sites to figure it out yourself :) Upto you ;)
https://www.experts-exchange.com/questions/21147755/Writing-to-text-files.html
Here is a good website to take you through using the FSO ( File System Object ).
The File System Object (FSO) enables you to manipulate the files, folders and drives as well as read and write to sequential files. Before using the FSO, you have to add the "Microsoft Scripting Runtime Library" to the current project by selecting "Project", "References" from the menu bar. Alternatively you can use the CreateObject function to create the reference at run-time.
If you would like I could paste the code in here in a little while and show you were all the code goes or you can try and use them sites to figure it out yourself :) Upto you ;)
Here is a PAQ of one of my questions and I think glass cookie has an answer for you :)
https://www.experts-exchange.com/questions/21101842/Write-all-song-titles-to-a-text-file.html
https://www.experts-exchange.com/questions/21101842/Write-all-song-titles-to-a-text-file.html
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.