LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 188
Default Shell Command - Net Time (Cannot create text file)


Hi All,

I am trying to create a text file containing the current data / time
and store it in the same folder as my workbook.

I am using the following code under Excel 2000 running under Win2000
Pro on a Win2000 Server domain:


Sub TimeCheck()

ShellCommand = "Net time " & ThisWorkbook.Path & "\_Time.txt"

MsgBox Shell(ShellCommand)

End Sub


The value returned in the MsgBox is obviously the program's task ID
(as expected), but the text file (time.txt) is not created in the
folder with the workbook.

There is no permissions issue - it won't work on a network drive nor
my hard disk where I have full permissions.


Any ideas?

Thanks,

Alan.




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell command MAx Excel Programming 2 June 4th 04 04:11 PM
xp shell command using vba Sudhendra Excel Programming 2 February 16th 04 05:56 AM
Application Process-Shell Command GarethG[_10_] Excel Programming 2 October 29th 03 01:35 PM
SHELL command Robin Clay[_3_] Excel Programming 3 October 17th 03 02:50 PM
Copying a file with VBA (or with a SHELL command) Franck V. Excel Programming 1 September 15th 03 07:46 PM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"