View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Colin Hayes Colin Hayes is offline
external usenet poster
 
Posts: 465
Default Where best to place an instruction in a VBA script

In article , FSt1
writes
hi
Range("A200").select

Regards
FSt1


Hi

Ok thanks for getting back. That's fixed it now. Worked first time.



Best Wishes




Hi All

I'm using this code when I open my workbook.

Private Sub Workbook_Open()
Dim mysheets As Sheets
Set mysheets = Worksheets(Array(1))
For Each Sheet In mysheets
Sheets("ShareSheet").ScrollArea = "A1:J27"

Next


End Sub


I'd like cell A200 to be selected and have the cursor box on it on
opening the worksheet.

I'm trying to place this line in the code :

Application.Goto Reference:="R200C1"

but can't get it to work.

Can someone advise please?

Grateful for any assistance.


Best Wishes
.