Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting new rows into sheet
I am using the following code to insert a new row onto
my spreadsheet: Rows("5:5").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove This code will insert a new row above the current row number 5, which is okay. My problem is that the new row has the same height and possibly dimensions and formatting of row 4. Can I basically tell Excel to insert a row of cells that are a default size or a size of my specification?? I dont want Excel to insert a row of cells that are the same dimensions of the above or below row. I realize that I could write code to resize the new cells, but I am curious if Excel has a setting to stop it from copying the dimensions of adjacent cells. Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting new rows into sheet
Excel normally uses the default formatting when inserting a row,
however you're telling it to copy the format from the row above the insertion point (via the optional "CopyOrigin:=xlFormatFromLeftOrAbove" argument). try simplifying your code to just: Rows("5:5").Insert Shift:=xlDown |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Inserting new rows into sheet
I must be doing something wrong, because that didn't work. I
tried both of the following options: Rows("5:5").Insert and Rows("5:5").Insert Shift=xlDown All cells in Row 4 have larger dimensions than all other cells on the sheet. When I run the above code, Excel creates a row of cells that all look like Row 4 cells. Did I do something wrong??? "Jef Gorbach" wrote in message ... try simplifying your code to just: Rows("5:5").Insert Shift:=xlDown |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting rows on formula sheet? | Excel Discussion (Misc queries) | |||
Cutting rows and inserting in another sheet | Excel Discussion (Misc queries) | |||
inserting rows in entire sheet | Excel Discussion (Misc queries) | |||
inserting rows at common word in a sheet | Excel Discussion (Misc queries) | |||
Inserting rows in protected sheet | Excel Programming |