L
Len
Hi,
I need someone to help me to rectify the following VBA codes which had
taken from other excel file to use for Excel VBA learning exercise.
However, I face the problem when I run excel macro on these codes in
Excel 2007, it prompts the error “ Method ‘Open’ of object ‘Workbooks’
failed” and it stops at VBA code “ Workbooks.Open filenams (counter)
Dim lngCount As Long
Dim filenames As Variant
filenames = Application.GetOpenFilename(, , , , True)
counter = 1
While counter <= UBound(filenames)
Workbooks.Open filenames(counter)
counter = counter + 1
Wend
Thanks in advance
Regards
Len
I need someone to help me to rectify the following VBA codes which had
taken from other excel file to use for Excel VBA learning exercise.
However, I face the problem when I run excel macro on these codes in
Excel 2007, it prompts the error “ Method ‘Open’ of object ‘Workbooks’
failed” and it stops at VBA code “ Workbooks.Open filenams (counter)
Dim lngCount As Long
Dim filenames As Variant
filenames = Application.GetOpenFilename(, , , , True)
counter = 1
While counter <= UBound(filenames)
Workbooks.Open filenames(counter)
counter = counter + 1
Wend
Thanks in advance
Regards
Len