Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    224
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding a button to a form (Excel 2000)

    Hi

    I have a form with lots of fields, buttons etc.... I have also put macro code behind the buttons and combo boxes. When I double click the button in design mode a click event comes up and then I add the code. Now I want to add a new button to the form, when I double click the button I cannot get the skeleton click event to appear, can anybody tell me what I have missed.

    Thanks

    Mike

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding a button to a form (Excel 2000)

    Both the Visual Basic toolbar and the Control Toolbox toolbar have a button you can use to enter and exit design mode. In design mode, you can double click the command button to edit the OnClick event handler, otherwise, clicking the button activates the event handler.

  3. #3
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    224
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a button to a form (Excel 2000)

    Thanks Hans

    That's how I have always don it, but now when I double click the command button it just takes me to the code but does not give me a click event as in the past.

    Regards

    Mike

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding a button to a form (Excel 2000)

    Sorry, apparently I misread your question. Unfortunately, I have no idea what causes your problem, or how to solve it. <img src=/S/sorry.gif border=0 alt=sorry width=15 height=15>

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a button to a form (Excel 2000)

    Save, close and reopen the file mostly clears this problem. Probably if you type "Me." in the forms module, the button you just added does not appear in the control list. This happens once in a while in XL and Word when editing userforms.

    Sometimes exporting, deleting and importing the userform is needed to clear it.
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  6. #6
    3 Star Lounger
    Join Date
    Nov 2001
    Posts
    224
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a button to a form (Excel 2000)

    Hi Jan,

    Thanks this fixed my problem.

    Regards

    Mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •