Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 22nd, 2006, 09:07 AM
Registered User
Join Date: Nov 2005
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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

  #2 (permalink)  
Old March 26th, 2006, 06:40 AM
Registered User
Join Date: Mar 2006
Location: Sydney, NSW, Australia.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

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()
End Sub

Similar Threads
Thread Thread Starter Forum Replies Last Post
'Hidden' Command Button David Mulvey Word VBA 0 January 9th, 2007 11:21 PM
Assigning Command Button to Query young20 Access VBA 1 November 6th, 2006 12:15 PM
Command Button Question eoghang Excel VBA 2 September 25th, 2006 08:33 PM
command button qry mohiddin52 Access 0 December 22nd, 2003 08:20 AM

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