|
Answer» I have a problem that occurs with MS Excel 2003 Professional but not MS Excel 2000 Professional. I am on Windows XP. The Macro runs without an error message, but instead of completing, it seems to be stuck in a loop where it keeps forcing blank lines to print. The piece of code causing the problem is below:
Set myRange = ActiveSheet.UsedRange For Each rw In myRange.Rows If insertNextRow Then Rows(rw.Row).Select Selection.Insert Shift:=xlDown End If insertNextRow = False If rw.OutlineLevel = 3 Then insertNextRow = True End If Next rw
This part of the macro inserts a row between subtotalled groups only. This WORKS in Excel 2000 but in Excel 2003 it will keep inserting lines FOREVER unless you BREAK out of the macro. ?? bucklsu, welcome to the forum but I'm ACTUALLY going to shoo you away. We don't get many Excel questions here, especially like yours. I'm an Excel USER but not very proficient with VBA in macros. So, I suggest you visit http://www.excelforum.com/. I just think you'll get a faster response there to your question. Thank you, soybean, I'll do just that.
|