MadCallidus
New Member
- Joined
- Jan 11, 2017
- Messages
- 8
Trying to get this reference to work to a closed workbook on another drive. I just want to copy data plus cell formatformatting:
Sub CopyWithFormatting()
Workbooks("\\harddrive\driveletter\folder\[XLworkbook.xlsm]").Worksheets("sheetname").Range("c6:ak27").Copy
With ActiveSheet.Range("c6")
.PasteSpecial xlPasteFormats
.PasteSpecial xlPasteValues
End With
End Sub
Can you please help with the syntax of the reference.
Thanks,
Andy
Sub CopyWithFormatting()
Workbooks("\\harddrive\driveletter\folder\[XLworkbook.xlsm]").Worksheets("sheetname").Range("c6:ak27").Copy
With ActiveSheet.Range("c6")
.PasteSpecial xlPasteFormats
.PasteSpecial xlPasteValues
End With
End Sub
Can you please help with the syntax of the reference.
Thanks,
Andy