Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have set up a user form which has command buttons to open various worksheets in my workbook. However, I want each worksheet to have a button to take the user back to the user form; is there a way I could do this? Many thanks, Discovery -- Discovery ------------------------------------------------------------------------ Discovery's Profile: http://www.excelforum.com/member.php...o&userid=25859 View this thread: http://www.excelforum.com/showthread...hreadid=392433 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sure. All you need for code is
UserForm1.Show (or whatever the name of your form is) I would also suggest to you that it might be worth putting a button to do this on the toolbar (CommandBarButton object): This way one button serves all sheets, and the buttons will not take up space on your worksheets. -- - K Dales "Discovery" wrote: I have set up a user form which has command buttons to open various worksheets in my workbook. However, I want each worksheet to have a button to take the user back to the user form; is there a way I could do this? Many thanks, Discovery -- Discovery ------------------------------------------------------------------------ Discovery's Profile: http://www.excelforum.com/member.php...o&userid=25859 View this thread: http://www.excelforum.com/showthread...hreadid=392433 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() But how can I put the code in the worksheet? Thanks, Discovery -- Discovery ------------------------------------------------------------------------ Discovery's Profile: http://www.excelforum.com/member.php...o&userid=25859 View this thread: http://www.excelforum.com/showthread...hreadid=392433 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() But how can I put the code in the worksheet? Thanks, Discovery -- Discovery ------------------------------------------------------------------------ Discovery's Profile: http://www.excelforum.com/member.php...o&userid=25859 View this thread: http://www.excelforum.com/showthread...hreadid=392433 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The easy way is to put a commandbutton from the Forms toolbar onto every
sheet where you would like it to function. When it asks you to specify the macro choose "New..." and you can type the code in the button's _Click procedure. The other method, using a single toolbar button, is to insert a module and add the code in a Public Sub, e.g: Public Sub ShowMyForm() UserForm1.Show End Sub Then right-click somewhere on your toolbar. Choose "Customize" and in the dialog go to the tab that says "Commands." If you choose Macros in the Categories List you will see on the right an option for "Custom Button" (smiley face). Drag the smiley onto your toolbar, then (with the Customize dialog still showing) right-click the smiley and choose "Assign Macro..." - here you should be able to see your ShowMyForm macro in the list, so assign it to the button. Then whenever the user presses that button the UserForm should show allowing the selection of another sheet. You can customize this option even further but this should be enough to at least get you going, I hope. -- - K Dales "Discovery" wrote: But how can I put the code in the worksheet? Thanks, Discovery -- Discovery ------------------------------------------------------------------------ Discovery's Profile: http://www.excelforum.com/member.php...o&userid=25859 View this thread: http://www.excelforum.com/showthread...hreadid=392433 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Thank you ever so much for your help. I will definately try that out. I think the first method sounds easiest! Discovery -- Discovery ------------------------------------------------------------------------ Discovery's Profile: http://www.excelforum.com/member.php...o&userid=25859 View this thread: http://www.excelforum.com/showthread...hreadid=392433 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I fill a cell in a user form from a selection on same form? | Excel Discussion (Misc queries) | |||
User form | New Users to Excel | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming | |||
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form | Excel Programming |