p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Access VBA (http://p2p.wrox.com/forumdisplay.php?f=80)
-   -   navigate b/w worksheets with command button (http://p2p.wrox.com/showthread.php?t=40190)

sriramus March 22nd, 2006 09:07 AM

navigate b/w worksheets with command button
 
Hi All,

Can any one help me to write a vba code to navigate between worksheets with a command button.

I tried with hyperlink method but i suppose i was going wrong in writing the code.

Any help or suggestion is highly appreciated.

Thanks in advancePrivate Sub CommandButton1_Click()

    ActiveWorksheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
        "Sheet3!A1", TextToDisplay:=""
End Sub



wromee March 26th, 2006 06:40 AM

Following line in the "on click" event of your command button will take you to Sheet2. (If this is what you were looking for . . .)

Sub Button1_Click()
    Sheets("Sheet2").Select
End Sub


All times are GMT -4. The time now is 10:19 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.