Forum Discussion
Microsoft Forms error after update.
It appears the problem is that it cannot find "DTPStartTime" (and I think you will have the same problem for "DTPEndTime"). Normally, these would be either property procedures or public module level variables within the form's code module and would be initialized/set by the procedure that creates the form (or maybe in a class initialization procedure that was deleted). In this case, it appears they reference a worksheet range that contains the values.
I'm guessing they've been deleted. If you have an older version of your file available, I would look at it to see what it was doing for the start and end times.
Edit: I attached an example of a userform using public property procedures to set/get a range variable and one that uses public variables. Look at the code in Sheet1 module to see how it is setting those properties before showing the form and then in the userform modules to see how it is storing the ranges that passed to the property procedures. But, these are a simple example, I don't know if your original file was doing anything to validate the information or use it for something else.
- IvanGVibraJun 10, 2021Copper Contributor
No luck with different files. I even commented those lines out and uncommented where they are set equal to specific dates and that didn't work.
- JMB17Jun 10, 2021Bronze ContributorSorry, even though you mentioned the error was in the initialize procedure, I overlooked that procedure. It's more likely that DTPStartTime and DTPEndTime refer to controls on the userform itself. When looking at the userform, open the properties window (view/properties window) and then click on the start/end time controls and see if the name has been changed (assuming those controls exist at all).
- IvanGVibraJun 10, 2021Copper ContributorThe userform does not pop up anymore when the excel file is opened. I just get an error stating "Could not load some objects because they are not available on this machine." Does this indicate an issue with my computer or the computer the database is on?