Oct 10, 2004 #1 kelqc Programmer Feb 16, 2003 31 AU Hi I use the following code to open a file with Notepad using Excel97. Shell("C:\WINNT\Notepad.exe TossLogFile.txt", 1) Is it possible to open the file in read only mode, I am trying to stop people from making any changes to it. Thanks Kelvin
Hi I use the following code to open a file with Notepad using Excel97. Shell("C:\WINNT\Notepad.exe TossLogFile.txt", 1) Is it possible to open the file in read only mode, I am trying to stop people from making any changes to it. Thanks Kelvin
Oct 10, 2004 1 #2 ETID Programmer Jul 6, 2001 1,867 US create a "dos"/command prompt batch file that contains both the attrib +r for this file and the path and file name of the same. then shell the batch file. I.E. create a file named my_notepad.bat that contains these lines... attrib +r C:\WINNT\Notepad.exe TossLogFile.txt C:\WINNT\Notepad.exe TossLogFile.txt then in vba... Shell("C:\WINNT\my_path\my_Notepad.bat", 1) Upvote 0 Downvote
create a "dos"/command prompt batch file that contains both the attrib +r for this file and the path and file name of the same. then shell the batch file. I.E. create a file named my_notepad.bat that contains these lines... attrib +r C:\WINNT\Notepad.exe TossLogFile.txt C:\WINNT\Notepad.exe TossLogFile.txt then in vba... Shell("C:\WINNT\my_path\my_Notepad.bat", 1)
Oct 11, 2004 Thread starter #3 kelqc Programmer Feb 16, 2003 31 AU Hi ETID Thanks for the help. I will give it a try Kelvin Upvote 0 Downvote