Get the returned value of an InputBox into UserForm text box

julhs

Active Member
Joined
Dec 3, 2018
Messages
471
Office Version
  1. 2010
Platform
  1. Windows
I hope this is not too much of a simplistic question!
From a USER FORM I trigger an InputBox to select a range.
Question is: HOW do I return the InputBox value/result back to a TEXTBOX on the UserForm.
So far!! I’ve got to returning the InputBox value/result to a cell on the sheet, so when the UserForm is “Initialised” a text box on the UserForm that displays the value of that given cell.

BUT I want to try and find a way to short circuit that, so that I can get the InputBox value/result (that is returned) directly into a text box on the ACTIVE UserForm.
The InputBox routine is in the main code of the UserForm (so called from a cmd button on the UserForm)

So in my overly simplistic logic; I should be able to return the InputBox value directly back to the ACTIVE UserForm text box!!!!!!
I’m NOT about asking for a solution code, rather the method to return InPutBox to text box on the UserForm, otherwise before you know it I’ll be back asking for further assistance to modify things!!!
The learning curve is the key aspect; BUT when you forget 50% of what you MIGHT have learnt; it make life difficult!!!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
PS; if it makes a difference we are dealing with the Active UserForm on the Active WorkSheet at the time
 
Upvote 0
Thank you.
Had hit upon “RefEdit” in searches, but attempting to apply it didn’t seem to get INTO the UserForm txtbox the outcome of the InputBox returned value.
Now, in no way does that mean I can’t use “RefEdit”, MOST likely is I haven’t structured the code correctly.
I WILL test again the use of “RefEdit”, but for now is there anything else I may need to look at?

Just notice slight difference in your remark to “RefEdit” compared to how/where I’ve tested its use, so the suggestion is that I need to look again at “RefEdit”??
I'll have to change my code and come back to you.
 
Upvote 0
Had a look at that link.
The line below in "ReFEdit Irregularities" section
“RefEdits must not be used on modeless forms. RefEdits on modeless forms will result in bizarre Excel crashes.”

Utlimatly means RefEdits is not going to be an option for me as my UserForm is Modeless.
So for now I’ve left off my initial idea and currently testing a different approach.
Thanks for the link though
 
Upvote 0

Forum statistics

Threads
1,223,713
Messages
6,174,036
Members
452,542
Latest member
Bricklin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top