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

Global declaration

Status
Not open for further replies.

Brenton

Technical User
Jul 29, 2002
43
US
I have declared 2 objects globaly in my module.

Global RhinoScript As Object
Global Rhino As Object

Sub Main()

Set RhinoScript = CreateObject("Rhino3.Application")
If RhinoScript.Visible = False Then
MsgBox "Rhino must be running to run this plug-in", vbCritical, "Plugin Error"
End
End If
Set Rhino = RhinoScript.GetScriptObject()

VolumeBox.Show

End Sub

When I run a comaand (Rhino.command) I get a runtime error (Error: 1234 Cancel)

What am I doing wrong?

Any help is appreciated.
 
Thats a new one for me
what is a rhino (apart from a very ugly and dangerous beast) and what are you trying to do?
 
I figured it out. Rhino is a cad package with VB support. My problem was I didn't put public in front of my Sub Main()

Thanks

Brenton Pryer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top