Hi im using the below VBA code, however in one of my staff's pc (XP, Office 2010) it shows this error msg 'METHOD OPEN OF OBJECT WORKBOOKS FAILED'
Only this pc givin this error msg, other staff have no issue. Please help.
Code:
Sub Copydata3()
On Error GoTo ErrorChk
ErrorChk: MsgBox Err.Description
Application.ScreenUpdating = False
Dim foundDate As Range
Dim SourceWB As Workbook
Set SourceWB = ActiveWorkbook
Workbooks.Open ("[URL="file://\\IP ADDRESS\FOLDER\TEST"]\\IP ADDRESS\FOLDER\TEST[/URL].xlsx"), Password:="TEST"
Dim ws As Worksheet
For Each ws In Workbooks("TEST.xlsx").Sheets
If ws.Name = SourceWB.Sheets("SCORE SHEET").Range("C3").Value Then
Set foundDate = ws.Range("A:A").Find(SourceWB.Sheets("SCORE SHEET").Range("H3"), LookIn:=xlValues, lookat:=xlWhole)
If Not foundDate Is Nothing Then
foundDate.Offset(0, 9) = SourceWB.Sheets("SCORE SHEET").Range("J2")
End If
End If
Next ws
Workbooks("TEST.xlsx").Close True
Application.ScreenUpdating = True
End Sub
Only this pc givin this error msg, other staff have no issue. Please help.