'Is the SIF_FileCreatorPlus open? If not open, if opened continue. 'Loop through catcode in this file. Dim OrderFileName As String, isOpen As Boolean FileLookingFor = "SIF_FileCreatorPlus.xlm [Read-Only]" On Error Resume Next '<<turn on error trap isOpen = False Windows(FileLookingFor).Activate If Err.Number = 0 Then isOpen = True MsgBox ("Yes it is open, use a Goto command to move to proper place in the macro.") Else isOpen = False MsgBox ("Nope, not open") Workbooks.Open Filename:="C:\_SAP\Extract\SIF_CreatorPlus.xlsm", ReadOnly:=True Windows("SIF_CreatorPlus.xlsm").Activate Sheets("MasterCopy").Select 'Start with active cell C2 and move down list Range("C2").Select 'Position to collect catcodes End If On Error GoTo 0 '<<turn off error trap
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.