Dim i As Integer Dim bIsOpened For i = 1 To Application.Workbooks.Count bIsOpened = bIsOpened Or (Application.Workbooks(i).Name = "SALESORDERDOWNLOAD.XML" _ And Application.Workbooks(i).Path = "C:\_SAP\Extracts\SalesOrd") Next i If bIsOpened Then MsgBox "Target save file is open, Closing file so process can use it.", vbOKOnly + vbInformation, "Cannot have: C:\_SAP\EXTRACTS\SALESORD\SALESORDERDOWNLOAD.xml open and run this process. Close it and try again." Application.DisplayAlerts = False Windows("SALESORDERDOWNLOAD.XML").Activate ActiveWorkbook.Close Application.DisplayAlerts = True
|Find word and 6 digit number||22||98|
|User Form VBA Data + Print Sections||39||114|
|vba code in excel to save the current open mail item as .msg or .oft file in a location||23||65|
|Excel 2010 - Comparison of texts in a cell||14||40|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
25 Experts available now in Live!