View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Paths for macros


"Tendresse" wrote in message
...
Hi again, Earl.
Well, i tried your suggestion and it works. I cut all the macros from
'Calendar' and saved them in a new workbook called 'Master' and i attached
the customised tool bar to 'Master'.

But there are a couple of things i need to clarify

1) Now does this mean that every time the user is working on this project,
they always have to have this Master workbook open in the background?!
There
is no any other way around that? somehow to hide it for example?


Yes, create an addin and put the code there.


http://msdn.microsoft.com/library/de...ificaddins.asp
Building Application Specific Add-Ins

http://msdn.microsoft.com/library/de...xceladdins.asp
Excel Add-Ins

http://msdn.microsoft.com/library/de...slibraries.asp
Add-ins, Templates, Wizards, and Libraries


2) when i run the macro that opens the Save As dialog box, it always opens
this dialog box twice! any idea why? here is the code i'm using:

Sub NewYear()

' Prompt the user to save as
MsgBox "The 'Save As' dialog box will now open." & Chr(13) & Chr(13) &
_
"Please give the calendar a new name and" & Chr(13) & _
"save it under the folder of your choice.", vbInformation, "New
Calendar"

' display the Save As dialog box
Application.Dialogs(xlDialogSaveAs).Show

If Not Application.Dialogs(xlDialogSaveAs).Show Then
Exit Sub
Else
' the rest of the code goes here

end if
end sub



Because you call it twice. Dump the first Application.Dialogs statement.