ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Textbox date format. (https://www.excelbanter.com/excel-discussion-misc-queries/140150-textbox-date-format.html)

AOU

Textbox date format.
 
I have the following code to date format a textbox.

Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Value = Format(TextBox1.Value, "dd-mmm-yy")
End Sub

I keep getting the following message:

Compile error hidden module: userform 3

This code was done on office 2000. I am now using office 2003. Could that be
the problem?
Can anybody help!!

--
AOU

Dave Peterson

Textbox date format.
 
If you haven't changed any of the code, then maybe it's a broken reference.

Open the workbook in xl2003.
Open the VBE, select the project
Tools|References
Look for "MISSING"

If you find any, you'll have to either fix it (point at the new version) or
delete it (if it isn't used).

===
If that doesn't work, you may want to unprotect the project and run some tests
so you can see the actual line that's causing the trouble.


AOU wrote:

I have the following code to date format a textbox.

Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Value = Format(TextBox1.Value, "dd-mmm-yy")
End Sub

I keep getting the following message:

Compile error hidden module: userform 3

This code was done on office 2000. I am now using office 2003. Could that be
the problem?
Can anybody help!!

--
AOU


--

Dave Peterson

AOU

Textbox date format.
 
Dave
Thanks, that worked.
I Openned the workbook in xl2003.
Open the VBE, select the project
Tools|References
Look for "MISSING"
and selected the ones I needed.

--
AOU


"Dave Peterson" wrote:

If you haven't changed any of the code, then maybe it's a broken reference.

Open the workbook in xl2003.
Open the VBE, select the project
Tools|References
Look for "MISSING"

If you find any, you'll have to either fix it (point at the new version) or
delete it (if it isn't used).

===
If that doesn't work, you may want to unprotect the project and run some tests
so you can see the actual line that's causing the trouble.


AOU wrote:

I have the following code to date format a textbox.

Private Sub TextBox1_BeforeUpdate(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Value = Format(TextBox1.Value, "dd-mmm-yy")
End Sub

I keep getting the following message:

Compile error hidden module: userform 3

This code was done on office 2000. I am now using office 2003. Could that be
the problem?
Can anybody help!!

--
AOU


--

Dave Peterson



All times are GMT +1. The time now is 10:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com