Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do while
I've had a brain fart.
Can't remember how to save the initial cell to a variable and do something while the first cell is NOT active. Using Excel 2003... Dim firstcell As Range ' this section is where my problem is... ActiveCell = firstcell ' It won't save anything to firstcell Cells.FindNext(After:=ActiveCell).Activate ActiveCell.Offset(0, 0).EntireRow.Insert Shift:=xlDown Do While ActiveCell Is Not firstcell Cells.FindNext(After:=ActiveCell).Activate Cells.FindNext(After:=ActiveCell).Activate ActiveCell.Offset(0, 0).EntireRow.Insert Shift:=xlDown Loop |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do while
Set firstCell = Activecell
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "okrob" wrote in message ups.com... I've had a brain fart. Can't remember how to save the initial cell to a variable and do something while the first cell is NOT active. Using Excel 2003... Dim firstcell As Range ' this section is where my problem is... ActiveCell = firstcell ' It won't save anything to firstcell Cells.FindNext(After:=ActiveCell).Activate ActiveCell.Offset(0, 0).EntireRow.Insert Shift:=xlDown Do While ActiveCell Is Not firstcell Cells.FindNext(After:=ActiveCell).Activate Cells.FindNext(After:=ActiveCell).Activate ActiveCell.Offset(0, 0).EntireRow.Insert Shift:=xlDown Loop |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Do while
On Oct 4, 11:20 am, "Bob Phillips" wrote:
Set firstCell = Activecell -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "okrob" wrote in message ups.com... I've had a brain fart. Can't remember how to save the initial cell to a variable and do something while the first cell is NOT active. Using Excel 2003... Dim firstcell As Range ' this section is where my problem is... ActiveCell = firstcell ' It won't save anything to firstcell Cells.FindNext(After:=ActiveCell).Activate ActiveCell.Offset(0, 0).EntireRow.Insert Shift:=xlDown Do While ActiveCell Is Not firstcell Cells.FindNext(After:=ActiveCell).Activate Cells.FindNext(After:=ActiveCell).Activate ActiveCell.Offset(0, 0).EntireRow.Insert Shift:=xlDown Loop- Hide quoted text - - Show quoted text - knew it was a simple brain fart. Thanks Bob... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|