ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Value from userform to macro (https://www.excelbanter.com/excel-programming/416055-value-userform-macro.html)

Pawan

Value from userform to macro
 
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

joel

Value from userform to macro
 
You shuld reference a worksheet and need to also include the userrform

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

End with


"Pawan" wrote:

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


Pawan

Value from userform to macro
 
Perfect...!

Thank a ton.. :)

"Joel" wrote:

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

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

End with


"Pawan" wrote:

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



All times are GMT +1. The time now is 07:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com