Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default 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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 336
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
How to delete the "Insert Function Dialog Box" (dialog box only)? TBI''d biker Excel Worksheet Functions 2 April 7th 07 09:18 PM
Disable Query Refresh warning dialog box in Excel 2003 Jeff Koons Excel Discussion (Misc queries) 2 December 1st 05 04:08 PM
control of dialog macro dialog box. on open Gerry Abbott Excel Programming 0 July 22nd 04 05:41 PM
Dialog Query gORDON Excel Programming 2 January 11th 04 04:56 PM


All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"