ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Have macro force user to selecat a value (https://www.excelbanter.com/excel-programming/431191-have-macro-force-user-selecat-value.html)

Pluggie

Have macro force user to selecat a value
 
Part of my macro now has this line.

Range("D2").FormulaR1C1 = "CTR"

It enters the value "CTR" in a cell.

Now I need to modify it, so that it opens up a box in which the user can
select a value from a list of 3 options.

How do I do this?
What code do I need?

Atishoo

Have macro force user to selecat a value
 
I would create a user form with a combo or list box with your options in it.
triger it with userform1.show and give it an "Apply" button to insert the
value and close the userform.

"Pluggie" wrote:

Part of my macro now has this line.

Range("D2").FormulaR1C1 = "CTR"

It enters the value "CTR" in a cell.

Now I need to modify it, so that it opens up a box in which the user can
select a value from a list of 3 options.

How do I do this?
What code do I need?


Pluggie

Have macro force user to selecat a value
 
Works like a charm. Thanks... I used two userforms already...

"Atishoo" wrote:

I would create a user form with a combo or list box with your options in it.
triger it with userform1.show and give it an "Apply" button to insert the
value and close the userform.

"Pluggie" wrote:

Part of my macro now has this line.

Range("D2").FormulaR1C1 = "CTR"

It enters the value "CTR" in a cell.

Now I need to modify it, so that it opens up a box in which the user can
select a value from a list of 3 options.

How do I do this?
What code do I need?



All times are GMT +1. The time now is 01:53 AM.

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