I have a series of macros in a form that I have created for my field people to use. When they have completed the document and want to send it on to the appropriate folks, I have created a FINISH Macro. This basically cleans up the document for them, dropping the file size down to about 50KB from 2MB+ The macro (below) basically does the following:
A.) Delete the control buttons I put on the form for them to use when they are entering their data. These buttons are; Freeze Data - Converts all formulas in the document to static text Save File - Gives the file a unique name based on the contents of a cell on the document FINISH - Button corresponding to the FINISH macro
B.) Deletes the tab with the drop down data on it.
When I try to use the FINISH button to run the macro, I get a message that says "Caot run the macro "Assessment Format - 2.xlsm'Button11_Click'. The macro may not be available in this workbook or all macros may be disabled"
Macros in The workbook However, when I pull up the list of macros, it clearly shows the macro is in that workbook.
Sub Finish() Application.DisplayAlerts = False ' ' Finish Macro ' Finish Document For Sending out ' ' Sheets("DropDownData").Select ActiveWindow.SelectedSheets.Delete ActiveSheet.Shapes.Range(Array("Button 10")).Select Selection.Delete Selection.Cut ActiveSheet.Shapes.Range(Array("Button 11")).Select Selection.Delete Selection.Cut ActiveSheet.Shapes.Range(Array("Button 9")).Select Selection.Delete Selection.Cut Range("A6").Select Application.DisplayAlerts = True End Sub
Can anyone help with this?
برچسب:
نویسنده: استخدام کار