Hi All,
I am new to macro's and have built this code
Sub GetDataFromClosedWorkbook()
'Open Leads
Dim wb As Workbook
Application.ScreenUpdating = False ' turn off the screen updating
Set wb = Workbooks.Open("O:\GPS\Lead Reports\Data\Open Leads.xlsx", True, True)
' open the source workbook, read only
With ThisWorkbook.Sheets("Open Leads")
' read data from the source workbook
.Range("A2:Q10001").Value = wb.Worksheets("Sheet1").Range("A1:Q10000").Value
'.Cells(1, 2).Value = wb.Worksheets("Sheet1").Cells(1, 2).Value
'.Cells(1, 3).Value = wb.Worksheets("Sheet1").Cells(1, 3).Value
'.Cells(1, 4).Value = wb.Worksheets("Sheet1").Cells(1, 4).Value
'.Range("A10").Formula = wb.Worksheets("Sheet1").Range("A10").Formula
' .Range("A11").Formula = wb.Worksheets("Sheet1").Range("A20").Formula
' .Range("A12").Formula = wb.Worksheets("Sheet1").Range("A30").Formula
'.Range("A13").Formula = wb.Worksheets("Sheet1").Range("A40").Formula
End With
wb.Close False ' close the source workbook without saving any changes
Set wb = Nothing ' free memory
Application.ScreenUpdating = True ' turn on the screen updating
It works on computer running Excel 2007 but not on excel 2010,(which is my Boss's computer)! Can anyone explain why?? I need it to work for a presentation on Thursday.
Sutty31
Bookmarks