How to use Goto based on Drop Down Box selection?

By mwisejay ·
Using EXCEL 2007 I have a spreadsheet reporting information on 38 different contracts. Each contract report is set up to print to it's on page for monthly reporting needs. Instead of having to scroll down the worksheet or having to use CTL-F to locate a contract on the worksheet. I want to use a drop down box to select the contract number and then Goto function will move the active cell to the contracts location in the work sheet. On another worksheet I have the contract names listed to populate the drop down box (Contract 1, Contract 2, and Contract 3 for example and used in the code below).

Here is the VB code I'm trying without success:

Sub DropDown1_Change()
If DropDown1.Value = "Contract 1" Then
Application.Goto Reference:="R56C1"

ElseIf DropDown1.Value = "Contract 2" Then
Application.Goto Reference:="R101C1"

ElseIf DropDown1.Value = "Contract 3" Then
Application.Goto Reference:="R156C1"

End If
End Sub

Any assistance would be greatly appreciated!

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums