I can't seem to figure out why this doesn't work. When I choose the drop down selection that should activate or trigger the vba code, nothing happens. I have the below code under Sheet1 which is named (2Weeks) (...right click and pasted in view code window for that sheet). That’s all the code I have… no modules. I have (General) for the Object choice and (ListBox1_Change) (which is the drop down list in cell B4), for the Procedure. B4 is a cell with a drop down list with a bunch of date ranges like these two… (08/01/2024 - 08/18/2024, 11/11/2024 - 12/01/2024). By the way, must I have a combo box instead of a list box to make this code work? The two date ranges listed above, if selected, should change to a different sheet, Sheet2, which is named 3Weeks, from the current one. And when switched to the other sheet, the user would be on cell B4 of the new sheet. The two sheet names are sheet1=2Weeks and sheet2=3Weeks. Would anyone be able to fix this or come up with a totally different code to accomplish this? Also, am I allowed to have a comma in between the dates so if the user chooses either date it triggers the vba code? Can there be more than two dates to trigger the VBA? If so, would they be separated by commas in the code?
The B4 cell drop down references L3:L23 and looks like this:
07/15/2024 - 07/31/2024
08/01/2024 - 08/18/2024
08/19/2024 - 09/01/2024
09/02/2024 - 09/15/2024
09/16/2024 - 09/29/2024
09/30/2024 - 10/13/2024
10/14/2024 - 10/27/2024
10/28/2024 - 11/10/2024
11/11/2024 - 12/01/2024
11/30/2024 - 12/13/2024
12/14/2024 - 12/31/2024 …etc.
Bookmarks