Thread: [Solved] Error in VBA code
View Single Post
 
Old 11-13-2014, 08:19 AM
ozman86 ozman86 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Nov 2014
Posts: 4
ozman86 is on a distinguished road
Default Error in VBA code

Compile Error:
Syntax Error


the above error is coming for the below code . it happens when inject the Day condition

Private Sub TestFileExistence()


If FileFolderExists("\\cf3.pepsico.pvt\psra\Output\BI 4\Exec Dollars - Current Period.pdf")and
weekday(date) = 2 Then

Range("A1").Value = "X"

Else

Range("A1").Value = "!"

End If
End Sub
Reply With Quote