Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA / Excel .... put text-box value into cell

Status
Not open for further replies.

rickgalty

Programmer
Nov 10, 2005
32
US
Hi, if I write a quick pop-up form in VBA, how do I then move a string value from a text-box on the form to a cell on the Excel workbook?

Richard
 
Hi there Richard,

If you have just a message box ...

Dim Msg as vbmsgboxresult
Msg = Msgbox("Enter value:")
If Msg <> "" then Range("A1").value = Msg

.. if you have a userform, use the event/objects code ...

Range("A1").value = Me.TextBox1.Value

Replace the range/object for your specific situation.

HTH

Regards,
Zack Barresse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top