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 (attempt 2)

I have the following bit of code that normally works, but lately I'm getting
errors on the SaveAs line. It's completely kicking me out of excel.

aWBname = aWB.Name
aWBname = oWB.Path & "\" & aWBname 'Didn't have this line
originally and it worked
Application.DisplayAlerts = False
aWB.Close savechanges:=False
oWB.SaveAs Filename:=aWBname
Application.DisplayAlerts = True
oWB.Close


Does anyone have any idea why I might be having these problems? Sometimes
it works and sometimes it doesn't.

Thanks,
Barb Reinhardt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Saveas Error (attempt 2)

It appears that copying worksheets from aWB to oWB caused this problem
somehow. WHen I moved them, I had no error. I believe the workbooks with
issues had links from one sheet to another.

Barb Reinhardt



"Barb Reinhardt" wrote:

I have the following bit of code that normally works, but lately I'm getting
errors on the SaveAs line. It's completely kicking me out of excel.

aWBname = aWB.Name
aWBname = oWB.Path & "\" & aWBname 'Didn't have this line
originally and it worked
Application.DisplayAlerts = False
aWB.Close savechanges:=False
oWB.SaveAs Filename:=aWBname
Application.DisplayAlerts = True
oWB.Close


Does anyone have any idea why I might be having these problems? Sometimes
it works and sometimes it doesn't.

Thanks,
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 Barb Reinhardt Excel Programming 2 April 6th 08 02:58 AM
error with saveas.... jeramie[_2_] Excel Programming 2 March 13th 06 10:38 AM
Error Handling an attempt to change a protected cell crazybass2 Excel Programming 1 December 22nd 05 09:46 AM
error in attempt to warn about macro security Pierre via OfficeKB.com[_2_] Excel Programming 6 November 2nd 05 07:14 PM
need an error msge when I attempt to enter a duplicate value in a pg23673 Excel Discussion (Misc queries) 5 June 13th 05 12:07 PM


All times are GMT +1. The time now is 03:12 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"