writing from inputbox to textbox

bmacias

Board Regular
Joined
Sep 11, 2002
Messages
210
Hi all,

For the life of me I can get this to work. It gives me and "object required" error on the second line. All I'm trying to do is get the name of the person who the fax will be sent to via an input box and paste the information unto a text box that resides on my worksheet.

Please help.

Sub angie()
Dim danny As String

danny = InputBox("Who is the fax for?", "titulo", "Alexis")
TextBox1.Value = danny

End Sub
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
how about including your sheet name where your textbox is;

something like;
Code:
sheets("yoursheetnamehere").TextBox1.Value = danny
 

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Try:

Code:
ActiveSheet.TextBox1.Value = danny

HTH,

Smitty
 

Forum statistics

Threads
1,141,626
Messages
5,707,489
Members
421,510
Latest member
haroonstr

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
Top