View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jason Morin[_3_] Jason Morin[_3_] is offline
external usenet poster
 
Posts: 18
Default Count elements in array

Hello and TIA. Users input a string into a InputBox in
the #,# format. For example:

SheetsToPrint = "1,3,8,14"

This indicates which sheets (index #) they want to print.
The macro is printing but I'm having issues determing the
total elements in my array, and thus all sheets selected
won't print:

SheetsToPrintSplit = Split(SheetsToPrint, ",")

For iCounter = 0 To UBound(SheetsToPrintSplit)
Sheets(CInt(SheetsToPrintSplit(iCounter))).PrintOu t
iCounter = iCounter + 1
Next