|
-
May 6th, 2003, 03:37 AM
#1
Thread Starter
New Member
subscript out of range error
I am trying to put he content of a folder into an array, ut keep getting the same error message.
Can anyone help
Private 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 Command1_Click()
Dim n As Integer
Dim fileList()
For n = LBound(fileList()) To UBound(fileList())
Debug.Print Str(n) & "" & fileList(n)
Next n
strMyFile = fileList(n)
strMyFile = "C:\New Folder\"
If Dir(strMyFile) = "" Then
MsgBox "File " & strMyFile & " does not exist"
Else
PrintIt = ShellExecute(Me.hwnd, "PRINT", strMyFile, "", "", -1)
End If
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
|