PDA

Click to See Complete Forum and Search --> : HELP, No way to OPEN saved file


AyS
Nov 26th, 1999, 04:55 AM
Hi,

Let's see if I'm correct on this first.
so you have a file that has 77 lines?
each line contains button?.something,button?.something, andonand on..
and you can get all that info into a file?


hope you are familiar with following commands:

open
line input
instr

I haven't tested this thingy but try it out.. let me know if it works (ays@altavista.net)


Dim tooltiptext(1 To 77), tag(1 To 77), caption(1 To 77) As String, value(1 To 77) As whateverneed

Private Sub load_infos()
Dim filename As String
Dim currentline As Integer
currentline = 1

Open filename For Input As #1 'Open file
Do While Not (EOF(1)) 'Loop to the end of the file
Line Input #1, intemp 'Read one line from the file to the variable intemp

tag(currentline) = Left(intemp, InStr(intemp, ",")) 'Extract tag from the line
temp = Right(intemp, Len(intemp) - InStr(intemp, ","))

caption(currentline) = Left(intemp, InStr(intemp, ",")) 'Extract caption from the line
temp = Right(intemp, Len(intemp) - InStr(intemp, ","))

value(currentline) = Left(intemp, InStr(intemp, ",")) 'Extract value from the line, I don't know what you are using but I haven't seen this..
temp = Right(intemp, Len(intemp) - InStr(intemp, ","))

tooltiptext(currentline) = Left(intemp, Len(intemp)) 'Extract tooltiptext from the line

currentline = currentline + 1
Loop ' end loop
Close #1 'close file
End Sub


That is just an example, I don't promise that it works or anything (should). After that you have to program how to put the information on the arrays into the buttons.



------------------
-Matti Kiviranta
AyS of AyS Systems
(PGP protected ;)

progeix
Nov 26th, 1999, 11:31 AM
hey
it lets me SAVE a file correctly but i can't find a way to open it into the specific Option buttons
the Below where i say how it has been saved, that is one line for Each Button and i have 77 buttons, so i need a way to get the data from the file to the button

Thanks

the File info has been saved as the following:

Button1.tag,Button11.caption,Button11.value, Button11.tooltiptext

then the button2.tag, Ect

And i don't understand The Vb5 Examples

[This message has been edited by progeix (edited 11-26-1999).]