PDA

View Full Version : [SOLVED] Adapt sub to execute from primary workbook



streub
12-03-2013, 05:13 AM
SNB provided this sub that executes perfectly. I need to adapt to call from workbook "Initial Load" and execute in workbook "BTM" and cannot recall how this is done.



Sub M_snb()
For Each ws ThisWorkbook.Sheets
With ws
If right(.Name,6)="Graphs" Then
.Range("a1").UnMerge
.Range("a1").ClearContents
.Range("b1:b2").Value = application.transpose(array("01","13"))
.Range("b1:b33").ClearFormats
sheets("sheet3").Cells(Rows.Count, 1).End(xlUp).offset(1).resize(,30)=application.transpose(.Range"b3:b33").value)
End If
End With
Next
End Sub

Bob Phillips
12-03-2013, 06:31 AM
Just change ThisWorkbook to Workbooks("BTM").

Where is Sheets("sheet3"), you would be best to qualify that as well.