1.

Solve : Excel Macro works in 2000 but not 2003?

Answer» <html><body><p>I have a problem that occurs with MS Excel 2003 Professional but not MS Excel 2000 Professional. I am on Windows XP.<br/>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. <br/>The piece of code causing the problem is below:<br/><br/>Set myRange = ActiveSheet.UsedRange<br/> For Each rw In myRange.Rows<br/> <br/> If insertNextRow Then<br/> Rows(rw.Row).Select<br/> Selection.Insert Shift:=xlDown<br/> End If<br/> <br/> insertNextRow = False<br/> If rw.OutlineLevel = 3 Then<br/> insertNextRow = True<br/> End If<br/> <br/> Next rw<br/><br/>This part of the macro inserts a row between subtotalled groups only. This <a href="https://interviewquestions.tuteehub.com/tag/works-17618" style="font-weight:bold;" target="_blank" title="Click to know more about WORKS">WORKS</a> in Excel 2000 but in Excel 2003 it will keep inserting lines <a href="https://interviewquestions.tuteehub.com/tag/forever-996117" style="font-weight:bold;" target="_blank" title="Click to know more about FOREVER">FOREVER</a> unless you <a href="https://interviewquestions.tuteehub.com/tag/break-245059" style="font-weight:bold;" target="_blank" title="Click to know more about BREAK">BREAK</a> out of the macro.<br/>?? <br/>bucklsu, welcome to the forum but I'm <a href="https://interviewquestions.tuteehub.com/tag/actually-848884" style="font-weight:bold;" target="_blank" title="Click to know more about ACTUALLY">ACTUALLY</a> going to shoo you away. We don't get many Excel questions here, especially like yours. I'm an Excel <a href="https://interviewquestions.tuteehub.com/tag/user-25565" style="font-weight:bold;" target="_blank" title="Click to know more about USER">USER</a> but not very proficient with VBA in macros. So, I suggest you visit <a href="http://www.excelforum.com/">http://www.excelforum.com/</a>. I just think you'll get a faster response there to your question. Thank you, soybean, I'll do just that.</p></body></html>


Discussion

No Comment Found