Hey All,
Well I can't figure this out...
I have my program reading some info from an ini file on startup. If you
manually start it...it reads the info just fine. But, if you have the program,
auto start with windows, it will not read the ini file at all! Here's the code
I'm using...
VB Code:
Private Const NUMOFTXTBOXES = 7 Public Function LoadINIFile() Dim strArray(0 To NUMOFTXTBOXES - 1) As String Dim i As Long Dim FileHandle% Dim strFileName As String Dim SourceFile As String If Right$(App.path, 1) = "\" Then SourceFile = App.path Else SourceFile = App.path & "\" End If strFileName = SourceFile & "myfile.ini" FileHandle% = FreeFile i = 0 Open strFileName For Input As #FileHandle% Do While Not EOF(FileHandle%) Line Input #FileHandle%, strArray(i) i = i + 1 Loop Label1.Caption = strArray(0) Label2.Caption = strArray(1) Label3.Caption = strArray(2) Label4.Caption = strArray(3) Label5.Caption = strArray(4) Label6.Caption = strArray(5) Label7.Caption = strArray(6) Close FileHandle% DoEvents End Function
Any Ideas?
Thanks in advance,
Ron




Reply With Quote