Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row without Selecting
I'd like to be able to insert a new row without having to
select a row first. This is the syntax I'm using (from a recorded macro): TargCell.EntireRow.Select Selection.Insert Shift:=xlDown I don't want to have to do a select because the sheet I'm manipulating is (windows(sheetname).visible = false), and currently I have to "unhide" it in order to insert the row, or I get an error trying to do the select when it's hidden. Any help would be appreciated. David Jenkins |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row without Selecting
Hi David,
David Jenkins wrote: I'd like to be able to insert a new row without having to select a row first. This is the syntax I'm using (from a recorded macro): TargCell.EntireRow.Select Selection.Insert Shift:=xlDown I don't want to have to do a select because the sheet I'm manipulating is (windows(sheetname).visible = false), and currently I have to "unhide" it in order to insert the row, or I get an error trying to do the select when it's hidden. TargCell.EntireRow.Insert Shift:=xlDown -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row without Selecting
Beautiful! Thanks, Jake!
-----Original Message----- Hi David, David Jenkins wrote: I'd like to be able to insert a new row without having to select a row first. This is the syntax I'm using (from a recorded macro): TargCell.EntireRow.Select Selection.Insert Shift:=xlDown I don't want to have to do a select because the sheet I'm manipulating is (windows(sheetname).visible = false), and currently I have to "unhide" it in order to insert the row, or I get an error trying to do the select when it's hidden. TargCell.EntireRow.Insert Shift:=xlDown -- Regards, Jake Marx MS MVP - Excel www.longhead.com [please keep replies in the newsgroup - email address unmonitored] . |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row without Selecting
Worksheets(SheetName).Rows("10:10").EntireRow.Inse rt
- Manges -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Row without Selecting
Worksheets(SheetName).Rows("10:10").EntireRow.Inse rt
if you try to select a hidden sheet you get an error. so do not use select. use the insert directly. The above line inserts row 10 - Manges -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cannot insert worksheet in exel - not available in insert menu | Excel Worksheet Functions | |||
insert row / insert column command buttons | Excel Worksheet Functions | |||
Can I auto insert a worksheet when I insert a value in a cell. | Excel Worksheet Functions | |||
Insert Next? Or insert a variable number of records...how? | Excel Discussion (Misc queries) | |||
Selecting ALL names when using Insert/Names/Apply | Excel Worksheet Functions |