Clarification for Mr Noob
Quote:
Originally Posted by
Paul_Hossler
You could modularize this a lot more by having a sub to process a file that takes the path, source range, and destination range in Master
This is very crude
Code:
Option Explicit
Sub Alt1_Demo()
Dim sFilename As String
Dim wb1 As Workbook, wb2 As Workbook
Set wb1 = ThisWorkbook ' probably "Document Tracker.xlsm"
sFilename = "IPW-CAP-00-XX-RE-Z-0001.xlsx"
Workbooks.Open Filename:="X:\089872 - IPW - Framework\02 Admin\01 DocRegisters\" & sFilename
wb2.Worksheets("Framework").Range("D6:D10").Copy
wb1.Worksheets("Something").Range("B7:B11").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
wb2.Close False
End Sub
Complete newb questions so apologises in advance! -
With set wb1; do i have to link this to the workbook i want the data sent to? and additionally do i have to reference a wb2 to the workbook i am copying from?
for example;
wb 1 it would be: Set wb1 = "document tracker.xls"
wb 2 would be: Set wb2 = "documentcopyfrom.xls"