|
-
Nov 26th, 1999, 04:31 AM
#1
Thread Starter
Hyperactive Member
any one know how to open a file that has Command button settings?
I have 77 buttons and need to save their settings.
I have saved the settings as following:
Write #1,But.tag,but.caption,but.value, but.tooltiptext
Thats all one line
but i have 77 lines, one for each button.
Have tried but the VB Examples do not help with what i am going.
need a button that will open a file, and put the Tag,Caption,Value,Tooltiptext into the buttons
thank you
-
Nov 26th, 1999, 03:12 PM
#2
Lively Member
create a control array for the buttons (But(o), But(1), But(2), ..., But(76)) this will give you 77 total buttons.
then create a different button (not in that array) called cmdWriteToFile, or whatever you want it to be called, and use the following code: (actually, i guess you could use any control as the catalyst for the operation)
Code:
Private Sub cmdWriteToFile_Click()
Dim i As Integer
Dim c As Integer
c = But.Count
For i = 0 To c - 1
Write #1,_
But(i).tag,_
But(i).caption,_
But(i).value,_
But(i).tooltiptext
Next i
End Sub
do pretty much the same thing to read from the file and PUT the values in (on) the buttons. any more help, e-mail me at [email protected]
good luck and happy programming
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|