Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Pop up window

  1. #1
    Board Regular
    Join Date
    Apr 2002
    Location
    iceland
    Posts
    138
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi all excel people.

    Is it possible to greate a pop up window.
    I have a picture in .gif format (radiator.gif)

    I have greated a button (called "Picture") in my worksheet. Is it possible to assign a macro to it, so that everytime you push that putton,a window pops up showing that picture (radiator.gif).

    I´m not very good in vba, so if you could givge me the exact code, would be wonderful.


    stulli77@hotmail.com

  2. #2
    Board Regular s-o-s's Avatar
    Join Date
    Apr 2002
    Location
    Kissimmee, Florida
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    You can do this using a form...

    In the VBE Project window insert a User form.
    (Right click the current file)

    select the userform in the main window.

    On the form tool box click the picture button and drag picture to the required size.

    In the properties window.
    Scroll to the "Name" box and click box name the form "Rad1".

    Scroll down to "Picture" box click in the box beside this and browse to your picture(Radiator.gif)

    Next go to a macro module (insert one if not there)

    insert Code as follows

    Sub ShowPic()
    Rad1.Show
    End Sub


    You can tailor your form to have ok buttons etc but the above will work just need to click X in corner to close.

    If you want to use this at a later stage in a macro with buttons the command to turn off the form on an event is

    Rad1.hide

    Hope This Helps
    Hope This Helps.
    Sean.
    Digest of Homes

    WinXP, XL XP

  3. #3
    Board Regular
    Join Date
    Apr 2002
    Location
    iceland
    Posts
    138
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Tank you s-o-s, the popup window works great!

    I have also greated a "close window" button on my userform, how do i make it work?

    where do I write Rad1.hide, do i have to make another module, or do i write it in the same module where i wrote

    Sub ShowPic()
    Rad1.Show
    End Sub

    Tankx for your help

  4. #4
    Board Regular s-o-s's Avatar
    Join Date
    Apr 2002
    Location
    Kissimmee, Florida
    Posts
    384
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-02 06:34, stone wrote:
    Tank you s-o-s, the popup window works great!

    I have also greated a "close window" button on my userform, how do i make it work?

    where do I write Rad1.hide, do i have to make another module, or do i write it in the same module where i wrote

    Sub ShowPic()
    Rad1.Show
    End Sub

    Tankx for your help
    Stone,

    I assume you've added a Command Button from the toolbox.

    Right click the edge of the box and select view code from the shortcut menu. This will give you the start and end of the procedure.

    Insert in between Sub and endsub...

    Rad1.hide

    That's it
    Hope This Helps.
    Sean.
    Digest of Homes

    WinXP, XL XP

  5. #5
    Board Regular
    Join Date
    Apr 2002
    Location
    iceland
    Posts
    138
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default


    ´Great! this works perfectly!

    Thank you very much for your help!

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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