VBA input box MSG

  • Thread starter Thread starter Adrix
  • Start date Start date
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
 
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.
 
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
 
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.
 

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

Back
Top