A workbook I have is for a Punters Club and is basically the same as the first one I created about 13 years ago, with additions as I have gone along to automate stuff. The code (where I believe the issue I have stems from) was not affecting anything until around 24 months or so ago (maybe a bit longer) when all of a suddenly the number format for the entire workbook changed (in currency type cells) from Currency ($1234.00 , -$1234.00) to Custom ($1234.00, ($1234.00)). I have a feeling this issue became so during Excel 2013. I have tried it on different computers, with excel 2013 & 2016 but no difference. Now I have changed all the numbers back to Currency (as I want) but as soon as I re-open the workbook, (after saving from previous changes) the ($*****) format returns. It now appears there is something in the code (attached) that seems to be forcing a change to the Custom format, however, if so, it never used to. The code was designed so as to write a dollar and cent figure into words for ‘cheques’ I ‘present’ at the end of the year (the formula is =spellnumber(cell) for each of the 'cheques' required). These cheques are on 1 worksheet only, and reference another couple of sheets to get the figures/dates etc.
I have commented the code out in the spreadsheet, changed the format of one number, saved, closed and re-opened with the currency format remaining – so it appears it is the code making the change (although the code is only a function and not a sub routine). But I cannot read (or completely understand) where the code is now forcing a change of the entire workbook rather than the one sheet it should be. I would appreciate of someone could advise where in the code the change is called, and how I would go about changing the format ‘back’ to currency (or not changing the format on all sheets).
Thanks in advance for any assistance.
Ron