JayRenn Posted April 13, 2010 Share Posted April 13, 2010 There are only two functions in my project: the initialization and an OK button. The initialization part does all the work. The OK button just dismisses the form. When I click the OK button, it executes the two lines you see below, then generates error 91, so I have no idea what object it is talking about. Any ideas? Private Sub btnOk_Click() Me.Hide Unload Me End Sub Private Sub UserForm_Initialize() Dim ssetObj As AcadSelectionSet Dim intMode As Integer Dim grpCode(0) As Integer Dim dataVal(0) As Variant Me.Hide Set ssetObj = ThisDrawing.SelectionSets.Add("SS01") intMode = acSelectionSetAll grpCode(0) = 0 dataVal(0) = "KS_SHAPE" ssetObj.Select intMode, , , grpCode, dataVal If ssetObj.Count > 0 Then MsgBox "Found them.", vbOKOnly End If ssetObj.Delete Me.Show End Sub Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.