Hi,
I am using Microsoft 365 for Excel. I have a workbook which I have only just returned to after a few months of not using and there is something weird going on with some of my macros. I have discovered that Excel does not like the two functions CHrW and Format. If I try to run macros with these functions in, I get a Compile Error message- Can't find project or library. I cam across the ChrW error first, and just removed the code (it was simply inserting a character tick) in favour of a simple "X" - no big deal. I then discovered the same problem with the line:
NewTestSheet.Name = "FIDCAL" & Format(Counter + 1, "00")
When I run the macro, the "Format" part is highlighted as the thing causing the macro to stop running.
Any ideas on how I can fix this, as it is a major part of my workbook - help!
J
I am using Microsoft 365 for Excel. I have a workbook which I have only just returned to after a few months of not using and there is something weird going on with some of my macros. I have discovered that Excel does not like the two functions CHrW and Format. If I try to run macros with these functions in, I get a Compile Error message- Can't find project or library. I cam across the ChrW error first, and just removed the code (it was simply inserting a character tick) in favour of a simple "X" - no big deal. I then discovered the same problem with the line:
NewTestSheet.Name = "FIDCAL" & Format(Counter + 1, "00")
When I run the macro, the "Format" part is highlighted as the thing causing the macro to stop running.
Any ideas on how I can fix this, as it is a major part of my workbook - help!
J