I'm a bit of a newbie with Excel VBA but by reading this forum and scouring the internet for example code, I have managed to put together a multipage userform to collect user inputted data and transfer it to a worksheet. The worksheet data is then auto transferred to a Word template to form a report.
So, Userform1 has multiple named textboxes, eg Textbox71obs, Textbox72obs etc. Each of these textboxes has a default value of "None".
If a user clicks into any of these textboxes, if the textbox value is "None", then that value disappears and the user can enter their own text. If it's anything other than "None" then the user can still enter the textbox to amend but the original text remains, as planned.
The following code, which I cobbled together from various internet searches works fine for any textbox on the form, except for the textboxes which are contained within a frame.
VBA for the Userform1
Code for Class Module
In the cases of textboxes within a frame, I get a run time error 438 - object doesnt support this property or method at this line of the class module:
I'm guessing that its something to do with the 'ActiveControl.value' not relating to a textbox in a frame, but i havent been able to source a solution to rework this line of the code, as yet.
Any help appreciated!
Thanks
Bookmarks