I'm extremely new to macros and VBA for excel. With that said I'm excited about the functionality they can offer.
I have a complicated (for me) question to ask.
I have a workbook with 3 worksheets. One is labeled "main" and is being used as the main input source. The other two worksheets are hidden (they contain the forms that need completed depending on what checkbox is selected).
In the main worksheet I have columns A B C D and rows 1-6.
The first column is designated for data input (customer's name) and B, C, & D are for products a customer can select.
The rows are designated for Customer Name (data text input) and the columns designated for products. I have a check box in column B (not linked to cell) and when i click/check it, (because the product was selected) a macro unhides the sheet and if clicked on again/unchecked the sheet hides again.
Sub Checkbox1_Click()
Sheets("Product1").Visible = Not Sheets("Product1").Visible
End Sub
However, if I also place a check box below it for the next person, obviously the same code will do the opposite of what the first one did. (Click in the first one, check and it unhides. Click in the second check box and it hides again.)
I need to be able to Click/Check the first one and if I have to check another check box because the next person selects the same product, I need it to not change the visibility/unvisibility of the sheet.
The checkboxes need to remain independent of each other because one customer may not want what the other one wants, but each "click to checkmark" should validate if any of the other checkmarks are checked and if not unhide the sheet and if another one already is, simply bypass the hide sheet coding.
Much thanks
I have a complicated (for me) question to ask.
I have a workbook with 3 worksheets. One is labeled "main" and is being used as the main input source. The other two worksheets are hidden (they contain the forms that need completed depending on what checkbox is selected).
In the main worksheet I have columns A B C D and rows 1-6.
The first column is designated for data input (customer's name) and B, C, & D are for products a customer can select.
The rows are designated for Customer Name (data text input) and the columns designated for products. I have a check box in column B (not linked to cell) and when i click/check it, (because the product was selected) a macro unhides the sheet and if clicked on again/unchecked the sheet hides again.
Sub Checkbox1_Click()
Sheets("Product1").Visible = Not Sheets("Product1").Visible
End Sub
However, if I also place a check box below it for the next person, obviously the same code will do the opposite of what the first one did. (Click in the first one, check and it unhides. Click in the second check box and it hides again.)
I need to be able to Click/Check the first one and if I have to check another check box because the next person selects the same product, I need it to not change the visibility/unvisibility of the sheet.
The checkboxes need to remain independent of each other because one customer may not want what the other one wants, but each "click to checkmark" should validate if any of the other checkmarks are checked and if not unhide the sheet and if another one already is, simply bypass the hide sheet coding.
Much thanks