Value from userform to macro

  • Thread starter Thread starter Pawan
  • Start date Start date
P

Pawan

I have created one useform with a text box in it. I want the user to enter
the value in the box and that has to be used in my macro (which is in module)
for futher programming. I have renamed my textbox as 'uservl' and in the
macro i have written statement

With Cells(2, 19)
.Value = uservl.Value

End with

But tis not working. How can I do this?

Thank You

Pawan
 
You shuld reference a worksheet and need to also include the userrform

With Activesheet.Cells(2, 19)
.Value = userform1.uservl.Value

End with
 
Perfect...!

Thank a ton.. :)

Joel said:
You shuld reference a worksheet and need to also include the userrform

With Activesheet.Cells(2, 19)
.Value = userform1.uservl.Value

End with
 

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

Back
Top