Multiple Userforms and Debug Error

miami2k

Board Regular
Joined
Nov 1, 2017
Messages
55
Dear All

I'm working on this project.

For now, I'm focusing on the first page of the Userform Scadenziario, the one called TimeSheet. I have three issues:
1. When I open the project on a different PC it stops and gives me an error saying that the function Caricadati is not defined. I have to run it manually, close, save and then it works.
2. If I click on view records it opens the second userform "Edit Time Sheet" and if double-click any record it opens the third userform to edit the single record. Everything ok, so far. But if I close the third userform and I double-click again on any record it does not come up anymore.
3. If I debug and try to start the project again it gives me an error about a With function. I have to save the file, close and restart.

Thank you in advance.


miami2k
 

miami2k

Board Regular
Joined
Nov 1, 2017
Messages
55
I finally found a solution. It is definitely a matter of version of the system.
Sometimes it worked at home sometimes at the office.
The code couldn't find the routines. I had to put the module in front of the name.
For example Call Module.Caricadati
Now the file opens with any computer.
But when I try to clear a listbox from a routine it does not recognize the userform.
On command
and gives me error 404
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

miami2k

Board Regular
Joined
Nov 1, 2017
Messages
55
I didn't mean to post, the message was not complete
... on command
userform.listbox1.clear
gives me error 424 (not 404)
 

rlv01

Well-known Member
Joined
May 16, 2017
Messages
771
userform.listbox1.clear
gives me error 424 (not 404)

This happens when you are trying to reference an object that does not exist. In the file you uploaded there is no form named userform, so a call to userform.listbox1.clear is going to produce an error.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,450
Messages
5,636,337
Members
416,914
Latest member
DWC199

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top