I’ve started with Ron de Bruin’s “Copy a range from closed workbooks (ADO)” to access and pull data from a closed workbook. (It has a VBA sequence password that makes it difficult to open programmatically)
Using the “GetData” routine below…
****************************
Sub GetData_Example3()
GetData "\\CCServer01\cc apps\Branch Count.xls", "Tampa", "B8:N12", Sheets("Total Count").Range("E5"), False, False
End Sub
****************************
This code works as expected – it pulls the values from the “Branch Count Workbook / Tampa sheet / range “B8:N12” and places the copied range in the Active Workbook on sheet “Total Count” starting in cell E5.
I actually need this code to go a little further…
I need to copy 2 separate ranges from 10 different sheets in the Branch Count Workbook and deposit the copied values in 2 seperate ranges on the ‘Total Count’ sheet.
Something like this – using the above code I stared with…
Copy values from the Branch Count Workbook on sheet “Tampa” the separate ranges B8:N12 and T6:T16 and have the values deposited on the active sheet “Total Count” starting in ranges E5 and X5 respectively.
The 2 separate range areas of each sheet that has values copied and the 2 seperate range areas to populate on the Total Count spreadsheet are not identical.
Is there a way to get the “GetData” code to handle more than 1 sheet and 1 range?
Thanks...
Using the “GetData” routine below…
****************************
Sub GetData_Example3()
GetData "\\CCServer01\cc apps\Branch Count.xls", "Tampa", "B8:N12", Sheets("Total Count").Range("E5"), False, False
End Sub
****************************
This code works as expected – it pulls the values from the “Branch Count Workbook / Tampa sheet / range “B8:N12” and places the copied range in the Active Workbook on sheet “Total Count” starting in cell E5.
I actually need this code to go a little further…
I need to copy 2 separate ranges from 10 different sheets in the Branch Count Workbook and deposit the copied values in 2 seperate ranges on the ‘Total Count’ sheet.
Something like this – using the above code I stared with…
Copy values from the Branch Count Workbook on sheet “Tampa” the separate ranges B8:N12 and T6:T16 and have the values deposited on the active sheet “Total Count” starting in ranges E5 and X5 respectively.
The 2 separate range areas of each sheet that has values copied and the 2 seperate range areas to populate on the Total Count spreadsheet are not identical.
Is there a way to get the “GetData” code to handle more than 1 sheet and 1 range?
Thanks...