Pop up window

stone

Board Regular
Joined
Apr 25, 2002
Messages
138
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
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
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

<MARQUEE/> :cool: Hope This Helps :cool: </MARQUEE>
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,529
Messages
6,120,070
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top