Excel Userform converting text incorrectly into date

Collie

New Member
Joined
Jan 26, 2021
Messages
10
Office Version
  1. 2016
Platform
  1. Windows
Hi all

I have created a userform that works well except for a textbox that is converting normal text into a date. A valid value for this text box is MAR51, which incorrectly gets converted to 01 Mar 1951, whereas MAR51 is the correct value. even more baffling is that this isn't happening every instance of MAR51. Also, this is the only text that gets converted, whereas there are thousands of combinations of three alphas followed by two numerics.
Any help would be appreciated :)


Collie
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
are you dumping the textbox value into a worksheet
 
Upvote 0
select the columns in the worksheet and set the formatting to 'text'
 
Upvote 0
Solution
excel auto interprets text to see if it is a date. setting to 'text' disables this feature.
glad it sort your problem
 
Upvote 0
excel auto interprets text to see if it is a date. setting to 'text' disables this feature.
glad it sort your problem
thank you diddi, although the solution is now obvious, and I feel like a dill, I appreciate you taking the time to respond. Thank you
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,732
Members
448,987
Latest member
marion_davis

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