Hi everyone,
I am trying to write a VB code that allows me to paste data from a selected range on a sheet to another sheet in a seperate workbook by clicking a button.
I was able to write the following with success from one sheet (Broker 1) to the next (master) within the same workbook. Is there a way for me to modify the existing working form to paste the data into an external workbook e.g: C:/folder name/master.xls, sheet named "master" saved in the same folder?
Sub Button208_Click()
Dim NR As Long
Dim wsCF As Worksheet
Dim wsMA As Worksheet
Set wsCF = Sheets("Broker 1")
Set wsMA = Sheets("Master")
NR = wsMA.Range("A" & Rows.Count).End(xlUp).Row + 1
wsCF.Range("T5:AE5").Copy
wsMA.Range("A" & NR).PasteSpecial xlPasteValues
End Sub
Bookmarks