We have two office computers that run the same .xlsb (not at the same time). Call them Computer A and Computer B

Example of issue:

Cell A6 contains a date. For the sake of discussion it displays 06/18/24 in A6 on the sheet.

If we open the sheet on Computer A, click on cell A6 and look at the formula bar, it displays 06/18/2024. Computer B displays 6/18/2024. Computer B drops the leading 0 when you look at the fomula bar. The cell on the sheet always shows the 0 when using either computer.

We use the date in VBA to create a file name. We need to create a file name in MMDDYY format.

Example:

strFile= left(Range("A6",2) + mid(Range("A6",4,2) + right(Range("A6"),2 + ".pdf"

The variable strFile needs to contain: 061824.pdf

The dropped zero causes issues with the code.


Computer B will not create the file - it drops the 0 from the month.

Both computers use the same workbook at different times during the day.

Why is Computer B dropping the leading 0 from 06/18/24 when you look at while computer A does not.
As always, any help is greatly appreciated.

Thanks