Mandy has attended:
Access Intermediate course
Access Advanced course
Select cell - change view
Hi when I write the following small piece of VBA:
Sub Thresholds()
' Take the user to the Threshold update area
Range("O25").Select
End Sub
I want the cell selected (O25) to be in the TOP LEFT of the screen (it currently is in the middle so I can see Columns L onwards and rows 1 downwards
I only want to be able to see columns O onwards and 25 and downwards
Regards
Mandy
RE: Select cell - change view
Hi Mandy
To set your cell selection to the TOP LEFT you can do the following:
Always start on Range ("A1") for consistency. Then select select the target cell
Then use the SmallScroll method as seen below in the updated Thresholds Sub.
NB You scroll to the right one less number than the taget column and scroll down one less numberthan the target row.
Sub Thresholds()
' Take the user to the Threshold update area
Range("A1").Select 'Always start at "A1"
Range("O25").Select 'The target cell
ActiveWindow.SmallScroll ToRight:=14 'One lees than the number of Columns
ActiveWindow.SmallScroll Down:=24 'One less than the number of Rows
End Sub