Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Saveas error

I have the following bit of code

aWBname = aWB.Name
aWBname = oWB.Path & "\" & aWBname
Application.DisplayAlerts = False
aWB.Close savechanges:=False
oWB.SaveAs Filename:=aWBname
Application.DisplayAlerts = True
oWB.Close
--
HTH,
Barb Reinhardt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Saveas error

You're not really trying to save it after you have closed it are you? I
think that if you do the SaveAs first and then close it, it will work.

"Barb Reinhardt" wrote:

I have the following bit of code

aWBname = aWB.Name
aWBname = oWB.Path & "\" & aWBname
Application.DisplayAlerts = False
aWB.Close savechanges:=False
oWB.SaveAs Filename:=aWBname
Application.DisplayAlerts = True
oWB.Close
--
HTH,
Barb Reinhardt

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Saveas error

No it won't, I took a closer look. The code is a little confusing. Do you
have two workbooks open, oWB and aWB? Or are you trying to save a revised
workbook to replace the old workbook? The latter looks more like what you
are trying.

"Barb Reinhardt" wrote:

I have the following bit of code

aWBname = aWB.Name
aWBname = oWB.Path & "\" & aWBname
Application.DisplayAlerts = False
aWB.Close savechanges:=False
oWB.SaveAs Filename:=aWBname
Application.DisplayAlerts = True
oWB.Close
--
HTH,
Barb Reinhardt

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SaveAs error handling jnf40 Excel Programming 1 August 31st 06 08:46 PM
error with saveas.... jeramie[_2_] Excel Programming 2 March 13th 06 10:38 AM
SaveAs causes 0x800A03EC error Justin Young Excel Programming 0 May 25th 05 06:29 PM
SaveAs Error Steven K Excel Programming 1 September 17th 04 05:41 PM
Error on SaveAs Macro Kevin Excel Programming 1 December 3rd 03 03:58 AM


All times are GMT +1. The time now is 09:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"