Hey everyone,
I can't figure this one out. I'm getting "Copy method of Range class failed":
Public Sub ImportDataNow(ByVal xlWB As Excel.Workbook, _
ByVal xlSh As Excel.Worksheet, ByVal xlDataRange As Excel.Range)
' This will perform the actual importing process to a new workbook.
Dim wbData As Excel.Workbook
Dim shData As Excel.Worksheet
' Create new workbook to import data
Application.Workbooks.Add
Set wbData = ActiveWorkbook
Set shData = wbData.Sheets("Sheet1")
shData.Name = "Scheduling Import - " & MonthName(Month(Now()), False)
' Import
xlWB.Worksheets(xlSh.Name).Range(xlDataRange.Address(0, 0)).Copy shData.Range("A1")
End Sub
If need be I'll post the whole code.
If it helps the range address that's copied is: "A1:AG2,A3329:AG3575"
And the workbook I'm copying from is opened Read-Only, but not sheet/workbook protected.
I don't know what else to say...