Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a workbook which uses Chip Pearson's sheet visibility method of
ensuring that users enable macros (complete code at http://www.cpearson.com/excel/EnableMacros.aspx). The file works well in Excel2003 on my windows xp machine, but when I enable macros in Excel2007 (running on Vista Home Premium), I get an error when the macros run. A hidden module "modRequireMacros" contains two macros - one runs when opening the file (UnHideSheets) and the other runs before closing (SaveStateAndHide). When the UnHideSheets macro runs, the error is "Compile error: Can't find project or library" and "Mid" is highlighted in the following piece of code: S = ThisWorkbook.Names(C_SHEETSTATE_NAME).RefersTo S = Mid(S, 4, Len(S) - 4) When the SaveStateAndHide macro runs, I get the same error and "Chr" is highlighted in the following line of code: ThisWorkbook.Names.Add Name:=C_SHEETSTATE_NAME, RefersTo:=Chr(39) & S, Visible:=False |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Chart allignment issue in 2007 but in 2003 its working fine | Charts and Charting in Excel | |||
Charts that printed fine in 2003 don't print right in 2007? | Excel Discussion (Misc queries) | |||
xls file works fine in Excel 2000 and 2007 but crashes on opening in 2003 | Excel Discussion (Misc queries) | |||
Visual Basic Function works fine in Excell 2003 but not in Excel 2 | Excel Discussion (Misc queries) | |||
REF errors when opening excel in xp. works fine when opening wor. | Excel Discussion (Misc queries) |