LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Get rid of SaveAs prompts

Hi, I have a code loop that is looping through and refreshing data in
some workbooks (typically around 400) saving the work book and moving
on to the next. However, just about every morning I am getting a
SaveAs prompt for one or more of the workbooks. Here is my code

Dim i As Integer
Dim MyTopPath(3) As String

MyTopPath(1) = "\\lbprds0262\invest\Equity Research\Tear Sheets
\Person1 - Pharma, Bio and MedTech"
MyTopPath(2) = "\\lbprds0262\invest\Equity Research\Coverage Lists
\Person2 - Leisure and Staples\"
MyTopPath(3) = "\\lbprds0262\invest\Equity Research\Coverage Lists
\Person1 - Pharma, Bio and MedTech\"

Application.DisplayAlerts = False
Application.ScreenUpdating = False


Workbooks.Open MyTopPath(2) & "\Some Person - Leisure Gaming
Lodging and Staples.xls"
ExecuteExcel4Macro ("FDSFORCERECALC(FALSE)")
ActiveWorkbook.Close SaveChanges:=True

'This is the search - use a with statement
On Error GoTo SheetError
With Application.FileSearch
.NewSearch
.SearchSubFolders = True
.LookIn = MyTopPath(1)
.FileType = msoFileTypeExcelWorkbooks
.Execute

'This is the Update
For i = 1 To .FoundFiles.Count
Application.StatusBar = "Updating ticker " & i & " of
" & .FoundFiles.Count
Workbooks.Open .FoundFiles(i)
ExecuteExcel4Macro ("FDSFORCERECALC(FALSE)")
ActiveWorkbook.Close SaveChanges:=True '(It continues
to prompt me here on a couple workbooks)
Next i
End With

'This is the print out
Workbooks.Open MyTopPath(3) & "King Coverage List.xls"

Application.ActivePrinter = "\\VSPRINT503\COLOR17 on Ne06:"
ActiveWorkbook.PrintOut Copies:=1, Preview:=False,
ActivePrinter:= _
"\\VSPRINT503\COLOR17 on Ne05:", Collate:=True

'Application.ActivePrinter = "\\VSPRINT505\PR7A on Ne06:" This
code also changed
Application.ActivePrinter = "\\VSPRINT505\PR7A on Ne07:"

ActiveWorkbook.Close SaveChanges:=False

'This will quit excel
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Application.Quit

CloseUpdate:
Exit Sub

SheetError:
Resume Next

End Sub
 
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
Save Prompts PMOPS Excel Worksheet Functions 1 August 26th 08 05:40 PM
Saving Prompts Colin Hayes Excel Worksheet Functions 2 March 14th 07 03:02 PM
Prompts Carrguy Excel Programming 2 July 13th 06 06:06 PM
Prompts sdmccabe Excel Discussion (Misc queries) 1 April 13th 06 06:03 PM
Save without prompts Jeff Excel Programming 1 February 1st 05 03:22 PM


All times are GMT +1. The time now is 11:28 PM.

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

About Us

"It's about Microsoft Excel"