|
-
Mar 20th, 2001, 10:07 PM
#1
Thread Starter
PowerPoster
I keep getting the error:
Compile Error
Constants, fixed lenght strings, blah blah and Declare Statements are not allowed as Public Members of Object Modules!
How do i fix it?
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Sub Check2_Click()
Dim retval As Long ' return value
Dim x As Integer
x = "F:\R S G\masters\RSG Jobs\job numbers listing.xls"
' 1. Run the program:
retval = ShellExecute(Form1.hwnd, "open", x, "-fast", "C:\MyProg\")
End Sub
Private Sub Command1_Click()
Dim retval As Long ' return value
Dim x As Integer
x = "F:\R S G\masters\RSG Jobs\job numbers listing.xls"
' 1. Run the program:
retval = ShellExecute(Form1.hwnd, "open", x, "-fast", "C:\MyProg\")
Check1.Value = 1
End Sub
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
|