Consulting

Results 1 to 9 of 9

Thread: Web Control in a User Form

  1. #1
    VBAX Contributor
    Joined
    Dec 2004
    Posts
    122
    Location

    Web Control in a User Form

    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.

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    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

  3. #3
    VBAX Contributor
    Joined
    Dec 2004
    Posts
    122
    Location
    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.

  4. #4
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    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

  5. #5
    VBAX Contributor
    Joined
    Dec 2004
    Posts
    122
    Location
    Maybe I should mess with regedit but I don't think it is worth it.

  6. #6
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    You can make the changes with some API code, but that would effect everything in Windows. Not really worth it.

  7. #7
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    Quote Originally Posted by gsouza
    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 Code:
    <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.
    Last edited by Ivan F Moala; 12-18-2004 at 05:58 PM. Reason: coding
    Kind Regards,
    Ivan F Moala From the City of Sails

  8. #8
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    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.
    Kind Regards,
    Ivan F Moala From the City of Sails

  9. #9
    VBAX Contributor
    Joined
    Dec 2004
    Posts
    122
    Location
    Thanks Ivan as always you always have the asnwer.

Posting Permissions

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