ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   save as (https://www.excelbanter.com/excel-programming/366511-save.html)

Striker

save as
 
After running some code, I would like to open a "Save As" box and navigate
to a specific directory. At this point I would like to wait for the user to
type a file name. Can someone help me with this part of the code?

Thank You



Leith Ross[_640_]

save as
 

Hello Striker,

You can call up the "Save As" dialog in VBA using the code below.

Application.Dialogs(xlDialogSaveAs).Show

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=55912


Leith Ross[_642_]

save as
 

Hello Striker,

You can call up the "Save As" dialog in VBA using the code below.

Application.Dialogs(xlDialogSaveAs).Show

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=55912


Leith Ross[_641_]

save as
 

Hello Striker,

You can call up the "Save As" dialog in VBA using the code below.

Application.Dialogs(xlDialogSaveAs).Show

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=55912


Leith Ross[_643_]

save as
 

Hello Striker,

You can call up the "Save As" dialog in VBA using the code below.

Application.Dialogs(xlDialogSaveAs).Show

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=55912


Norman Jones

save as
 
Hi Striker,

Try something like:

'=============
Public Sub Tester()
Dim myFolder As String
Dim myPath As String
Dim FName As Variant

myFolder = CurDir
myPath = "C:\Data\" '<<=== CHANGE

If Right(myPath, 1) < "\" Then
myPath = myPath & "\"
End If

ChDrive myPath
ChDir myPath

FName = Application.GetSaveAsFilename( _
FileFilter:="Excel Files (*.xls), *.xls")
If FName < False Then
ActiveWorkbook.SaveAs Filename:=FName
End If

ChDrive myFolder
ChDir myFolder

End Sub
'<<=============


---
Regards,
Norman


"Striker" wrote in message
...
After running some code, I would like to open a "Save As" box and navigate
to a specific directory. At this point I would like to wait for the user
to type a file name. Can someone help me with this part of the code?

Thank You





All times are GMT +1. The time now is 02:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com