Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Lines using multiple Macros
I'm able to create a macro that allows me to insert additional lines to a
template as a user needs with no problems. Further down in the sheet I have an additional macro to insert additional lines as a user needs. If the user inserts lines with macro #1 and then tries to insert lines with macro #2, the second macro now has inaccurate row references and places the additional lines in the wrong location. Is there a way to have the line insertion point move if additional rows are added above the macro? Thank you in advance for the support. Paul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Lines using multiple Macros
Hi Paul,
You'll probably have a more useful experience if you post the code from each macro. Dan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting Lines using multiple Macros
As with deleting rows, its best to insert from the bottom up. Try these 2 codes in a block of data to see the difference Sub Inserts() For i = 20 To 2 Step -2 Rows(i).Insert Next End Sub Sub Inserts2() For i = 2 To 20 Step 2 Rows(i).Insert Next End Sub -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile: http://www.thecodecage.com/forumz/member.php?userid=113 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=66591 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
In Excel 2007 chart with multiple lines, mouse doesn't track lines | Charts and Charting in Excel | |||
Inserting Lines or Copying lines with formulas but without data | Excel Discussion (Misc queries) | |||
Code for Inserting Multiple lines | Excel Discussion (Misc queries) | |||
Inserting lines that don't destroy macros | Excel Programming | |||
Inserting Lines | Excel Programming |