-
Simplify and automate
Hi,
I wonder if the code below can be changed so I dont need to run the macro every time? What I want is that every time i make a sheet active I want a specific cell to be active even if i leave the sheet when another cell is active.
I have solved it by a macro that runs when the sheet is activated, but I wonder if it can be done without a macro?
Here is the code:
Code:
Private Sub Worksheet_Activate()
Call RememberActive
End Sub
Sub RememberActive()
Dim r As Long, c As Integer
Sheets(3).Activate
Range("F12").Select
r = ActiveCell.Row
c = ActiveCell.Column
End Sub
Rgds
/Phprahl
-
Hi,
I don't think there is a way of doing this without code but thats what the code (and especially a workbook/sheet event) is for. The following line in the activate event for the sheet (rather than the workbook), activates a specified cell
Code:
Range("F12").Activate
-
What exactly do you want to do with the row and column afterwards?
-
How simple....Exactly what I wanted, Killian!
Thanks! :bow: