hugocarvalho
New Member
- Joined
- Oct 6, 2015
- Messages
- 2
Hello!
I have a database for years from 2005-2020 with value.
I created an Userform with check boxes. 15 check boxes each one is a year date. (This is my starting point)
What I need if possible
If I tick 2007,2008,2015,2019 for example
I would like that when I press a "Ok" button in the Userform, the macro runs for 2007 and then after for 2008,2015 and 2019.
For all box checked previously.
"
When user press OK, IF 2007, 2008, 2010, etc are selected then,
If Checkbox1.Value = True Then
YearWanted = 2007
Range("G1").Value = YearWanted
Run ("Macro109")
If Checkbox4.Value = True Then
YearWanted = 2010
Range("G1").Value = YearWanted
Run ("Macro109")
etc
"
and then after continue with all previous box checked by the user.
I cant figured it out the fact to store all checked box and run each one after when I click the button OK in the same userform
Thank you very much!
I have a database for years from 2005-2020 with value.
I created an Userform with check boxes. 15 check boxes each one is a year date. (This is my starting point)
What I need if possible
If I tick 2007,2008,2015,2019 for example
I would like that when I press a "Ok" button in the Userform, the macro runs for 2007 and then after for 2008,2015 and 2019.
For all box checked previously.
"
When user press OK, IF 2007, 2008, 2010, etc are selected then,
If Checkbox1.Value = True Then
YearWanted = 2007
Range("G1").Value = YearWanted
Run ("Macro109")
If Checkbox4.Value = True Then
YearWanted = 2010
Range("G1").Value = YearWanted
Run ("Macro109")
etc
"
and then after continue with all previous box checked by the user.
I cant figured it out the fact to store all checked box and run each one after when I click the button OK in the same userform
Thank you very much!
