Hello, I have set up a central sheet with employee information in it and wrote macros in a few other sheets that pulls the information it needs from the central sheet. This allows me to enter the information once and then pull the information in as I need it.
However, while the macro functions perfectly on my machine, it gives a Run-time error '9' error on any other machine I try to run it on. I have checked for Add-Ins and References and everything matches. The highlighted line is the one that the debugger highlights. My first thought was that the machine didn't have access to the file opened two lines above, but when I looked, the file had opened as was intended. I am at a loss to explain this. What am I missing?
Thanks much in advance,
Scott Tucker
Private Sub cmdUpdate_Click()
Dim ITT, CAD
Application.ScreenUpdating = False
Workbooks.Open Filename:="\\uberserver\SHARED\CallCenter\Sprint\Workforce\Central Agent Database.xls"
Set ITT = ThisWorkbook.Sheets("AgentDB")
Set CAD = Workbooks("Central Agent Database").Sheets("Agent Information")
CAD.Columns("D:D").Copy
ITT.Columns("A:A").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
CAD.Columns("C:C").Copy
ITT.Columns("B:B").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
CAD.Columns("F:F").Copy
ITT.Columns("C:C").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.Close
ThisWorkbook.Activate
Sheets("Invalid Transfers").Select
Application.ScreenUpdating = True
End Sub
Bookmarks