Copy Excel workbook from a sharepoint site

I am trying to copy the used range from a Corporate network sharepoint 2003 list excel workbook and getting a "subscript out of range" error. I know the address is good as I can go there directly. Any Help would be appreciated
Sub CSMCopy()
Dim wb1 As Workbook, wb2 As Workbook
Dim ws As Worksheet
Set wb1 = Workbooks("")
Application.DisplayAlerts = False
Set wb2 = Workbooks("\\\FIDFILE\FS093\workgrp\COMMON\Testing and Reporting Services\Help Line\CallAnswer-TC_SDM\Resources\All Plan Assignments - All Segments.xls")
wb1.UsedRange.Copy wb2.Cells

Application.DisplayAlerts = True
End Sub

Open in new window

Who is Participating?
I don't think you can use the workbooks object with URLs

Try this instead:

Workbooks.Open Filename:=""

Then you can refer to the workbooks by name:

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.