J
Jack Gillis
I was doing some work in VBA for a macro and could get it to work on
some workbooks but not others. The macro uses a For loop to cycle
through all the sheets in a workbook and perform identical operations on
each. I found the problem with the offending workbooks and can fix the
macro to make it work on them but then it won't work on the others.
The problem is some workbooks have an 'un-tabbed' sheet named Menu Sheet
according to VBA's Project Explorer. It is Sheet 11 and how it got there
with that number, I haven't a clue for my other sheets are 1 through 6.
I discovered this when I examined what Sheets.Count returned and found
it was one more than the number of Tabs in the workbook.
I've no idea what 'Menu Sheet' is or where it came from. Is it really
needed? I can't find a way to delete it anyway. I can program around
it, I think if I can find a way to detect its presence, but I wonder how
many other such things can crop up to mess up what I hope to be a
general purpose macro.
I hope I have made the question clear and I will really appreciate any
insight to this vexing thing.
some workbooks but not others. The macro uses a For loop to cycle
through all the sheets in a workbook and perform identical operations on
each. I found the problem with the offending workbooks and can fix the
macro to make it work on them but then it won't work on the others.
The problem is some workbooks have an 'un-tabbed' sheet named Menu Sheet
according to VBA's Project Explorer. It is Sheet 11 and how it got there
with that number, I haven't a clue for my other sheets are 1 through 6.
I discovered this when I examined what Sheets.Count returned and found
it was one more than the number of Tabs in the workbook.
I've no idea what 'Menu Sheet' is or where it came from. Is it really
needed? I can't find a way to delete it anyway. I can program around
it, I think if I can find a way to detect its presence, but I wonder how
many other such things can crop up to mess up what I hope to be a
general purpose macro.
I hope I have made the question clear and I will really appreciate any
insight to this vexing thing.