Creating buttons in Excel 2000

I want to create a button in my worksheet so when clicked it goes to another worksheet within the workbook. As i have about 5-6 worksheets and i dont want to have to click on the tabs at the bottom of the screen, each time i want to change the worksheet. I am finding it difficult to write the Visual Basic Code for it can anyone help me please.

Steve

  VoG II 17:22 27 Sep 03

Sub Move()

Sheets("Sheet1").Select

End Sub

or similar.

An easier way, however, is to right click the arrow buttons on the bottom left (near the sheet tabs) and a pop-up menu will appear.

  Simsy 17:39 27 Sep 03

about which sheet is is you want to go to each time?

The easiest way to learn the code, I've found, is to record a macro, and look at the code it creates.

In this instance;

1)Draw your button on the sheet

2)Exit "design mode" on thge VBA toolbar

3)Record a new macro, (via Tools>Macros>RecordNewMacro) When the dialog box appears asking for a macro name, just take the default,"Macro1", don't do anything else, and click OK.

4)You should now have a small toolbar on screen with a square, blue button. This is the "Stop recording" button. Select another sheet, using the tabs at the bottom, then hit the "stop recording button.

5)Look at the macro you have just recorded by clicking Tools>Macro>Macros selct macro1 in the box and click "edit" This will open the VisBasic editor and you can see the code. Copy this code, missing out the lines "Sub Macro1" and "End Sub". (Anything in green is "comment" and doesn't cause anything to happen)

6)Click the tab for the sheet with the button on.

7)Click the button on the visbasic toolbar to go into "design mode"

8)Right click the button and choose "view code"

9)Paste the code you previously copied into the vb editor, between the lines "private sub" and "end sub"

10)Back to the spreadsheet, out of design mode and pressing the button will select the chosen sheet as per the macro you recorded.

Apologies if that's oversimplified. Does that help?

Regards,

Simsy

Thanks alot Simsy thats has really helped me. You have been a Life Saver Cheers Mate


Steve

This thread is now locked and can not be replied to.

Best phone camera 2016/2017: Galaxy S7 vs iPhone 7 vs Google Pixel vs HTC 10 Evo vs OnePlus 3T vs…

1995-2015: How technology has changed the world in 20 years

Best Christmas Agency Projects of 2016

Super Mario Run preview | Hands-on first impressions of Super Mario Run: Mario's iPhone & iPad…