English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Please, one of you Gurus help.
I have Windows XP 2003. I'm using VBA 2005.
I have several macros that function properly.

I have recorded a new macro.
I first activate a Workbook.
Then select a worksheet, (sheet 1), by sheet name.
There are 13 sheets, all named.
I grouped all the sheets for a common procedure, copy and paste.
The recorded macro grouped the sheets in this manner.

Sheets(Array(" 13 sheet names listed" )).Select

I then activated the first sheet, by name.
The procedure was performed.
Then I ungrouped the sheets

The macro Run once.

Then I a got an error, "Subscript out of range", on the Array, above.
Second problem, the recorded macro does not "Ungroup" sheets. I used the shortcut, Right click to ungroup.
Is there Code to Ungroup sheets?

A 1,000 page book is no help. GRRRR!

2007-11-08 22:52:29 · 2 answers · asked by ed 7 in Computers & Internet Programming & Design

2 answers

If your VBA doesn't contain intellectual propery, email it to me and I will look at it. That error is normally easy to solve: you have a for loop and go out of the bounds of your array, but since it isn't in the question, I am not sure.

2007-11-08 23:01:20 · answer #1 · answered by Anonymous · 0 0

The select sheet code merely selects a sheet,
try Sheets("sheet1").Activate instead of select.

2007-11-08 23:03:30 · answer #2 · answered by Wayne G 3 · 0 0

fedest.com, questions and answers