Just to add - at least in xl97 -
If the path is not valid, it does not raise an error. It goes somewhere
else.
--
Regards,
Tom Ogilvy
"Bob Phillips" wrote in message
...
Hi Nick,
That is interesting. It actually works better than that.
I tried C:\MyTest, and it went to C: as you said.
I then tried C:\Mytest\Mytest, and it went to c:\MyTest !
But best of all, I then tried C:\Mytest\Mytest\ and it went to
c:\MyTest\Mytest.
A good find.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Nick Hodge" wrote in message
...
Larry
Can you not explicitly pass the path to the GetSaveAsFilename method. I
used
the code below and it offered the save as dialog with my root 'C' as the
'preset' path
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Dim sFileName As String
If SaveAsUI Then Exit Sub
With Application
.EnableEvents = False
sFileName = .GetSaveAsFilename("C:\" & Me.Name)
Me.SaveAs Filename:=sFileName
.EnableEvents = True
End With
End Sub
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS
"Larry Dodd" wrote in message
...
Thank you for responding but that did not work for me. It does open
the
Save As dialog but it is in the folder that the original file was
opened
from. This is the code that I used. Please let me know if there is
something else that I need to do.
Also when I call the SaveAs function the file is saved to the location
that I selected but then Excel gives me an error message and closes.
If
you know anything about that please let me know
Application.EnableEvents = False
ChDir (ActiveWorkbook.Path)
ChDir ("Bone Match Template Directory")
ChDir ("Bone Match History")
strFile = Application.Dialogs(xlDialogSaveAs).Show
Application.EnableEvents = True
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!