TextBox and InputBox

  • Thread starter Thread starter Dennis Chou
  • Start date Start date
D

Dennis Chou

How can I get a textbox to display the range selected in an input box?

for example, if the user selects range a1 in an inputbox, i'd like the
textbox to display the range "=a1"
 
I'm guessing you used the Application InputBox with a type=8 in order to
return a range object. Since it is a range that is returned, you can just
specify its address and concatenate the equal sign to the front of it...

TextBox1.Value = "=" & Application.InputBox("What is the range?", _
"Get Range", , , , , , 8).Address
 
Thanks, that worked
Rick Rothstein said:
I'm guessing you used the Application InputBox with a type=8 in order to
return a range object. Since it is a range that is returned, you can just
specify its address and concatenate the equal sign to the front of it...

TextBox1.Value = "=" & Application.InputBox("What is the range?", _
"Get Range", , , , , , 8).Address
 
Back
Top