I have a listbox form that displays a list used for multiple reasons. I.E. it lists templates and you can select them to be modified, to view a summary, etc. This listbox is launched from other forms.
Question: Is there a way to have multiple buttons on this list box but only enable certain ones depending on which form launched it?
I have successfully passed this to the next form. It works..BUT. I have different buttons on the same calling form opening the next form and enabling buttons. How do I pass the button as well as the form information?
Here is what I have so far...you can see it is not going to work because the name is the same:
Private Sub Form_Load()
Select Case Me.OpenArgs
Me.Command13.Enabled = True
Me.Command3.Enabled = True
Me.Name is only passing the name of the form. Look at ActiveControl to get the name of the selected button (if you're actually using buttons). You'd have to concatenate the two together along with the delimiter.