PDA

View Full Version : Creating a official form in Excel using VBA!!



SamoZain
10-24-2017, 02:44 PM
Hi Experts!
I would like to use VBA within the sheet to the following:

if the user choose Cell C7 (major choices / Choice 1) then it will appear "X" in it
and then the raw 28 will appear (SubChoice 1).

Then after the raw 28 appears if the users chooses Cell C28 ("X" will appear in it) but then he can't choose cell E28, and in the same way if he chooses E28 ("X" will appear in it) and he can't choose C28. ( it is kind of the logic choice if yes it can't be no at the same time!).

I20737 already wrote it but there is so many Cells and though the Macro will be so big if we repeat it (The sheet is massive and can't be divided. So I would like to put it in a Loop (kind of) Or may be to use Ranges like from Raw 28 till 38 if I choose a cell in cl 3 ("X" will appear) then I can't choose cells in cl 5 (same raw). Any suggestion?

offthelip
10-24-2017, 03:13 PM
I am not very clear what you want to do but I think you can probably do what you want by using "Form Control" and /or "Active X " controls
I have modified you spreadsheet to add a copule of form controls ( buttons) click one of them ( "Choice 1") and a couple of ACtivce X command buttons appear. If you click one of the command buttons the other one disappears ( which prevents selecting "Yes" and "No"

If you the click "Choice2" you get a different set of command buttons.

SamoZain
10-26-2017, 12:30 PM
Thanx A lot for that. This is exactly what I needed (as an idea) Now I can adjust the code to fit my purposes