05-30-2011, 12:27 PM
05-30-2011, 03:29 PM
Can you loop thru all the sheet and find the usedrange.rows value for each sheet. if more than zero means u can increment the counter and get the desired from counter value
07-06-2011, 09:48 AM
i don't know if there is a method to count no of sheets in an excel file but one trick is,
try to open a non existing sheet and get that err.Number
Then in your code use a loop to open all sheets one by one meanwhile keep incrementing a variable as no. of sheets till you get that same err.number
try to open a non existing sheet and get that err.Number
Then in your code use a loop to open all sheets one by one meanwhile keep incrementing a variable as no. of sheets till you get that same err.number