View Full Version : Sleeper: Select range
excelliot
07-13-2005, 11:24 PM
hi
im writing one macro
wher user provides range manually, but i observed that they makes mistake in specifying range
so any vba code wher user can select range by cursor as input & after that specify two different ranges say range a for one data output and say range b for other data output
thanks in advance:beerchug:
BlueCactus
07-13-2005, 11:35 PM
If you're in a form you could use a RefEdit control.
excelliot
07-14-2005, 03:39 AM
If you're in a form you could use a RefEdit control.
No im using just VBA macro wiyhout form.
Bob Phillips
07-14-2005, 03:42 AM
No im using just VBA macro wiyhout form.
Then use an application inputbox with a type of 8
Dim rng as Range
Set rng = Application.Inputbox("Select the target range with the mouse", Type:=8)
alimcpill
07-15-2005, 06:01 AM
Yegads!!! If only I'd known 3 years ago about this 'type' parameter!!!
I've been writing excel vba for years but i've always just used Inputbox(...) and not Application.Inputbox(...), the first is a member of VBA.Interaction and doesn't let you specify type, so i've always had a hard time getting the user to specify a range. It never even occured to me that excel might offer its own inputbox so you can specify the return type!
Am I alone in this folly or has anyone made this mistake??
sheeeng
07-15-2005, 08:17 AM
Then use an application inputbox with a type of 8
Dim rng as Range
Set rng = Application.Inputbox("Select the target range with the mouse", Type:=8)
How to use Type?:doh:
Bob Phillips
07-15-2005, 09:54 AM
How to use Type?:doh:
In VBA, there is a useful function called Help :devil:
sheeeng
07-16-2005, 08:55 AM
In VBA, there is a useful function called Help :devil:
Sorry, thanks. :friends:
I have a look to it later...
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.