G
Guest
Excel 2007. I have a well developed workbook with lots of modules of VBA
behind it. It worked fine and for years under Excel 2003. Now after
installing (upgrading) to Office 2007, I am getting inexplicable errors. One
for instance occurs when trying to add a Name (label a cell) as follows:
WbNew.Names.Add Name:="MIA" + Left(WbNew.ActiveSheet.Name, 3),
RefersToR1C1:= _
"='" + WbNew.ActiveSheet.Name + "'!R" + Trim(Str(TCL + 5)) + "C2"
This resolves to:
WbNew.Names.Add Name:="MIA092", RefersToR1C1:= "='092-International
Ministries'!R10C2"
The error message I get is:Runtime error "1004"
The name that you entered is not valid.
Reasons for this can include:
-The name does not begin with a letter or an underscore
-The name contains a space or other invalid character
-The name conflicts with an Excel built-in name or the name of another
object in the workbook
The first reason is not the problem, nor is the second. So why am I now
getting this error in Excel 2007 when it has worked for years in Excel 2003?
Is there anything short of going back to Office 2003 that I can do?
behind it. It worked fine and for years under Excel 2003. Now after
installing (upgrading) to Office 2007, I am getting inexplicable errors. One
for instance occurs when trying to add a Name (label a cell) as follows:
WbNew.Names.Add Name:="MIA" + Left(WbNew.ActiveSheet.Name, 3),
RefersToR1C1:= _
"='" + WbNew.ActiveSheet.Name + "'!R" + Trim(Str(TCL + 5)) + "C2"
This resolves to:
WbNew.Names.Add Name:="MIA092", RefersToR1C1:= "='092-International
Ministries'!R10C2"
The error message I get is:Runtime error "1004"
The name that you entered is not valid.
Reasons for this can include:
-The name does not begin with a letter or an underscore
-The name contains a space or other invalid character
-The name conflicts with an Excel built-in name or the name of another
object in the workbook
The first reason is not the problem, nor is the second. So why am I now
getting this error in Excel 2007 when it has worked for years in Excel 2003?
Is there anything short of going back to Office 2003 that I can do?