MarkX Posted October 30, 2008 Posted October 30, 2008 I am not a programer but my boss wants me to do this so i am going to do my best to get it done. I need to create a userform that will allow for ten or so different selection rules for a drawing. These rules will turn layers in the drawing on and off depending on parameters in the selection rule. I have found a few things that I think might be helpful but I am unsure of how to change them or what I need to do to make them work for me. I know that I need to make a userform and then give it code to do this but I just am unsure where to even start. Any help or ideas of where to start would be great. Quote
CmdrDuh Posted October 30, 2008 Posted October 30, 2008 List out your 10 items and how you want it to work, then we can code it with you Quote
borgunit Posted October 30, 2008 Posted October 30, 2008 A place to start... http://www.dailyautocad.com/autocad/my-first-vba-application-in-autocad/ Quote
MarkX Posted October 30, 2008 Author Posted October 30, 2008 List out your 10 items and how you want it to work, then we can code it with you The ten items are going to be custom selection options that my boss is going to define for me. He wants them to be selectable from a drop down menu or I think it is called a Combobox in VBA. I need help setting up the userform to get combobox setup so i will be able to put the codes in that he wants. I am not even sure how to setup a combobox so that it can have ten items to select from. I should be getting the specs for the code later today and will post them as soon as i can. Thank you for all your help. This is part of the old version of the code that i am making thin new macro for. Option Explicit ' *** Public Declarations **** ' Public strModelNum As String Public strSalesOrdNum As String Public objLayer As AcadLayer Private Sub cbo9_Change() On Error GoTo Err_Control If cbo9.Value = "U = Pueblo" Then dig9.Caption = "U" dig9.BackColor = &HFF00& stopgo9.BackColor = &HFF00& ElseIf cbo9.Value = "E = Charmes" Then dig9.Caption = "E" dig9.BackColor = &HFF00& stopgo9.BackColor = &HFF00& ElseIf cbo9.Value = "C = China" Then dig9.Caption = "C" dig9.BackColor = &HFF00& stopgo9.BackColor = &HFF00& ElseIf cbo9.Value = "" Then stopgo9.BackColor = &HFF& dig9.BackColor = &HFF& End If stopgo13.BackColor = &HFF& stopgo16.BackColor = &HFF& stopgo26.BackColor = &HFF& stopgo27.BackColor = &HFF& stopgo28.BackColor = &HFF& dig13.BackColor = &HFF& dig16.BackColor = &HFF& dig26.BackColor = &HFF& dig27.BackColor = &HFF& dig28.BackColor = &HFF& cbo13.Clear cbo16.Clear cbo26.Clear cbo27.Clear cbo28.Clear dig13.Caption = "" dig16.Caption = "" dig26.Caption = "" dig27.Caption = "" dig28.Caption = "" cbo16.Enabled = False cbo26.Enabled = False cbo27.Enabled = False cbo28.Enabled = False cbo13.AddItem "U = C/UL Listing" cbo13.AddItem "C = CE Listing" cbo13.Enabled = True cbo13.SetFocus Exit_Here: Exit Sub Err_Control: Debug.Print Err.Number MsgBox Err.Description End Sub Quote
MarkX Posted November 3, 2008 Author Posted November 3, 2008 From the information in the zip file i need to make a userform that will allow for a menu or two that has the Region, Unit conf, Compressor power, Fans, Pump package, and for each of the items below the tilte to match the layers with that description and when selected to turn off all the other layers. SCHEMATIC INFORMATION.zip Quote
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.