Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
There is a worksheet inside a workbook located on server that I need to copy.
The problem that I am stuck on is how to copy all the contents of the page including the header content, footer content, and margin settings(Top,Left, Bottom, Footer,Right, and Header) of the selection using VBA. Here is what I have so far. Thank You for any help or advice offered.
The problem that I am stuck on is how to copy all the contents of the page including the header content, footer content, and margin settings(Top,Left, Bottom, Footer,Right, and Header) of the selection using VBA. Here is what I have so far. Thank You for any help or advice offered.
Code:
Option ExplicitPrivate Sub Workbook_Open()
Dim sPath As String, sFile As String
Dim wb As Workbook
sPath = "J:\GRP\EVERYONE\FORMS\"
sFile = sPath & "F-103-04 Exh I-Solid Dose Usage Record-Rev001.xlsx"
Set wb = Workbooks.Open(sFile)
call OpenSDUsageRecord
Code:
Sub OpenSDUsageRecord() Cells.Select
With Selection
.Copy
End With
End Sub