Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use this code to insert 4 blank lines.
vUnit = ActiveCell Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(4, 0))._ EntireRow.Select Selection.Insert Shift:=xlDown How do I get the cursor to go back to the activecell? I can't hard code the cell reference because it will change throughout the macro. I also tried:"Range(ActiveCell). _Select" but that did not work. Thanks for the help... |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim c as rang
vUnit = ActiveCel set c = selectio Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(4, 0))._ EntireRow.Selec Selection.Insert Shift:=xlDow c.selec ----- TJ wrote: ---- I use this code to insert 4 blank lines vUnit = ActiveCel Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(4, 0))._ EntireRow.Selec Selection.Insert Shift:=xlDow How do I get the cursor to go back to the activecell? I can't hard code the cell reference because it will change throughout the macro. I also tried:"Range(ActiveCell). _Select" but that did not work. Thanks for the help.. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you don;t select it, you don't need to go back, it stays there
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(4, 0)). _ EntireRow.Insert Shift:=xlDown -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "TJ" wrote in message ... I use this code to insert 4 blank lines. vUnit = ActiveCell Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(4, 0))._ EntireRow.Select Selection.Insert Shift:=xlDown How do I get the cursor to go back to the activecell? I can't hard code the cell reference because it will change throughout the macro. I also tried:"Range(ActiveCell). _Select" but that did not work. Thanks for the help... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
Activecell problem | Excel Discussion (Misc queries) | |||
Defining an Activecell | Excel Discussion (Misc queries) | |||
how to set activecell? | Excel Programming | |||
ActiveCell.FormulaR1C1 | Excel Programming |