M
Mike Johnson
Line 7 below produces the error Object reguired. Does anyone know why? Please
help. thanks.
Private Sub Form_Activate()
Dim strPath As String
Dim fs, f
Dim Def(2) As String
strPath = Me.Application.CurrentProject.Path
strPath = strPath + "\" + Config.txt ' this line gives the error.
Me.Visible = False
'Get Default values from Setup text file. Config.txt
Const ForReading = 1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(strPath, ForReading, TristateFalse)
Def(1) = f.Readline
Def(2) = f.Readline
f.Close
Def_Dis = """" & Def(1) & """"
Def_CC = Def(2)
DoCmd.OpenForm "Switchboard", acNormal
End Sub
help. thanks.
Private Sub Form_Activate()
Dim strPath As String
Dim fs, f
Dim Def(2) As String
strPath = Me.Application.CurrentProject.Path
strPath = strPath + "\" + Config.txt ' this line gives the error.
Me.Visible = False
'Get Default values from Setup text file. Config.txt
Const ForReading = 1
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(strPath, ForReading, TristateFalse)
Def(1) = f.Readline
Def(2) = f.Readline
f.Close
Def_Dis = """" & Def(1) & """"
Def_CC = Def(2)
DoCmd.OpenForm "Switchboard", acNormal
End Sub