-
1
- #1
Nebojsa Milic
Automotive
- Aug 26, 2020
- 2
Hi there,
I'm trying to show userform with commands which are linked to VBA modules.
I have a module "Main_Userform_Show" which has sub procedure and vbModeless code:
Sub UsrfrmShow()
[/indent]Userform1.Show vbModeless
End Sub
When ran from module, Userform1 appears.
When ran from toolbar or CATScript which Ferdo provided, nothing happens;
Sub UsrfrmShow()
Dim param ()
Dim oFilePath, oFileName, oModule As String
Dim oSystemService As Variant
Set oSystemService = CATIA.SystemService
oFilePath = "D:\Works\_Macro\VBA"
oFileName = "VBA LIBRARY.catvba"
oModule = "Main_Userform_Show" ' module name
Dim ss as Variant
Set ss = Catia.SystemService
ss.ExecuteScript oFilePath & oFileName , catScriptLibraryTypeVBAProject , oModule , "UsrfrmShow" , param
Names of userform and module:
Can anyone point me to right direction?
End Sub
I'm trying to show userform with commands which are linked to VBA modules.
I have a module "Main_Userform_Show" which has sub procedure and vbModeless code:
Sub UsrfrmShow()
[/indent]Userform1.Show vbModeless
End Sub
When ran from module, Userform1 appears.
When ran from toolbar or CATScript which Ferdo provided, nothing happens;
Sub UsrfrmShow()
Dim param ()
Dim oFilePath, oFileName, oModule As String
Dim oSystemService As Variant
Set oSystemService = CATIA.SystemService
oFilePath = "D:\Works\_Macro\VBA"
oFileName = "VBA LIBRARY.catvba"
oModule = "Main_Userform_Show" ' module name
Dim ss as Variant
Set ss = Catia.SystemService
ss.ExecuteScript oFilePath & oFileName , catScriptLibraryTypeVBAProject , oModule , "UsrfrmShow" , param
Names of userform and module:
Can anyone point me to right direction?
End Sub