Results 1 to 9 of 9
  1. #1
    New Lounger
    Join Date
    May 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating a pop-up (Excel xp)

    I have a worksheet where there is a pull-down, which will then show the current month's activities. The user upon clicking on the "Command Button", will show a pop-up with the current month's comments.

    How is this created?

    Any help is greatly appreciated.

    Thanks in advance.
    Aloys

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Creating a pop-up (Excel xp)

    The pull down could be created in several ways depending on which pull-down you are describing. Is it part of a cell or an object floating on the sheet?

    The command button sounds like it has some VBA code attached to it to perform the display task. If you right click the command button - do you have an option to view code?

    In short, we need more information or an attached file sample to tell you how to go about creating the same thing.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    New Lounger
    Join Date
    May 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a pop-up (Excel xp)

    Hi Andrew,

    Here is a copy of the worksheet.

    Hope this helps.....and thanks again, any help is appreciated.

    Aloys

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

    Re: Creating a pop-up (Excel xp)

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> Both the combo box and the command button have been created from the Forms toolbar, not from the Control Toolbox

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Creating a pop-up (Excel xp)

    Good pickup Hans, I stand corrected. I hadn't ever noticed a Forms Toolbar in Excel so I didn't even go looking for it.

    Note to Self: Don't try to answer excel questions without more comprehensive testing.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Creating a pop-up (Excel xp)

    <P ID="edit" class=small>(Edited by Andrew Lockton on 13-May-05 17:14. Hans caught an error - The toolbar that provided the objects was the Forms Toolbar not the Control Toolbox as I incorrectly stated.)</P>Aloys

    The drop down list is called a Combo Box and it is found on the Forms Toolbar. It gets its values from a veryhidden worksheet in that file called Database. When you select something in the list, the value is stored in a cell on this Database sheet. You can discover this by right-clicking the box and choosing Format Control.

    To see the contents of the hidden sheet use the following code...
    <pre>Sub ShowMe()
    With Worksheets("Database")
    If .Visible = xlSheetVeryHidden Then
    .Visible = xlSheetVisible
    .Activate
    Else
    .Visible = xlSheetVeryHidden
    End If
    End With
    End Sub</pre>

    The Comments button also came from the same toolbar. It probably has code associated with it but the file I opened does not show the code as either you removed it before posting the workbook or my macro security protection is working as designed. If you right click on the button you have an option called Assign Macro - this is where you will find the code that runs when the user clicks on the button.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #7
    New Lounger
    Join Date
    May 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a pop-up (Excel xp)

    Thanks for the replies. Yes, these have been created from the Forms toolbar, what I want to also show is that each time a user clicks on the command button, a pop-up will show, indicating the month's comments (if any). Eg, if I choose "April" from the pulldown and click the command button, it will show April's comments(inputted on a comments spreasheet) on the pop up. I also plan to have a userform that the user will be able to add any other comments. This additional comments will be stored also on the comments spreadsheet, but hopefully this script will also be able to capture this additional comments and be shown on the same pop-up.

    I am a beginner with VBA so any help will be greatly appreciated.

    Thanks in advance again.

    Aloys

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

    Re: Creating a pop-up (Excel xp)

    See the attached version. I have added a worksheet named Comments.
    I have also added a UserForm named frmComments in the Visual Basic Editor, with a text box txtComments and two command buttons cmdOK and cmdCancel.
    The userform is opened by a macro ShowForm in the module basGeneral. This macro has been assigned to the command button.
    You can view the design of the form and the code in the Visual Basic Editor. Press Alt+F11 to activate it from Excel.

    Note: macro security should not be set to High (in Tools | Macro | Security); Medium is the recommended setting.

  9. #9
    New Lounger
    Join Date
    May 2005
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating a pop-up (Excel xp)

    Thanks Hans....worked perfectly.....

Posting Permissions

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