Hi all, I have a worksheet that I have broken down into 50 sections, within these sections I have various unprotected cells that I need to clear.
i.e In section 1, I need to clear the range I've called C_1 which refers to =Watch!XEQ11,Watch!XEV11,Watch!XEW11,Watch!XEY11,Watch!XEZ11,Watch!XEQ14,Watch!XET14,Watch!XEU14,Watch!XEV14,Watch!XEW14,Watch!XEX14,Watch!XEQ17,Watch!XEZ16,Watch!XEY18,Watch!XEZ18,Watch!XEW27,Watch!XEY27,Watch!XEW30,Watch!XEY30,Watch!XEQ32,Watch!XEQ34,Watch!XER34,Watch!XES34,Watch!XET34,Watch!XEU34
In section 2, I need to clear the range I've called C_2 which refers to
=Watch!A1,Watch!F1,Watch!G1,Watch!I1,Watch!J1,Watch!A4,Watch!D4,Watch!E4,Watch!F4,Watch!G4,Watch!H4,Watch!A7,Watch!J6,Watch!I8,Watch!J8,Watch!G17,Watch!I17,Watch!G20,Watch!I20,Watch!A22,Watch!A24,Watch!B24,Watch!C24,Watch!D24,Watch!E24
Etc, all the way up to 50. I will be using a form button to trigger the clear contents (so I'll have 50 button, 1 per section)
So my question is, do I need 50 separate VBA codes or can I have 1 vba that references the various buttons, .....am thinking something like if the button in C_1 is triggered then it would clear range C_1 contents
i.e In section 1, I need to clear the range I've called C_1 which refers to =Watch!XEQ11,Watch!XEV11,Watch!XEW11,Watch!XEY11,Watch!XEZ11,Watch!XEQ14,Watch!XET14,Watch!XEU14,Watch!XEV14,Watch!XEW14,Watch!XEX14,Watch!XEQ17,Watch!XEZ16,Watch!XEY18,Watch!XEZ18,Watch!XEW27,Watch!XEY27,Watch!XEW30,Watch!XEY30,Watch!XEQ32,Watch!XEQ34,Watch!XER34,Watch!XES34,Watch!XET34,Watch!XEU34
In section 2, I need to clear the range I've called C_2 which refers to
=Watch!A1,Watch!F1,Watch!G1,Watch!I1,Watch!J1,Watch!A4,Watch!D4,Watch!E4,Watch!F4,Watch!G4,Watch!H4,Watch!A7,Watch!J6,Watch!I8,Watch!J8,Watch!G17,Watch!I17,Watch!G20,Watch!I20,Watch!A22,Watch!A24,Watch!B24,Watch!C24,Watch!D24,Watch!E24
Etc, all the way up to 50. I will be using a form button to trigger the clear contents (so I'll have 50 button, 1 per section)
So my question is, do I need 50 separate VBA codes or can I have 1 vba that references the various buttons, .....am thinking something like if the button in C_1 is triggered then it would clear range C_1 contents