Make a menu called mnuTest with a SubMenu called mnuSub. Make sure that that Index property for it is set to 0.
Now insert this code into a CommandButton on the Form. Also, make sure that there is a TextBox on the Form as well.
Code:Private Sub Command1_Click() Load mnuSub(mnuSub.Count) ' Loads another menu MyInt = mnuSub.Count - 1 ' Get the Index for the menu mnuSub(MyInt).Caption = Text1.Text ' Set the caption to whatever is in the TextBox. End Sub
[Edited by Megatron on 06-18-2000 at 01:55 PM]




Reply With Quote