how to get the value of a text box in a sub or function

G

Gerardo

how to get the value of a text box in a sub or function (Not a private sub or
function)
without usirn UserForms
 
J

Jim Thomlinson

Depends on the type of text box you are using. If the text box is from the
controls toolbox and is embeded in a sheet then something like this will
do...

msgbox Sheet1.Textbox1.Text
 
R

RB Smissaert

Not 100% sure what you mean with: without using UserForms.
If the form is loaded:

Sub Test()
Msgbox Form1.Textbox1.Text
End Sub


RBS
 

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

Top