Message 1 of 10
help needed to debug this VBA program

Not applicable
06-19-2006
08:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I am new to VBA and I have been stuck wid this.Can someone please help.
Public Function GetArray(ByRef pFileArray As Variant) As Boolean
Me.Show
For Each i In sFileArray
pFileArray(i) = sFileArray(i + 1) 'assigning the values in sFileArray to pFileArray
Next
GetArray = mbool
End Function
At the loop it says that i is not initialized.Before the 'For' ...The Me.Show navigates to the form and takes all the input I need.when it comes back it does not recognize variable i.
Can u please tell me how to make that function recognize 'i'
Any help will be appreciated.
Thanks
Avantika
I am new to VBA and I have been stuck wid this.Can someone please help.
Public Function GetArray(ByRef pFileArray As Variant) As Boolean
Me.Show
For Each i In sFileArray
pFileArray(i) = sFileArray(i + 1) 'assigning the values in sFileArray to pFileArray
Next
GetArray = mbool
End Function
At the loop it says that i is not initialized.Before the 'For' ...The Me.Show navigates to the form and takes all the input I need.when it comes back it does not recognize variable i.
Can u please tell me how to make that function recognize 'i'
Any help will be appreciated.
Thanks
Avantika