ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Confirm SaveAs takes place. (https://www.excelbanter.com/excel-programming/418510-confirm-saveas-takes-place.html)

SJW_OST[_2_]

Confirm SaveAs takes place.
 
I have a file that automatically copies out specific tabs of my main workbook
to a new workbook and then I am using the following code to save the new
workbook to a intranet sharepoint with a name_date_time format for the file
name.

ActiveWorkbook.SaveAs "http://path/" & "PassCounts_" &
format(now,"mmddyy_hhmmss") & ".xls"

How can I have Excel verify the SaveAs function took place on the new
workbook, saving the file appropriately to the intranet sharepoint, with out
a prompt to accept or cancel? If the SaveAs function did not take place,
acctually saving the file, I want the SaveAs process to loop until it does
take place.

Any help is appreciated.
Stephen W

Jim Thomlinson

Confirm SaveAs takes place.
 
if the workbook was saved then the saved property will be true.

do
ActiveWorkbook.SaveAs "http://path/" & "PassCounts_" &
format(now,"mmddyy_hhmmss") & ".xls"

loop until activeworkbook.saved = true
--
HTH...

Jim Thomlinson


"SJW_OST" wrote:

I have a file that automatically copies out specific tabs of my main workbook
to a new workbook and then I am using the following code to save the new
workbook to a intranet sharepoint with a name_date_time format for the file
name.

ActiveWorkbook.SaveAs "http://path/" & "PassCounts_" &
format(now,"mmddyy_hhmmss") & ".xls"

How can I have Excel verify the SaveAs function took place on the new
workbook, saving the file appropriately to the intranet sharepoint, with out
a prompt to accept or cancel? If the SaveAs function did not take place,
acctually saving the file, I want the SaveAs process to loop until it does
take place.

Any help is appreciated.
Stephen W


John Keith

Confirm SaveAs takes place.
 
On Tue, 14 Oct 2008 19:22:01 -0700, SJW_OST
wrote:

I have a file that automatically copies out specific tabs of my main workbook
to a new workbook


Teach me how to save specific tabs. I think I might need this soon.

Thanks

PS - the response to your OP was useful also. This is a great group!



John Keith


Ron de Bruin

Confirm SaveAs takes place.
 
See
http://www.rondebruin.nl/copy6.htm

--

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


"John Keith" wrote in message ...
On Tue, 14 Oct 2008 19:22:01 -0700, SJW_OST
wrote:

I have a file that automatically copies out specific tabs of my main workbook
to a new workbook


Teach me how to save specific tabs. I think I might need this soon.

Thanks

PS - the response to your OP was useful also. This is a great group!



John Keith


Ron de Bruin

Confirm SaveAs takes place.
 
Oops(I press the send button to fast)

If you want to save a few sheets to a new workbook you can use this to copy them to a new workbook

Sheets(Array("Sheet1", "Sheet3")).Copy



--

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


"Ron de Bruin" wrote in message ...
See
http://www.rondebruin.nl/copy6.htm

--

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


"John Keith" wrote in message ...
On Tue, 14 Oct 2008 19:22:01 -0700, SJW_OST
wrote:

I have a file that automatically copies out specific tabs of my main workbook
to a new workbook


Teach me how to save specific tabs. I think I might need this soon.

Thanks

PS - the response to your OP was useful also. This is a great group!



John Keith


SJW_OST[_2_]

Confirm SaveAs takes place.
 
This works great, thank you!

"Jim Thomlinson" wrote:

if the workbook was saved then the saved property will be true.

do
ActiveWorkbook.SaveAs "http://path/" & "PassCounts_" &
format(now,"mmddyy_hhmmss") & ".xls"

loop until activeworkbook.saved = true
--
HTH...

Jim Thomlinson


"SJW_OST" wrote:

I have a file that automatically copies out specific tabs of my main workbook
to a new workbook and then I am using the following code to save the new
workbook to a intranet sharepoint with a name_date_time format for the file
name.

ActiveWorkbook.SaveAs "http://path/" & "PassCounts_" &
format(now,"mmddyy_hhmmss") & ".xls"

How can I have Excel verify the SaveAs function took place on the new
workbook, saving the file appropriately to the intranet sharepoint, with out
a prompt to accept or cancel? If the SaveAs function did not take place,
acctually saving the file, I want the SaveAs process to loop until it does
take place.

Any help is appreciated.
Stephen W


John Keith

Confirm SaveAs takes place.
 
On Wed, 15 Oct 2008 16:30:44 +0200, "Ron de Bruin"
wrote:

Oops(I press the send button to fast)

If you want to save a few sheets to a new workbook you can use this to copy them to a new workbook

Sheets(Array("Sheet1", "Sheet3")).Copy


Thank you Ron, I think that will work great.



John Keith



All times are GMT +1. The time now is 02:29 PM.

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