View Single Post
 
Old 12-02-2021, 02:34 PM
garydp garydp is offline Windows 10 Office 2019
Novice
 
Join Date: Dec 2021
Posts: 2
garydp is on a distinguished road
Default Run VBA code when text box value changes

I am trying to run some VBA code within an active document. I have placed two text boxes on the document and want one to be populated with a specific value when the other is populated. this is just a trial and two boxes wont be used.

i have tried

If textbox1.value > 100 then
textbox2.value = "In spec"
elseif textbox1.value < 100 then
textbox2.value = "Out of spec"
end if

i dont know how to get this to run when textbox1 is populated on the active word document.

when i select this document in project then document i dont know what decleration will make the code run. i tried contentcontrolonenter but that didnt work

any help will be appreciated.
Reply With Quote