• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Is there VBA code to keep leading zeros on the worksheet level?

Frncis

Member
I have several workbooks where numbers have leading zeros. I.e SS last 4 (0789). I am trying to find VBA on the worksheet level, to force excel to keep leading zeros. I have found several codes to keep leading zeros, but they use a module. I am trying to find worksheet level code that automatically keeps leading zeros. If anyone can lead me in the right direction, it will be appreciated. Manually adding a apostrophe, is quite a pain if you have several files/workbooks.
 
No need a code : just format the cells as text … And the code is the same whatever the module (standard or worksheet) !​
 
That was the thing I did. After the entry of the number with the leading zeros, I have that Green error indicator. I am trying to avoid those.

Also I want to thank, whoever moved my post to the appropriate forum.
 
Back
Top