FoxProProgrammer
Programmer
Hi,
The following code opens a text file using Notebook.
1. Is there a way to open the file as Read Only? I set the file attributes to Read Only, but I want to prevent the user from typing text in the Notepad window. Is there a way to do this, or do I need to create an Access Form instead of using a text file?
2. I changed the name of the file to see if RetVal would be 0. It doesn't work. Instead, a dialog is displayed that the file couldn't be found...Do you want to create a new file... Is there a way to disable that? Do I need to trap this error and handle it in an error handler?
Thanks!
dz
The following code opens a text file using Notebook.
Code:
Dim File As String
Dim RetVal
File = "c:\Program Files\SCADC Repair Tracking\release.txt"
RetVal = Shell("c:\windows\notepad.exe " & File, 1) ' Run Notepad.
If RetVal = 0 Then
MsgBox "Release Notes file not found!", vbCritical + vbOKOnly, "SCADC Repair Tracking"
End If
1. Is there a way to open the file as Read Only? I set the file attributes to Read Only, but I want to prevent the user from typing text in the Notepad window. Is there a way to do this, or do I need to create an Access Form instead of using a text file?
2. I changed the name of the file to see if RetVal would be 0. It doesn't work. Instead, a dialog is displayed that the file couldn't be found...Do you want to create a new file... Is there a way to disable that? Do I need to trap this error and handle it in an error handler?
Thanks!
dz