ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Save as dialog (https://www.excelbanter.com/excel-discussion-misc-queries/160062-save-dialog.html)

David T

Save as dialog
 
I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like the
file to prompt the SaveAs dialog box.


Can anyone help????

Mike H

Save as dialog
 
David,

Maybe:-

Sub sonic()
'Your code
Dim FileName As String
FileName = Application.GetSaveAsFilename
If FileName = "False" Then Exit Sub
ActiveWorkbook.SaveAs FileName
End Sub

"David T" wrote:

I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like the
file to prompt the SaveAs dialog box.


Can anyone help????


papou[_2_]

Save as dialog
 
Hello David
See VBA help on either:
Application.Dialogs(xlDialogSaveAs).Show
or
Application.GetSaveAsFilename

HTH
Cordially
Pascal

"David T" a écrit dans le message de
news: ...
I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like
the
file to prompt the SaveAs dialog box.


Can anyone help????




David T

Save as dialog
 
thanks very much. the code works great!

"papou" wrote:

Hello David
See VBA help on either:
Application.Dialogs(xlDialogSaveAs).Show
or
Application.GetSaveAsFilename

HTH
Cordially
Pascal

"David T" a écrit dans le message de
news: ...
I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like
the
file to prompt the SaveAs dialog box.


Can anyone help????





David T

Save as dialog
 
thanks mike. I used your code on another one workbook. It works great!!!!

"Mike H" wrote:

David,

Maybe:-

Sub sonic()
'Your code
Dim FileName As String
FileName = Application.GetSaveAsFilename
If FileName = "False" Then Exit Sub
ActiveWorkbook.SaveAs FileName
End Sub

"David T" wrote:

I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like the
file to prompt the SaveAs dialog box.


Can anyone help????


Ron de Bruin

Save as dialog
 
Suggestion

Change

"False" to False

If your code is running on a non English machine "False" is not working



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"David T" wrote in message ...
thanks mike. I used your code on another one workbook. It works great!!!!

"Mike H" wrote:

David,

Maybe:-

Sub sonic()
'Your code
Dim FileName As String
FileName = Application.GetSaveAsFilename
If FileName = "False" Then Exit Sub
ActiveWorkbook.SaveAs FileName
End Sub

"David T" wrote:

I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like the
file to prompt the SaveAs dialog box.


Can anyone help????


Dave Peterson

Save as dialog
 
And remember to also change:
Dim FileName As String
to
Dim FileName As Variant 'could be a string or a boolean


Ron de Bruin wrote:

Suggestion

Change

"False" to False

If your code is running on a non English machine "False" is not working

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

"David T" wrote in message ...
thanks mike. I used your code on another one workbook. It works great!!!!

"Mike H" wrote:

David,

Maybe:-

Sub sonic()
'Your code
Dim FileName As String
FileName = Application.GetSaveAsFilename
If FileName = "False" Then Exit Sub
ActiveWorkbook.SaveAs FileName
End Sub

"David T" wrote:

I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like the
file to prompt the SaveAs dialog box.


Can anyone help????


--

Dave Peterson

Ron de Bruin

Save as dialog
 
Good catch, I miss that one Dave

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dave Peterson" wrote in message ...
And remember to also change:
Dim FileName As String
to
Dim FileName As Variant 'could be a string or a boolean


Ron de Bruin wrote:

Suggestion

Change

"False" to False

If your code is running on a non English machine "False" is not working

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm

"David T" wrote in message ...
thanks mike. I used your code on another one workbook. It works great!!!!

"Mike H" wrote:

David,

Maybe:-

Sub sonic()
'Your code
Dim FileName As String
FileName = Application.GetSaveAsFilename
If FileName = "False" Then Exit Sub
ActiveWorkbook.SaveAs FileName
End Sub

"David T" wrote:

I have a macro on an Activeworkbook that opens a specifice file in my C:
drive and copies data from the activeworkbook into the workbook in my C:
drive. When my active workbook copies the data to the file, I would like the
file to prompt the SaveAs dialog box.


Can anyone help????


--

Dave Peterson



All times are GMT +1. The time now is 01:25 AM.

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