Phprahl
03-23-2005, 02:37 AM
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:
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
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:
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