VBA input box MSG

A

Adrix

HI,

I would like to ask the user to insert a address in a msgb box, but
that inputbox should allow the user to drag the address directely in
the excel sheet . Just like when we are entering a formula and appear
that button in right side of the input formula box.

if it is possible mail me the answer.

thank you in advance

Adri
 
T

Tom Ogilvy

dim rng as Range
On error resume Next
set rng = application.InputBox("use mouse to select range", type:=8)
On Error goto 0
if not rng is nothing then
msgbox rng.Address & " was selected"
else
msgbox "You clicked cancel"
End if

Post it here, read it here.
 
C

chris: forgot 'end if'

Function IsAlpha(x) As Boolea
Dim y As Long, z As Lon
y = Len(x
For z = 1 To
If Mid(x, z, 1) Like "[0-9]" The
IsAlpha = Fals
Exit Functio
End If <<<<<<<<
Nex
IsAlpha = Tru
End Functio
 
B

Bob Phillips

Note that this allows you to select a range, whose dares is loaded into the
InputBox, there is no drag and drop needed (better IMO),

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Tom Ogilvy said:
dim rng as Range
On error resume Next
set rng = application.InputBox("use mouse to select range", type:=8)
On Error goto 0
if not rng is nothing then
msgbox rng.Address & " was selected"
else
msgbox "You clicked cancel"
End if

Post it here, read it here.
 
Top