Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wish to write a macro which, when run, will return to the active (has
focus) cell. Is this achievable? -- tia Jock |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub whereisactive()
MsgBox (ActiveCell.Address) End Sub -- Gary''s Student - gsnu200718 "Jock" wrote: I wish to write a macro which, when run, will return to the active (has focus) cell. Is this achievable? -- tia Jock |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That tells me which is the active cell, however, I want it to be visible when
the macro is run. :) -- tia Jock "Gary''s Student" wrote: Sub whereisactive() MsgBox (ActiveCell.Address) End Sub -- Gary''s Student - gsnu200718 "Jock" wrote: I wish to write a macro which, when run, will return to the active (has focus) cell. Is this achievable? -- tia Jock |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
O.K. If you want the Activecell address displayed in a cell, then:
Sub whereisactive() Range("A1").Value = ActiveCell.Address End Sub -- Gary''s Student - gsnu200718 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Apologies if I was being unclear.
At top of worksheet (in cell I3), I have a button with macro which, when clicked goes to AA15 (for instance). As time goes on, the user could be on row 2000, but can still access the button at the top taking him to AA15. I would like the button (and macro) next to AA15 to take the user back to wherever he has just come from ie A2000. Is this possible? -- tia Jock "Gary''s Student" wrote: O.K. If you want the Activecell address displayed in a cell, then: Sub whereisactive() Range("A1").Value = ActiveCell.Address End Sub -- Gary''s Student - gsnu200718 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jock,
try something like this Sub Button1_Click() Dim rStartCell As Range 'Remember the current active cell Set rStartCell = ActiveCell 'YOUR CODE HERE 'Check if we have moved to a different sheet If ActiveSheet.Name < rStartCell.Parent.Name Then 'if yes, activate rStartCell's parent rStartCell.Parent.Activate End If rStartCell.Activate End Sub -- Hope that helps. Vergel Adriano "Jock" wrote: Apologies if I was being unclear. At top of worksheet (in cell I3), I have a button with macro which, when clicked goes to AA15 (for instance). As time goes on, the user could be on row 2000, but can still access the button at the top taking him to AA15. I would like the button (and macro) next to AA15 to take the user back to wherever he has just come from ie A2000. Is this possible? -- tia Jock "Gary''s Student" wrote: O.K. If you want the Activecell address displayed in a cell, then: Sub whereisactive() Range("A1").Value = ActiveCell.Address End Sub -- Gary''s Student - gsnu200718 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |