Hi,
I have a relatively simple macro that does exactly what I want it to, its for a checklist at work we use to track orders until completion, when complete, we "gray" out the cells and clear the formatting in that row (A3-W3), keeping only the dates for reference. There's a ton of conditional formatting to clear, so I use the clear function across the entire range of cells then reformat the dates. Here's the macro then the problem I need a solution to.
Sub finished_1()
If MsgBox("Are you sure?", vbYesNo) = vbNo Then Exit Sub
Worksheets("December").Range("A3:W3").ClearFormats
Range("B3").NumberFormat = "mm/dd/yy"
Range("L3").NumberFormat = "mm/dd/yy"
Range("S3:T3").NumberFormat = "mm/dd/yy"
Range("A3:W3").Interior.ColorIndex = 16
End Sub
So, I inserted a button to click to execute the macro. Here's the problem, there are 200 rows per month and twelve sheets, one for each month, which leads to 2400 buttons and macros, yikes. I need a better way!
My thought, instead of a button, I have a free cell in each row where the button is, is there a way I can type some text like "run" in that cell and have that text execute a macro for that row? The macro would need to identify the row I'm in based on the row I'm typing in, if this is possible I could have 1 macro instead of 2400. I like the button but don't see any way to use it and have the macro know which row the button is referencing.
Anyway, I'm open to suggestions, I want it to run all the same commands just have one macro for any row or at most 12 macros since each month may need it own.
Thanks for any help. BTW, I've already inserted 300 macro's and said, Ugh, there has got to be a better way
Mickey