PDA

View Full Version : Solved: Web Control in a User Form



gsouza
12-17-2004, 06:14 AM
:006: Hi everybody this is my first post. I don't know if this can be done, I have tried to do this but have failed. Is there anyway to change the background color of a Web Control. If so I would love to know how to do it. I want the back ground color to match the gif file I have associated with it.
Thanks for any help.

Jacob Hilderbrand
12-17-2004, 07:11 AM
No, I don't believe you can do that. Are you using the web control to run an animated gif? If so try this alternative.

http://www.vbaexpress.com/kb/getarticle.php?kb_id=19

gsouza
12-17-2004, 07:25 AM
Yes I am using it to run an animated gif. The code you gave me I have seen before and actually I am using it in another program I wrote. It works great. I just can't believe we can't change the background of a control. Thank you for your advise. I am going to give up trying to change the background.

Jacob Hilderbrand
12-17-2004, 07:31 AM
Yeah, it's strange that some colors cannot be changed (Except by messing with the settings on Windows). For example, a Multipage control has no back color to change, which is annoying if you want to change to color of the User Form and want the Multipage to look the same.

Anyways, glad to help. :)

Take Care

gsouza
12-17-2004, 07:34 AM
Maybe I should mess with regedit but I don't think it is worth it.

Jacob Hilderbrand
12-17-2004, 07:42 AM
You can make the changes with some API code, but that would effect everything in Windows. Not really worth it.

Ivan F Moala
12-17-2004, 08:19 PM
:006: Hi everybody this is my first post. I don't know if this can be done, I have tried to do this but have failed. Is there anyway to change the background color of a Web Control. If so I would love to know how to do it. I want the back ground color to match the gif file I have associated with it.
Thanks for any help.

Yes you CAN. BUT you will need to have a loader page with html coding to
reference your gif and then code the page to change colour.

Note: The BG colour matching of the gif will need to be done manually
ie you will need to set this colour to match in your html code.

briefly: Here is what I have done

saved the following as html

<HTML>
<CENTER>
<BODY
bgColor = "WHITE"
SCROLL="NO"
<a href="http://www.xcelfiles.com ">
<IMG SRC="C:\MySite\A.gif"
Border = 0
Align = MIDDLE>
</a>
</CENTER>
</html>

called it "Test.html"

Loaded this up via usually method of the control.

Change the address to your animated gif, to yours.

Ivan F Moala
12-18-2004, 03:48 PM
I have a routine that will create Animated gif files on the fly using API's
(Not published yet) from Data sets within the workbook. What this means is that you don't need to include the animated gif IF you move the file around.
This routine coupled with the html coding will allow you to run animated gifs within your userform and allow you to transport just the file.

gsouza
12-20-2004, 05:35 AM
Thanks Ivan as always you always have the asnwer.