noobprogrammergirl
New Member
- Joined
- May 8, 2017
- Messages
- 10
I have been trying to figure out how to make this work for probably 25 hours over the past 3 days, googling and testing, reading and implementing, but I cannot for the life of me figure this out.
I am trying to create a form in Word that we can use to keep track of experiments that we do in our oncology lab.
I would expect you can do the following:
I added two option buttons that are activated mutually exclusively (you can click one or the other).
Below each option, I put a plain text content control in which scientist will describe some aspect of the chosen option.
I *WANT* to activate the plain text content control under the option button above it, if and only if the option button is activated. Or, another way about it, once a particular option button is chosen, I only want the plain text content control below that button to be available for typing and I want the other one to be inactive (cannot type inside because you didn't choose its 'associated' option).
I think I found ways to do this if I create the plain text content control *from* code in VBA. I also think I found a way to do this if, instead of plain text content control, I use a text box (just called textbox1, for example). BUT I really want to use the plain text content control rather than a text box. I figure I should be able to use code to inactivate that plain text content control that I inserted using the UI on the developer tab. However, I cannot figure out how to identify (call? designate? point to?) the UI-inserted plain text content control in VBA code so that I can say:
if optionbutton1.enabled = true then
'that plain textCC*'.enabled = true
else
'same plain textCC as above'.enabled = false
* the particular plain text content control that I added via the UI... it has a tag (i.e. "plaintext1", but cant figure out how to call it by its tag either.
I am such a noob that I really dont understand any of the error messages at all... I am always getting compile errors and variable not defined and Identifier under cursor is not recognized because I cant seem to use the right code to refer to that plain text content control.
Can I do what I am asking or is it impossible and I wasted all these hours trying to do something that cant be done and I need to kill the OCD craziness inside me and force myself to use a text box or code the plain text content control directly from VBA?
Thank you for humoring me. Cheers!
I am trying to create a form in Word that we can use to keep track of experiments that we do in our oncology lab.
I would expect you can do the following:
I added two option buttons that are activated mutually exclusively (you can click one or the other).
Below each option, I put a plain text content control in which scientist will describe some aspect of the chosen option.
I *WANT* to activate the plain text content control under the option button above it, if and only if the option button is activated. Or, another way about it, once a particular option button is chosen, I only want the plain text content control below that button to be available for typing and I want the other one to be inactive (cannot type inside because you didn't choose its 'associated' option).
I think I found ways to do this if I create the plain text content control *from* code in VBA. I also think I found a way to do this if, instead of plain text content control, I use a text box (just called textbox1, for example). BUT I really want to use the plain text content control rather than a text box. I figure I should be able to use code to inactivate that plain text content control that I inserted using the UI on the developer tab. However, I cannot figure out how to identify (call? designate? point to?) the UI-inserted plain text content control in VBA code so that I can say:
if optionbutton1.enabled = true then
'that plain textCC*'.enabled = true
else
'same plain textCC as above'.enabled = false
* the particular plain text content control that I added via the UI... it has a tag (i.e. "plaintext1", but cant figure out how to call it by its tag either.
I am such a noob that I really dont understand any of the error messages at all... I am always getting compile errors and variable not defined and Identifier under cursor is not recognized because I cant seem to use the right code to refer to that plain text content control.
Can I do what I am asking or is it impossible and I wasted all these hours trying to do something that cant be done and I need to kill the OCD craziness inside me and force myself to use a text box or code the plain text content control directly from VBA?
Thank you for humoring me. Cheers!