Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 49
Default Copying & Inserting Rows w/o Affecting other Rows Etc.

I have a spreadsheet that a user can click on an option button and copy and
insert rows. Problem is that when this happens it moves all the other data
down another row or two depending on how many times they insert rows.

This affects other macros that have the same capability to copy and insert
rows in other areas of the spreadsheet. I can not figure out how to add
additional rows and maintain the rest of the sheets format throughout the
spreadsheet.

This is the code I have to copy and insert row on one section
Example: User wants another Email Request line they click on the option
button to insert the copied cells.

Sub PIMUserRequest()
'
Range("A16:V16").Select
Selection.Copy
Rows("17:17").Select
Range("C17").Activate
Selection.Insert Shift:=xlDown
Rows("17:17").RowHeight = 15.75
End Sub

Please HELP

Linda
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Copying & Inserting Rows w/o Affecting other Rows Etc.

If you insert a row or rows, the rows below have to go somewhere.

You can insert cells and shift down just for the column without affecting
adjacent columns or rest of row but cells below the inserted cell have to
move down in that column.


Gord Dibben MS Excel MVP

On Tue, 21 Oct 2008 13:50:00 -0700, LRay67
wrote:

I have a spreadsheet that a user can click on an option button and copy and
insert rows. Problem is that when this happens it moves all the other data
down another row or two depending on how many times they insert rows.

This affects other macros that have the same capability to copy and insert
rows in other areas of the spreadsheet. I can not figure out how to add
additional rows and maintain the rest of the sheets format throughout the
spreadsheet.

This is the code I have to copy and insert row on one section
Example: User wants another Email Request line they click on the option
button to insert the copied cells.

Sub PIMUserRequest()
'
Range("A16:V16").Select
Selection.Copy
Rows("17:17").Select
Range("C17").Activate
Selection.Insert Shift:=xlDown
Rows("17:17").RowHeight = 15.75
End Sub

Please HELP

Linda


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
copying formulas when inserting new rows Steve M[_4_] Excel Discussion (Misc queries) 7 September 8th 08 02:55 PM
Inserting multiple rows and copying formulas [email protected] Excel Discussion (Misc queries) 3 September 13th 07 03:24 PM
need help please inserting multiple rows based on cell value then copying to data sheet [email protected] Excel Worksheet Functions 1 July 1st 07 08:44 PM
sort multiple rows without affecting others rows Nitya Excel Discussion (Misc queries) 0 August 10th 06 01:59 PM
Automatically copying fomulae when Inserting rows Ian Goodhardt Excel Discussion (Misc queries) 3 August 17th 05 07:01 PM


All times are GMT +1. The time now is 04:51 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"