Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 11-13-2014, 08:24 PM
macropod's Avatar
macropod macropod is offline Error in VBA code Windows 7 64bit Error in VBA code Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I assume you have a function 'FileFolderExists' somewhere, since that's not a native VBA function.

Try:
Code:
Private Sub TestFileExistence()
If Dir("\\cf3.pepsico.pvt\psra\Output\BI 4\Exec Dollars - Current Period.pdf", vbNormal) <> "" Then
  If Weekday(Date) = 2 Then
    Range("A1").Value = "X"
  Else
    Range("A1").Value = "!"
  End If
Else
  Range("A1").Value = "!"
End If
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
error code 30029-4 zignaasa Office 0 05-24-2014 10:07 PM
Error in VBA code Error Code 5453 Word has finished searching the document Charles Kenyon Word VBA 2 05-17-2012 11:18 AM
Code Error - Hiding comments and revisions silvrwoman Word VBA 6 03-24-2012 10:15 PM
Error in VBA code Microsoft Code Error 1907 JHauglid Office 1 02-27-2012 12:15 AM
Error code 0x800CCC80 Kevin Outlook 1 03-18-2011 07:20 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft