View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Count elements in array

That looks okay. What is (not) happening?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jason Morin" wrote in message
...
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