Variables added
You will need to add the correct coding to set the sfname variable to the required book name. I have set it using the book name from your posted macro
Sub IsWorkBookOpenDec()
'Test to see if a Workbook is open.
Dim wBook As Workbook
Dim sFname As String
sFname = "2830 V 6 Dec.xls"
On Error Resume Next
Set wBook = Workbooks(sFname)
If wBook Is Nothing Then 'Not open
Range("f3").Select
MsgBox sFname & " is not open", _
vbCritical, ""
Set wBook = Nothing
On Error GoTo 0
Else 'It is open
Call CopyInfo
On Error GoTo 0
End If
End Sub
Bookmarks