Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 97
Default How do you do a range selection dialog like those many in Excel?

Hi all,

I want to select some range dynamically, including multiple selection,
via showing a range selection dialog...

Hopefully there are some dialog functions that I can use...

How to do that in VBA?

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
external usenet poster
 
Posts: 772
Default How do you do a range selection dialog like those many in Excel?

There is a RefEdit control for the toolbar, add it if you don't have it
already by selecting More Controls (hammer and wrench icon) and select
RefEdit. You need to have a userform up to do this in VB, right click on your
project and add Userform, the toolbox will appear.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"LunaMoon" wrote:

Hi all,

I want to select some range dynamically, including multiple selection,
via showing a range selection dialog...

Hopefully there are some dialog functions that I can use...

How to do that in VBA?

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.misc,microsoft.public.excel.programming,microsoft.public.excel
XP XP is offline
external usenet poster
 
Posts: 389
Default How do you do a range selection dialog like those many in Excel?

Another way; this just uses an input box...

Copy the following into a standard code module and run the first one (you
will need to correct for line wrap):

Sub TESTIT()

Dim sAddress As String
sAddress = InputBoxRange

MsgBox "The selection was: " & sAddress

End Sub


Public Function InputBoxRange() As String
Dim rngResponse As Range
Dim strMsg As String
Dim intConfirm As Integer
On Error Resume Next
Do
Set rngResponse = Application.InputBox("Type or select a range of
cells:", "RANGE VALIDATION", Selection.Address, , , , , 8)
If Err.Number < 0 Then Err.Clear: End
rngResponse.Select
intConfirm = MsgBox("Is the following selection correct?" & vbCr & vbCr
& rngResponse.Address, vbQuestion + vbYesNo, "CONFIRM SELECTION")
If intConfirm = 6 Then Exit Do 'YES
Loop
InputBoxRange = rngResponse.Address
End Function


"LunaMoon" wrote:

Hi all,

I want to select some range dynamically, including multiple selection,
via showing a range selection dialog...

Hopefully there are some dialog functions that I can use...

How to do that in VBA?

Thanks!

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
dialog box selection type ORLANDO VAZQUEZ[_2_] Excel Discussion (Misc queries) 1 September 30th 09 08:24 PM
How do you do a range selection dialog like those many in Excel? LunaMoon Excel Discussion (Misc queries) 2 July 31st 08 04:22 PM
The file association dialog won't allow selection of Excel juancarlos1688 Setting up and Configuration of Excel 2 April 8th 08 08:06 AM
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. jonH Excel Programming 3 June 7th 04 09:13 PM
Dialog Box Confirmation Selection Annie[_2_] Excel Programming 1 August 24th 03 02:49 PM


All times are GMT +1. The time now is 06:35 AM.

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

About Us

"It's about Microsoft Excel"