Reference: It is an Optional parameter. It specifies the destination. If you don’t specify this argument, the destination will be last used range.
Scroll: It is an Optional parameter. It has Boolean value either True or False. If the value is true then it will scroll through the window. If it is False then it won’t scroll through the window.
In the above syntax Application represents object and Goto is the method of Application.
VBA Goto Application Method: Example 1
Please find the below example for Goto method of application object in excel VBA. The below procedure select a cell ‘A250’ on the worksheet named Sheet1. And in the below statement mentioned ‘Scroll:=True’ it scrolls through the worksheet.
Application.Goto Reference:=Worksheets("Sheet1").Range("A200"), Scroll:=True
VBA Goto Application Method – Instructions
Please follow the below steps to execute the VBA code to save the excel file.
Step 1: Open any existing Excel Application.
Step 2: Press Alt+F11 – This will open the VBA Editor.
Step 3: Insert a code module from then insert menu.
Step 4: Copy the above code and paste in the code module which have inserted in the above step.
Step 6: Now press F5 to execute the code and check how the Goto method is working in Worksheet.