Using Popups to select a range of cells.

C

Colin Hayes

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?
 
H

Harald Staff

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
 
C

Colin Hayes

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
 
C

Colin Hayes

Harald Staff said:
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

Hi Harald

OK Thanks. Too technical for me I'm afraid,. I imagined it would be more
straightforward. Anyway , thanks for your help.

Best wishes.




Are you aware that we also buy CDs, Vinyl and DVDs? Send your lists of
unwanted items to (e-mail address removed) and we’ll quote you a price…


You can browse and buy direct from my full list of items at these addresses :

http://s1.amazon.co.uk/exec/varzea/ts/my-zshop/SPJK3X6KOJZR6/026-3393902-9
050050

or:

http://www.CDandVinyl.co.uk

or :

http://www.netsoundsmusic.com/cdandvinyl

or:

http://chayes.musicstack.com



To DOWNLOAD the full catalogue click here :


http://www.chayes.demon.co.uk/CDandVinyl_full_catalogue.exe



Best Wishes ,

Colin Hayes.



TEL / FAX : (UK) (0)208 804 9181
 
H

Harald Staff

Colin Hayes said:
OK Thanks. Too technical for me I'm afraid,. I imagined it would be more
straightforward. Anyway , thanks for your help.

Best wishes.

The easier to use, the harder to build. The most intuitive user interfaces
are extremely complex under the hood. But I urge you to spend a couple of
hours and give this a try, everything is easy once you know how to.

Best wishes Harald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top