ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,736
- Office Version
- 2007
- Platform
- Windows
Currently using this code below but an odd thing keeps happening & now looking to get it written another way please to avoid it.
I select the POSTAGE sheet & it always scrolls so last row with values are shown, THIS IS FINE.
I like to have the cell in column B of last row with values selected.
Currently the odd thing is the page moves so column B is the firt column i see on the screen meaning column A is off the screen.
I change B in the code for E & it does the same where column E is the first column i see on the screen meaning column A,B,C & D are off the screen.
Dont see why the code cant just stay as it is & have the cell in column B selected.
Changing the Offset values just moves the selected cell down or right etc so maybe not needed but whatever i try its either the same or run time errors
I select the POSTAGE sheet & it always scrolls so last row with values are shown, THIS IS FINE.
I like to have the cell in column B of last row with values selected.
Currently the odd thing is the page moves so column B is the firt column i see on the screen meaning column A is off the screen.
I change B in the code for E & it does the same where column E is the first column i see on the screen meaning column A,B,C & D are off the screen.
Dont see why the code cant just stay as it is & have the cell in column B selected.
Changing the Offset values just moves the selected cell down or right etc so maybe not needed but whatever i try its either the same or run time errors
VBA Code:
Private Sub Worksheet_Activate()
Application.Goto Sheets("POSTAGE").Range("B" & Rows.count).End(xlUp).Offset(0, 0), True
ActiveWindow.SmallScroll UP:=15
End Sub