Active cell position for macro
Without seeing your code it is hard to say why your macro won't run if
activecell is not in last blank row.
This will move the cursor to last blank cell in column A
Sub foo()
Dim rcell As Range
Set rcell = ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)
Application.Goto Reference:=rcell
MsgBox "Activecell is" & rcell.Address
End Sub
Gord Dibben MS Excel MVP
On Sat, 22 Sep 2007 12:36:00 -0700, MechEng
wrote:
I am running a macro to add rows or remove rows assigned to a form button.
The problem is if the active cell is moved from the last blank row the marco
won't run.
Is it possible to have the macro alway return the cursor to the required
active cell before it runs?
|