Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi There,
I have received some info through this posting, but it is not working how i want to. Hoppefully someone can help me further? I have a Macro in a Module (Workbook_save) Sub Workbook_Save() Dim rng As Range Set rng = ActiveSheet.Range("M2") ActiveWorkbook.SaveAs _ Filename:=rng.Value & ".xls", _ FileFormat:=xlWorkbookNormal End Sub And a macro to start up the above in This workbook: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Call Workbook_Save Cancel = True End Sub But for some reason it is not saving the file as supose to do, i get the error: Compile Error - Expected variable or Proceder, not module How can tell me what this is and how to fix? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro for work book | Charts and Charting in Excel | |||
How to work with macro in background | Excel Discussion (Misc queries) | |||
Macro doesn't work but recording it does. | Excel Discussion (Misc queries) | |||
Why does the macro not work? | Excel Worksheet Functions | |||
how do you get (end down) to work in a macro? | Excel Worksheet Functions |