Hello
I'am using a shell command to create a text file:
Shell("cmd.exe /C NET TIME \\fileserver > time.txt"
Application.Wait (Now + TimeValue("0:00:01"
)
' Open file and read in text
intF = FreeFile
Open filnavn For Input As #intF
Line Input #intF, strX
Close intF
The wait command is inserted to ensure that the text file is created before it is opened. Is there a way I could stop the executing of the code until the textfile is created, instead of using this silly wait command.
hope you can help me
\Bo
I'am using a shell command to create a text file:
Shell("cmd.exe /C NET TIME \\fileserver > time.txt"
Application.Wait (Now + TimeValue("0:00:01"
' Open file and read in text
intF = FreeFile
Open filnavn For Input As #intF
Line Input #intF, strX
Close intF
The wait command is inserted to ensure that the text file is created before it is opened. Is there a way I could stop the executing of the code until the textfile is created, instead of using this silly wait command.
hope you can help me
\Bo