Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Hi,
can anyone help me with a macro to start on opening a book? when the book is opened, start this " Nextstage.Show " Then when i save, if the file name = quotes & orders then rename it to (D2 & quotes & orders). this is to stop the possibility of the same named file being open twice. Kindest Regards, Nigel |
#2
![]() |
|||
|
|||
![]()
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean) If ThisWorkbook.Name = "quotes & orders.xls" Then ThisWorkbook.SaveAs "D2 quotes & orders.xls" Cancel = True End If End Sub Private Sub Workbook_Open() NextStage.Show End Sub 'This is workbook event code. 'To input this code, right click on the Excel icon on the worksheet '(or next to the File menu if you maximise your workbooks), 'select View Code from the menu, and paste the code -- HTH RP (remove nothere from the email address if mailing direct) "Nigel" wrote in message ... Hi, can anyone help me with a macro to start on opening a book? when the book is opened, start this " Nextstage.Show " Then when i save, if the file name = quotes & orders then rename it to (D2 & quotes & orders). this is to stop the possibility of the same named file being open twice. Kindest Regards, Nigel |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to browse for workbook, pick up data and looping | Excel Worksheet Functions | |||
Extract specific data into its own workbook via macro? | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
workbook macro help | Excel Discussion (Misc queries) | |||
Inserting Blank Rows Macro? | Excel Worksheet Functions |