Results 1 to 3 of 3

Writing to files

Threaded View

  1. #1
    Registered User
    Join Date
    06-04-2009
    Location
    New York, NY
    MS-Off Ver
    Excel 2000
    Posts
    2

    Writing to files

    I am writing a simple program to use VBA to write to a file.
       Dim FileNum As Integer
        Dim theFile As String
        Dim fName
        
        fName = "c:\temp\testFile.txt"
        FileNum = FreeFile()
        
        Open theFile For Output As #FileNum
        
        Write #FileNum, "Writing.."
        Close #FileNum
    When I try to run this, I get
    Run time error 75 Path/File Access error

    There are no access issues, this is just on my local directory. The file does not exist. Any help would be much appreciated.
    Last edited by Leith Ross; 06-04-2009 at 06:32 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1