Link to home
Start Free TrialLog in
Avatar of Harsh Kumar
Harsh KumarFlag for Denmark

asked on

VBA - Userform won't start but gives and error "run-time error '424"

Hi Guys,

I'm getting very fustrated, i have a code that used to work and i haven't really done anything to the code.
My office crashed before this happend.

kindly help

User generated image
Avatar of David Sankovsky
David Sankovsky
Flag of Israel image

Could you have possibly changed the name of the form?

The error code basically claims that the object it's looking for isn't there.

i have a code that used to work and i haven't really done anything to the code.

There's a VERY fine line between not changing AT ALL and not really changing anything.

If there were any changes, what were they? Did the office crash while making those changes? can there be some unsaved changes that are required for that to work?
Avatar of Harsh Kumar

ASKER

I havn't changed the name as you can see in the screenshot, i have even tried to rename it but no luck..

I was working in vba editing some lines in the Userform when office crashed but nothing else then that.
Then We might need to have a look at the code of the Form itself.

The error might be thrown by the userform but displayed by the main window as a return function,

Do you have a backup of the original code before you made any changes?
Was there a calendar form datepicker or similar on the UserForm?

Have you recently updated Office?
yes there was and yes it has recently been updated!

is there a bug here? or do i need to update a reference to an object?
ASKER CERTIFIED SOLUTION
Avatar of GrahamSkan
GrahamSkan
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would think that thet your version no longer has the Calendar Control available. The UserForm should open but without the Calendar control. If not open the VB EDitor and check if you can delete that control. I have some none activeX calendar examples but they are in Excel. You should be able to create similar in Word
I've migrated my UserForm   calendar to Word.  I need to get it to write to the document now so I'll need to research that because I don't use Word VBA very often. I can't upload it here for some reason but here's a link to the file in DropBox. I'll update it as soon as I can.

Calendar Example
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The illustrated error usually occurs when a control on the userform is not available in the current version of EXcel
Avatar of Norie
Norie

Roy

The reported error is commonly caused by problems in the code of the Activate/Initialize event of a userform.

So to diagnose the error it would be handy to see that code, if there is any.:)
Thank you guys! I foudn the error but runnign through the code again! and actually finding the the error was in the "Userform_Initialize" part.....

thank you so much!!!! really nice to have some1 to spare with specially when you are still learning :D