View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Harald Staff[_2_] Harald Staff[_2_] is offline
external usenet poster
 
Posts: 449
Default Using Popups to select a range of cells.

Sure. Put two Refedit controls onto a userform.

http://www.contextures.com/xlUserForm01.html

Note that a range can be nothing, one cell, or multiple cells, your VBA must
decide what to do if multiple cells are selected.

Best wishes Harald


"Colin Hayes" wrote in message
...

HI Harald

Thank you very much for you help.

It's not quite what I needed though , unfortunately. I need to input two
cells (e.g. Popup 1 - A1 , Popup 2 - A30000) and for them to be selected
with me not having to visit both with the mouse.

Is this possible?

Best Wishes



In article , Harald Staff
writes
Sub test()
Dim Rng As Range
On Error Resume Next
Set Rng = Application.InputBox("Select your range", _
"Mousework", Type:=8)
On Error GoTo 0
If Rng Is Nothing Then Exit Sub
MsgBox Rng.Address
End Sub


HTH. Best wishes Harald


"Colin Hayes" wrote in message
...

Hi All

I have a small request for help with code.

I need a macro to have popups request the first and last cells in a
range
, and then to select them.

Can someone help?