LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Prompt user to select a range


Hi Aaron,

The code snippet you can use to do such a thing is:

Private Sub CmdOK_Click()

Dim r As Range
On Error Resume Next
Set r = Range(RefEdit1.Value)
If Err.Number < 0 Then
MsgBox "wrong value for range", vbCritical, "Wrong Range"
End If
On Error GoTo 0
End Sub

Once the range is set, it can be used further in the macro.



"Incidental" wrote:

Hi Aaron

You could use the refedit control, it should work for what your
after. To use it you will need to add it to your toolbox you can do
this by right clicking the userform toolbox selecting additional
controls and then finding RefEdit.Ctrl and checking it. Then select
the tool and place it on your userform, it works just like the goal
seek selection method.

Hope this helps

Steve


 
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
Prompt user to select a shape MM User Excel Programming 5 August 19th 08 02:05 PM
How to Prompt a user to select a Folder. Akash Excel Programming 3 July 5th 07 05:02 PM
Prompt user to select directory Dan R. Excel Programming 3 March 2nd 07 07:22 PM
Prompt user to select a printer using a checkbox within a user Tom Ogilvy Excel Programming 0 January 10th 07 03:57 AM
how do I prompt the user to select a cell? [email protected] Excel Programming 1 December 19th 06 11:42 PM


All times are GMT +1. The time now is 05:43 PM.

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"