Share via

Fixing a runtime error 432

Anonymous
2017-02-15T20:49:32+00:00

I am trying to use VBA to open an in house application. The code runs & hangs on one line, & I get a 432 runtime error "file name or class name not found during automation operation".   If I remove the offending line then, nothing happens (the app. does not open). Here is the current code:

[Sub VISTA()

Dim Msg As String, Ans As Variant

    Msg = "Would you like to open the USA Jobs Class schedule?"

    Ans = MsgBox(Msg, vbYesNo)

    Select Case Ans

    Case vbYes

     Dim MyFolder As String

MyFolder = "C:\ProgramData\Attachmate\Reflection\R04-reflection.r2ws"

 ActiveWorkbook.FollowHyperlink MyFolder

    End Select

End Sub]

It hangs on [ ActiveWorkbook.FollowHyperlink MyFolder].

Any suggestions? Is this even possible?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2017-02-16T15:26:54+00:00

    I found that there was a typo in the code. Here is the correct code:

    [Sub VISTA()

    Dim Msg As String, Ans As Variant

        Msg = "Would you like to open the USA Jobs Class schedule?"

        Ans = MsgBox(Msg, vbYesNo)

        Select Case Ans

        Case vbYes

         Dim MyFolder As String

    MyFolder = "C:\ProgramData\Attachmate\Reflection\R04-reflection.r2w"

     ActiveWorkbook.FollowHyperlink MyFolder

        End Select

    End Sub]

    When I removed the S at the end of r2w, I now get the error code Runtime error !-2147417851 (80010105)!:

    method !followhyperlink! of Object!_workbook! failed. it still hangs in the same location:  [ ActiveWorkbook.FollowHyperlink MyFolder].

    1 person found this answer helpful.
    0 comments No comments