I'm having a hard time with a very simple macro I'm trying to write.
If any of you macroexpert could help me, I'd be very thankful.
Here's the deal:
I have created a form, where I'll put, inside a textbox, some data.
This data would be the name of a customer, and I need to re-write this name several times along the document.
So, I planned this macro:
Code: Select all
Sub Macro1()
dim x as string
x= Textbox1.text
msgbox x
End Sub
Well, although simple, this macro simply doesn't work.
I just can't find how to copy the content of the textbox1 (that would be the name of the customer) and link it to the variable X.
I get an error of synthax message,
Can any of you gurus spot my noob mistake?
Thank you