![]() |
Dialog Box Query
Where on the web can I obtain sample codes for a Dialog Box I wish to create
that will give 2 options, both of which, once clicked will bring me to tow separate areas of my worksheet. I'm a novice at coding so hence the request for some sample ones which I can tailor for my needs Rgds |
Dialog Box Query
http://www.microsoft.com/ExcelDev/Articles/sxs11pt1.htm
Lesson 11: Creating a Custom Form Excerpted from Microsoft® Excel 97 Visual Basic® Step by Step. http://j-walk.com/ss/excel/tips/tip84.htm Peter Aiken Articles: Part I http://msdn.microsoft.com/library/en...FormsPartI.asp Part II http://msdn.microsoft.com/library/en...ormsPartII.asp Private Sub OptionButton1_Click() if optionbutton1.Value then Application.GoTo Reference:=worksheets("sheet2").range("B9"), _ Scroll:=True end if End Sub Private Sub OptionButton2_Click() if optionbutton1.Value then Application.GoTo Reference:=worksheets("sheet3").range("Z21"), _ Scroll:=True end if End Sub -- Regards, Tom Ogilvy "John" wrote in message ... Where on the web can I obtain sample codes for a Dialog Box I wish to create that will give 2 options, both of which, once clicked will bring me to tow separate areas of my worksheet. I'm a novice at coding so hence the request for some sample ones which I can tailor for my needs Rgds |
Dialog Box Query
Create a dialog box in VB Editor with Insert, UserForm. Add a couple of
buttons from the toolbox that sits beside it. Double-click on one of the buttons: it takes you to the userform's class module and a special macro with the name of the button underscore "Click". The kind of code you need is: Range("A2:B5").Select (for the active sheet), preceded by Worksheets("Sheet2").Activate to go to another sheet first, or Range ("named range").Select In an ordinary macro module, create a macro to run the userform with a line like: Userform1.Show Good luck! "John" wrote: Where on the web can I obtain sample codes for a Dialog Box I wish to create that will give 2 options, both of which, once clicked will bring me to tow separate areas of my worksheet. I'm a novice at coding so hence the request for some sample ones which I can tailor for my needs Rgds |
All times are GMT +1. The time now is 12:01 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com