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 JAE on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

VBA Macro : Check if the windows is a DMU Navigator 1

Status
Not open for further replies.

nekcorp

New member
Joined
Mar 3, 2015
Messages
12
Location
FR
Hi,

I would like to know if the active window is a DMU Navigator or not. Can you help me ?

Below the code I use. When I launch it I have the error message at the line TypeOf activeWin Is NavigatorWindow:
Compilation Error:
Type defined by the user is undefined



Code:
Sub VerifierDMUNavigator()

    
    Dim activeWin As Object
    Set activeWin = CATIA.ActiveWindow
    
    ' Check if the active window is an instance of NavigatorWindow
    If TypeOf activeWin Is NavigatorWindow Then
        MsgBox "You are in DMU Navigator"
    Else
        MsgBox "You are not in DMU Navigator."
    End If
    
End Sub

Thanks for your help
 
@ferdo
Thank you it is works [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top