Results 1 to 11 of 11
  1. #1
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have a runtime error 75 when I run a macro from my Excel userform. I’m able to navigate to different userforms, but when I run a macro that is used to replace a word .docm it fails. I’m using XP with Office 2007. I have this same program set up on a different computer and it works great. I have enabled all macros in both Excel and Word.

  2. #2
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Also I'm aware that this could possibly be a Registry issue. not sure
    Do I need to use a Registry Fix tool, and if so does anyone no of a free one that may work.

  3. #3
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Before we worry about the registry, are you up-to-date with Office 2007 service packs?
    Your code may need to be changed to function in the 2007 environment.
    can you post the code for the failing macro?
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  4. #4
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by WebGenii View Post
    Before we worry about the registry, are you up-to-date with Office 2007 service packs?
    Your code may need to be changed to function in the 2007 environment.
    can you post the code for the failing macro?
    Hi Catharine
    Here is the code that is used when if fails
    Code:
    Dim arrFiles As Variant
    Dim i As Long
       Const Folder1 = "Texas Report", Folder2 = "Texas Report New"
        'note - following assumes all extensions of these files are the same!
            arrFiles = VBA.Array("Additional Photo's", "Client Information", _
            "Cover Page", "Summary", "REl 7A-1 Part 1", "REl 7A-1 Part 2")
            
     
    
        OldPath = Replace(ThisWorkbook.FullName, ThisWorkbook.Name, Folder2 & "\")
        NewPath = Replace(ThisWorkbook.FullName, ThisWorkbook.Name, Folder1 & "\")
        If Dir(OldPath, vbDirectory) = "" Then MsgBox "Folder  " & OldPath & "  not found", vbCritical, "Error": Exit Sub
        If Dir(NewPath, vbDirectory) = "" Then MsgBox "Folder  " & NewPath & "  not found", vbCritical, "Error": Exit Sub
        For i = 0 To UBound(arrFiles)
            If Dir(OldPath & arrFiles(i) & ".docm") = "" Then
                MsgBox "File  " & arrFiles(i) & ".docm" & "  not found", vbCritical, "Error"
            Else
                FileCopy OldPath & arrFiles(i) & ".docm", NewPath & arrFiles(i) & ".docm"
            End If
        Next i
    Im not sure about up-to-date with Office 2007 service packs, the other computer is a friends. My guess is probably not. I suggested to my friend to unistall Office 2007 and then reinstall and see if that corrects the problem. does that sound about right ?

  5. #5
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by ABabeNChrist View Post
    Im not sure about up-to-date with Office 2007 service packs, the other computer is a friends. My guess is probably not. I suggested to my friend to unistall Office 2007 and then reinstall and see if that corrects the problem. does that sound about right ?
    Uninstalling and reinstalling office will not install a service pack. See this microsoft link for information on Service Pack 2.
    Be aware that sometimes installing a Service Pack will cause other problems (sigh).
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  6. #6
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts
    Further, I had a similar type of problem a while ago. Try this thread.
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  7. #7
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thank you Catharine
    I'll check it out and let you later know later.

  8. #8
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Do you have the correct permissions to access those files?
    Regards,
    Rory

    Microsoft MVP - Excel

  9. #9
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi rory
    I'm not sure what you mean by "correct permissions to access those files? "

  10. #10
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if you are refering to the code above as to access. I dont need code to access, the code tell me where its at..........dah
    also this is my project.

  11. #11
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    Your code copies files. In order to do that, you need read access to the folder where the file currently is and write access to the folder that it is being copied to.
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

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