Annoying date format problem

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,422
Office Version
  1. 2016
Platform
  1. Windows
Guys,

I have created a workbook for my organisation which has a substantial number of computers across a large amount of buildings, all connected by a Server.

The people using the workbook are required to enter the date into a textbox, (on a userform), and that is transferred to the worksheet where various calculations are made determined by the month, (identified by a formula). In order to ensure the date is entered on the sheet correctly, whatever way the employee enters it into the textbox, I have written the following code;

Code:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1.Value = Format(TextBox1.Value, "dd mmmm yyyy")
End Sub

The problem is that, only on certain machines, some employees are getting a debug message relating to the textbox which I believe is somehow linked to a missing dll file within the system32 folder.

There is no way I can determine which computer is affected in advance and our IT Dept can't resolve it easily, so - is it possible to set a code that would format the range concerned, (in this case A8:A6996), to the correct date format before the workbook is closed?

If there is a way then I'm not sure if that would give the same error message - any ideas anyone?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You could always force them to enter the dates in the correct format by using three textboxes. One each for the Day, Year, & Month.
 
Upvote 0
I thought of that, but then thought this would have been easier - how wrong I was!
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

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