I attached the Docx to show the intent of the program... here is the typ form code and module code....
'---------------------------------------------------------------------------------------
' Form : Gartner_relay_main
' DateTime : 11/15/2012 13:24
' Author : Mark
' Purpose : Code for GTC GUI To Get Commonly used Relay Blocks
'---------------------------------------------------------------------------------------
'###################################
'#### Kele RTE Timer Relays ####
'###################################
Private Sub cmd_kele_common_Click()
'ComboBox_kele_common Dropdown Menu
ComboBox_kele_common.Style = fmStyleDropDownList
'Get ComboBox_kele_common Dropdown Menu user pick
Select Case ComboBox_kele_common.Text
Case "RTE-P1AD24" 'Calls sub from Module_omron
Lbl_kele_common.Caption = "RTE-P1AD24"
kele_rte_p1ad24_get
Case "RTE-P2AD24" 'Calls sub from Module_omron
Lbl_kele_common.Caption = "RTE-P2AD24"
kele_rte_p2ad24_get
Case "RTE-P1AF20" 'Calls sub from Module_omron
Lbl_kele_common.Caption = "RTE-P1AF20"
kele_rte_p1af20_get
Case "RTE-P2AF20" 'Calls sub from Module_omron
Lbl_kele_common.Caption = "RTE-P2AF20"
kele_rte_p2af20_get
End Select
End Sub
''@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
''@@@@@ Combo Box Choices Start @@@
''@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Sub UserForm_Initialize()
'' &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
'' Combo box kele Sequencer / Relay Populate
'' &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
'ComboBox_kele_common Series Populate Choices
ComboBox_kele_transducer_common.AddItem "UCS-221E" 'UCS-221E = 0 Case Selection
ComboBox_kele_transducer_common.AddItem "UCS-421E" 'UCS-421E = 1 Case Selection
'ComboBox_kele_transducer_common First item static
ComboBox_kele_transducer_common.ListIndex = 0
'---------------------------------------------------------------------------------------
' Module : Module_Timer_Switch.
' DateTime : 11/15/2012 11:38
' Author : Mark
' Purpose : This module holds all of the commands to go and get all of the
' Kele Sequencer Relays
' It will be easy to de-bug this way
' enjoy the program.......MP
'---------------------------------------------------------------------------------------
'###################################
'#### Kele Sequencer Relays ####
'###################################
Sub kele_ucs_221e_get()
' Varibles for message box
Dim Msg, Style, Title, Ctxt, Response, MyString
Msg = Msg & "UCS-221E is a 24Vac/Vdc 2 Stage Sequencer Relay" & vbLf ' Define message.
Msg = Msg & "Snap Track Mounted Continue?" & vbLf ' Define message.
Style = vbYesNo + vbInformation + vbDefaultButton1 ' Define buttons.
Title = "UCS-221E" ' Define title.
Ctxt = 1000 ' Define topic
' context.
' Display message.
Response = MsgBox(Msg, Style, Title, Help, Ctxt)
If Response = vbYes Then ' User chose Yes.
'Change to model space if in paperspace
ThisDrawing.ActiveSpace = acModelSpace
Dim insertpoint(0 To 2) As Double
'Hide the window to get The Insertion Point
Gartner_relay_main.hide
'get the origin
ThisDrawing.Application.ActiveDocument.Activate
returnPnt = ThisDrawing.Utility.GetPoint(, "Select Insert Point: ")
insertpoint(0) = returnPnt(0)
insertpoint(1) = returnPnt(1)
insertpoint(2) = returnPnt(2)
'Insert the block
Dim blockRefObj As AcadBlockReference
Set blockRefObj = ThisDrawing.ModelSpace.InsertBlock(returnPnt, "v:\gtc_proj\ACAD_Blocks\Relays_Contactors\Kele\ucs-221e-01.dwg", 1#, 1#, 1#, 0)
'Quicker than a regen...
ZoomAll
ZoomPrevious
End
Else ' User chose No.
End If
End Sub