Userform wont open unless i comment out its line of code

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,959
Office Version
  1. 2007
Platform
  1. Windows
One thing after another.
I try to open my userform but i am told im unable to.
I debug the code and the date picker is shown in yellow.


EaseUS_2025_02_17_21_07_53.jpg


I comment out that line of code & form opens.

What do i need to do to now fix this.

EaseUS_2025_02_17_21_02_09.jpg
 
The Date picker isnt on my formIts not in the toolbox.
I have it on my other pc so can i copy that file & put on new pc for it to then be shown in the tool box ?

Thanks
 
Upvote 0
Sounds like an issue people were having years ago due to MSCAL.OCX (ActiveX control) not being registered.
Think Office 2007 was the last to have it included.

I googled something like "how to register mscal.ocx" and found this ancient Chip Pearson post
 
Upvote 0
I seen that but wont work.
Im seeing about another option for a date on my form but will remember the link you posted
 
Upvote 0
Plan B isn't getting a lot of response and
I seen that but wont work.
doesn't even give a hint as to what the situation might be.

I took an empty hdd and clean installed Windows 10.
Then installed MS Office Home and Student 2007, only Excel and Word.

MSCAL.OCX was nowhere to be found so copied it from an Office 2003 installation
and pasted into C:\Program Files (x86)\Microsoft Office\Office12

Then hit the Windows Key and typed cmd
clicked Run as administrator
typed in
regsvr32 "C:\Program Files (x86)\Microsoft Office\Office12\MSCAL.OCX"

got the success message and could then add calendar control to the tool box.
 
Upvote 0
A poor workaround but still looking for an option to select a previous date
 
Upvote 0
wrong OCX
needs to be the one you have on the Win 7 computer showing here as missing.
I had to download it but you should be able to copy from the Win 7 computer.
 
Upvote 0
I did copy it from the win 7 pc but I’m sure there was a registration error.

Hard drive from win 7 machine now removed & pc setup using SSD

Can you put the one you used here please.
3am at present so will look / try again when I’m up.

Thanks for the help m
 
Upvote 0

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
Back
Top