Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling other programs

Status
Not open for further replies.

mdav2

Programmer
Aug 22, 2000
363
GB
I am trying to write a logging program that, when run, does the following.

* writes the date and time to a text file.
* calls\runs an external program (eg minesweeper)

The user should not see the program that performs this and will only see their application.

* If possible it would also be useful to write the date and time that the program finishes.

Any help is greatly appreciated.
 

You can use this as the starting point!

Dim x As Integer
Open "c:\myfile.txt" for output as #1
write #1, Now
Close #1
x = Shell("Notepad.exe")



Tarek

The more I learn, the more I need to learn!
 
Cheerz, that works OK.
Declaring x as an integerv doesn't work but "dim x" on its own does.

 
Coz Shell function returns a double, declaring as integer will raise overflow error.
(-:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top