Date field in user form & Loading a user form on opening workbook

B

Balan

I am preparing a user form. I am facing the following two problems:

i) I want the user form to load when workbook is opened. Under ThisWorkbook
< workbook < Open, I have written frmxyz.show. Still the form is not
showing. I am getting Error 424: Object required. I tried to check where
the mistake could be. I am unable to locate it. The name of user form
'frmxyz' is appearing in the project window. Still I do not why the
programme is unable to locate it. Kindly help me understand the problem.

ii) In one of the text boxes of the user form, I want dates to entered in
the format mm/dd/yyyy. How to do it and how to ensure that the slash '/'
marks between mm, dd and yyyy automatically appear when the user form is
loaded so that the user will automatically know that he has to fill in dates
only.

Thanks in advance.
 
B

Balan

Hi everybody,

The first problem is solved. But I request Microsoft to see whether any
improvement in Error Reporting is needed. The problem was an error in the
spelling of an object in Userform Initialise, whereas the Error 424 was
directing me to "frmxyz.show" under Workbook Open section. The spelling
error was also not on the name of the form i.e., "frmxyz" but in the spelling
of the name of a command button. ( instead of cmdxyz I had typed cmbxyz). I
located the mistake after using the "Debug" menu separately. Had the error
reporting system taken me directly to the mistake in Userform initialise
section, I wouldn't approached this discussion forum.

As regards the date field, I understand from other threads in this forum
that what I wanted was an 'Input Mask' and that it can be loaded, if I have
Ms Access with me. I have MS Access. But I wanted to distribute the work
done by me to a few students who may use the user form. If they did not have
MS Access loaded in their MS Office package will they not face problem ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top