Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

F8 failing to work ... Bad Day? Grey Moment? Other?

Status
Not open for further replies.

oscarse

Programmer
Apr 9, 2006
99
CA
Office 2K3 Access 2K3 VBA ... entered a public FOO() sub and or function;

Option Compare Database
Option Explicit
Public Function foo()
Dim fs
fs = CreateObject("Scripting.filesystemobject")
Debug.Print fs.DriveExists("J:")
Debug.Print fs.FolderExists("J:\RA\wo\065K")
Debug.Print fs.FileExists("J:\RA\wo\065K\65119-001.jpg")

End Function

F8 is not greyed out but just Bomps at me with no error messages F5 does the same???

Can SOMEONE PLEASE EXPLAIN TO ME WHAT IS GOING ON.
 
You need a 'set':

Set fs = CreateObject("Scripting.filesystemobject")
 
Thanx ... actually it was a grey moment!!!! ... CODE CANNOT BE TESTED IN A FORM UNLESS THE FORM IS RUNNING ... I moved the code to a module and bada bing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top