|
-
Jun 25th, 2000, 09:27 AM
#1
Thread Starter
New Member
Hi to All!
I'm stumped with something that I know has to be a simple procedure. Can anyone help...Please?
I am trying to make a VB "command button" open Notepad.exe + a specified .txt file. I can get Notepad to open but, I'm not sure of the proper syntax to open the textfile in Notepad.
Here is what I have so far, any suggestions would be most greatfully appreciated!:
Private Sub cmdCommand1_Click()
Call Shell("C:\windows\notepad.exe", vbNormalNoFocus)
End Sub
Many Thanks!
Ronnie Bussey
-
Jun 25th, 2000, 11:35 AM
#2
Hyperactive Member
You just pass the file you want to open as a parameter to the command line.
Code:
Private Sub cmdCommand1_Click()
Call Shell("C:\windows\notepad.exe " & Text1.Text, vbNormalNoFocus)
End Sub
Assuming of course that the TextBox named Text1 contains the name of the file you want opened with it.
-
Jun 26th, 2000, 09:40 AM
#3
Thread Starter
New Member
Thank You!
Hi Gen-X!
Thanks for the tip. I knew it had to be something fairly simple. I just couldn't find anything that referenced the proper syntax for the procedure.
Thanks again for your time and consideration!
Regards,
Ronnie Bussey
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|