Determining Array Limit
Excel 2003. I am using the following code to read filename(s) into a variant
array. How may I determine how many files were selected? Or how may I determine Dim Fname as Variant FName = Application.GetOpenFilename("Excel Files (*.xls), *.xls", , "Select RD Workbooks to Email", , True) I get an error when I try to access FName and move beyond the last array element trying to determine how many elements (file names) there are. |
Determining Array Limit
Hi
have a look at UBound in the VBA help -- Regards Frank Kabel Frankfurt, Germany "Chaplain Doug" schrieb im Newsbeitrag ... Excel 2003. I am using the following code to read filename(s) into a variant array. How may I determine how many files were selected? Or how may I determine Dim Fname as Variant FName = Application.GetOpenFilename("Excel Files (*.xls), *.xls", , "Select RD Workbooks to Email", , True) I get an error when I try to access FName and move beyond the last array element trying to determine how many elements (file names) there are. |
Determining Array Limit
Frank Kabel wrote:
Hi have a look at UBound in the VBA help More specifically, since it might not be apparent from the On-line help: UBound(myArray) - LBound(myArray) + 1 Alan Beban |
Determining Array Limit
Thank you Alan and Frank. God bless.
"Alan Beban" wrote: Frank Kabel wrote: Hi have a look at UBound in the VBA help More specifically, since it might not be apparent from the On-line help: UBound(myArray) - LBound(myArray) + 1 Alan Beban |
All times are GMT +1. The time now is 11:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com