This code stops at the bolded line
The error says "Compile error" Syntoax Error"
Please help
Thanks
----------------------------
Sub SaveDailySummary()
Dim mydate As Date
Dim myhalfday As String
mydate = Sheets("TheICE").Range("B2").Value
myhalfday = Sheets("Daily Summary").Range("J2").Value
Sheets("Daily Summary").Activate
Sheets("Daily Summary").Copy
Cells.Select
Selection.Copy
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
"M:\dept\SLNGNA\Gas LPM\Structuring\Price Curves\Commercial Curves\GSGNA Commercial Curves Indication\Daily sheets\" & "GSGNA Commercial Curves Indication_" & VBA.Format(mydate, "MMDDYYYY") & "_" & myhalfday & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
Sheets(Array("TheICE", "Foward Cube", "ICE raw data_previous")).Select
ChDir _
"M:\dept\SLNGNA\Gas LPM\Structuring\Price Curves\Commercial Curves\GSGNA Commercial Curves Indication\Daily PDF"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"M:\dept\SLNGNA\Gas LPM\Structuring\Price Curves\Commercial Curves\GSGNA Commercial Curves Indication\Daily PDF\" & "GSGNA Commercial Curves Indication_" & VBA.Format(mydate, "MMDDYYYY") & "_" & myhalfday & ".pdf"
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Sheets("Daily Summary").Select
Sheets("TheICE").Select
End Sub
The error says "Compile error" Syntoax Error"
Please help
Thanks
----------------------------
Sub SaveDailySummary()
Dim mydate As Date
Dim myhalfday As String
mydate = Sheets("TheICE").Range("B2").Value
myhalfday = Sheets("Daily Summary").Range("J2").Value
Sheets("Daily Summary").Activate
Sheets("Daily Summary").Copy
Cells.Select
Selection.Copy
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:= _
"M:\dept\SLNGNA\Gas LPM\Structuring\Price Curves\Commercial Curves\GSGNA Commercial Curves Indication\Daily sheets\" & "GSGNA Commercial Curves Indication_" & VBA.Format(mydate, "MMDDYYYY") & "_" & myhalfday & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
ActiveWindow.Close
Sheets(Array("TheICE", "Foward Cube", "ICE raw data_previous")).Select
ChDir _
"M:\dept\SLNGNA\Gas LPM\Structuring\Price Curves\Commercial Curves\GSGNA Commercial Curves Indication\Daily PDF"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"M:\dept\SLNGNA\Gas LPM\Structuring\Price Curves\Commercial Curves\GSGNA Commercial Curves Indication\Daily PDF\" & "GSGNA Commercial Curves Indication_" & VBA.Format(mydate, "MMDDYYYY") & "_" & myhalfday & ".pdf"
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Sheets("Daily Summary").Select
Sheets("TheICE").Select
End Sub