Help with Runtime error 75

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Help with Runtime error 75

  1. #1
    Join Date
    Aug 2009

    Help with Runtime error 75


    I am working on a piece of code which checks to see if a particular directory name exists and if not created it, later saving an excel file into it. It works well first time, but when teh code tries to open and save another file in this same directory it returns error 75

    I know its because the created directory is Read Only. How do I set the ditrectroy access writes at the time of craetion?

    It seems that it does not even allow me to change it manually from the properties dialogue? Here is teh code:

    Sub ArchiveFile()
    Dim strDN As String
    Dim strFN As String
    strDN = Range("E5")
    MsgBox strDN
    'If Len(Dir("c:\Instructions.doc")) = 0 Then
    If Dir("G:\PUBS\PP-MS\INVOICES\" & strDN) = "" Then
    MkDir ("G:\PUBS\PP-MS\INVOICES\" & strDN)
            'do nothing as the directory already exists
            'MsgBox "C:\Text Files\ directory already exists"
        End If
    strFN = Range("K2") & ".xls"
    MsgBox strFN
    ChDir "G:\PUBS\PP-MS\INVOICES\" & strDN
    ActiveWorkbook.SaveAs Filename:=strFN, _
            FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
            ReadOnlyRecommended:=False, CreateBackup:=False
    End Sub
    Will be grateful for any help on this.



  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 0
    Last Post: 05-15-2008, 04:24 PM
  2. Runtime libraries installation
    By Rahul Dixit in forum C++
    Replies: 5
    Last Post: 07-18-2005, 07:21 PM
  3. Java Runtime
    By Sam in forum Java
    Replies: 3
    Last Post: 04-08-2002, 10:24 AM
  4. Replies: 0
    Last Post: 04-04-2002, 11:23 PM
  5. wot is CLR
    By lostguy in forum .NET
    Replies: 8
    Last Post: 04-03-2002, 06:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center