"Compile error" Syntoax Error" Please help

misterno

Board Regular
Joined
Mar 16, 2009
Messages
78
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
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
What's the dangling argument ":=False" on the continued line?

EDIT: question deleted by OP.
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,893
Members
449,194
Latest member
JayEggleton

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top