Visual Basics - Problem with code

S

Shirl

I have created a code in Excel which on clicking on a button, takes you to
another worksheet then to a selection of cells which I have named. It will
take me to the worksheet but comes up with an error. Please let me know
whats wrong with the following:

Private Sub CommandButton2_Click()
Application.Goto ActiveWorkbook.Sheets("WGTN & KAPITI").Activate
ActiveSheet.Range("Shailesh").Activate
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top