Results 1 to 9 of 9

Thread: Excel VBA: How To: Floating VBA Control Panel for Initialization [RESOLVED]

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    May 2004
    Location
    Carlisle, PA
    Posts
    1,045

    Resolved Excel VBA: How To: Floating VBA Control Panel for Initialization [RESOLVED]

    Esteemed Forum Participants and Lurkers:
    ========================================
    Excel '97 VBA

    I am trying to set up an "Initialization Panel" for an Excel Workbook. To get started, I am trying to set up a small floating panel (NOT attached to any worksheet ... just part of the workbook) with TWO pusbuttons ... "Mode 1" and "Mode 2". I want to initialize some Global Variables in the button code, and then close/delete the panel.

    I haven't had much success with the panel approach, but I have successfully used pushbutton controls on a SHEET before. I can make that work.

    Here is what I have tried so far:

    1)I created and saved my TEST Workbook.
    2)I opened the "Controls Toolbox" Toolbar.
    3)I didn't find a "Panel" or a "Form" in the standard toolbar, so I opened the "More Controls" Icon.
    4)The only resource I could find in the "More Controls" list that looked reasonable was the "Microsoft Forms 2.0 Frame", so I clicked on that and was able to open a Popup Panel/Form/Frame(?) and set the Caption to "Select a Mode".
    5)I was able to install a MsgBox test message in the Click Event for the frame ... "Frame1_Click()".

    From here, it gets sticky. I am able to get TWO Control Toolbars ... 1 from Excel ("Control Toolbox"), and evidently a different one from the "Microsoft Forms 2.0 Frame" reference ("Toolbox" with a tab "Controls"). I have created pushbuttons from both toolboxes and set the captions for both, but I can not get to the CODE for either one of them! Right clicking on either an MS(?) button or an Excel button pops up a menu that gives me a "Properties" choice, but the "Code" choice is grayed out. How can I get to the Code template for one or both of these button types.

    Another problem is that the Panel/Form/Frame is only visible while Sheet1 is open ... the sheet that was open when I created the form. When I select any other sheet, the form disappears. How can I keep the form visible REGARDLESS of which sheet is open? Question 2 is how can I 'destruct' the form when I am done with it?

    Thank you for any and all of your gracious comments and assistance with this inquiry.
    Last edited by Webtest; Jun 5th, 2006 at 01:45 PM.
    Blessings in abundance,
    All the Best,
    & ENJOY!

    Art . . . . Carlisle, PA . . USA

Posting Permissions

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



Click Here to Expand Forum to Full Width