Hi Folks,
Alpha Frog put this code together for me and it works a treat however it doesn't retain the formatting of the copied cells.
Can some one show what needs to be changed to include the formatting of the copied cells in the code below.
Look forward to your responses.
Many thanks
Kirk^
Alpha Frog put this code together for me and it works a treat however it doesn't retain the formatting of the copied cells.
Can some one show what needs to be changed to include the formatting of the copied cells in the code below.
Code:
Sub test()
Dim wbMaster As Workbook
On Error Resume Next
Set wbMaster = Workbooks("Master Books 2011 - 2012 Q1.xlsm")
On Error GoTo 0
If wbMaster Is Nothing Then
Set wbMaster = Workbooks.Open(Filename:="F:\Master Books 2011 - 2012 Q1.xlsm")
End If
With wbMaster.ActiveSheet
.Rows("2:2").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrBelow
.Range("A2:AH2").FormulaR1C1 = "='[" & ThisWorkbook.Name & "]DATA STORAGE'!R3C"
End With
wbMaster.Close SaveChanges:=True
Range("B3").Select
End Sub
Look forward to your responses.
Many thanks
Kirk^