Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 411
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Excel 2007 chart with multiple lines, mouse doesn't track lines sfuelling Charts and Charting in Excel 1 August 19th 09 09:41 PM
Inserting Lines or Copying lines with formulas but without data wnfisba Excel Discussion (Misc queries) 2 August 18th 06 04:41 PM
Code for Inserting Multiple lines Frantic Excel-er Excel Discussion (Misc queries) 0 June 17th 05 06:36 PM
Inserting lines that don't destroy macros Ali K Excel Programming 1 October 27th 04 01:37 PM
Inserting Lines C[_2_] Excel Programming 3 October 3rd 03 10:44 PM


All times are GMT +1. The time now is 06:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"