A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
With my lack of knowledge using the commands/functions listed below, I am guessing that each "Case" has the name of each textbox. If that is true, is there a different way to write the code that can loop through each renamed textbox, checking to see if there is data in each and updating the worksheet if there is data.
I don't understand.
Ctl.Name returns the name of the control. If you know the name is "txtMyDate" you know that is the textbox that should contain your date.
In this case you can check if the content of the textbox (which is a string) can be converted into a real date (using CDate) and write the real date into the sheet. In this case "see if there is data" makes sense.
If the name of the textbox is "txtMyDescription" you know that is the description. In this case "see if there is data" makes no sense. If I want to remove the description from the sheet I would leave the textbox empty...
Using a loop is the right way, because it reduces the code a lot.
Take a look into this file:
https://www.dropbox.com/s/x0o1wazwtfo4fcm/Simple_Userform.xlsm?dl=1
As you can see, there are many ways to solve the problem, it's just up to your imagination.
Andreas.