![]() |
User to choose an item from a list
Hi,
I want to offer user with a window containing names of the months in a year seperately on each line. The user would choose one of the 12 and press something like ok and I want the month chosen by the user to be stored in a variable in my code. If I can get some skeleton code for similar situation I can try to customise this for my requirements. Please guide me as to how I may achieve the same. Regards, HP India |
User to choose an item from a list
Create a list of month names somewhere in your workbook, and name it
(InsertNameDefine...) say Months. Then use Data Validation (DataValidation) with a type of list and a value of =Months. -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Hari" wrote in message oups.com... Hi, I want to offer user with a window containing names of the months in a year seperately on each line. The user would choose one of the 12 and press something like ok and I want the month chosen by the user to be stored in a variable in my code. If I can get some skeleton code for similar situation I can try to customise this for my requirements. Please guide me as to how I may achieve the same. Regards, HP India |
User to choose an item from a list
Bob,
Thanks for the response. Iam aware of this feature of Data validation using Named ranges. Actually am writing some code to produce some reports and in the midst of it I need to prompt the user about the month for which the report needs to be generated. I want to avoid user entering his options in the workbook itself. Rather I want this to be done at run-time of the code. Hence, my request to offer user a window and once chosen, store user's response in a variable. Please guide me for the same. regards, HP India Bob Phillips wrote: Create a list of month names somewhere in your workbook, and name it (InsertNameDefine...) say Months. Then use Data Validation (DataValidation) with a type of list and a value of =Months. -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Hari" wrote in message oups.com... Hi, I want to offer user with a window containing names of the months in a year seperately on each line. The user would choose one of the 12 and press something like ok and I want the month chosen by the user to be stored in a variable in my code. If I can get some skeleton code for similar situation I can try to customise this for my requirements. Please guide me as to how I may achieve the same. Regards, HP India |
User to choose an item from a list
Ardus,
Thanks for your code. It works really great. I hope to use this technique for my other requirements as well. Regards, HP India |
All times are GMT +1. The time now is 02:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com