Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Excel 2007
I copied two macro examples from the Excel Help File and tried to run them, but I get an error message that says: Cannot run the macro €˜MacroName.xlsm. The macro may not be available in this workbook or all macros may be disabled. I have enabled all macros. But still get that message. The macro is in my Personal.xls file in the XLSTART folder. And even when I open THAT file and try to run the macro, it doesn't work. Same message. The macros I have copied from Help (there are two) a Option Explicit Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook, _ ByVal SaveAsUI As Boolean, Cancel As Boolean) a = MsgBox("Do you really want to save the workbook?", vbYesNo) If a = vbNo Then Cancel = True End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _ Cancel As Boolean) a = MsgBox("Do you really want to save the workbook?", vbYesNo) If a = vbNo Then Cancel = True End Sub Please help. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sum problem | Excel Discussion (Misc queries) | |||
Started out as an Access problem. Now an Excel problem | Excel Discussion (Misc queries) | |||
I've a problem | Excel Discussion (Misc queries) | |||
I have this problem... | Excel Discussion (Misc queries) | |||
problem with a conditional max problem | Excel Discussion (Misc queries) |