I modified my code to:
I get a debug error of Argument not optional on the function posted here? Did I place it in the wrong place or leave out something?Code:Public Sub Monthly (varStar) On Error Resume Next Set WB = Workbooks.Open(Filename:="" & varStar) Call DoesWorkSheetExist Run "RefreshOnOpen" With WB WB.SaveAs Filename:="" End With WB.Close On Error GoTo 0 End Sub




Reply With Quote