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

Thread: How do I enforce the transparent property of certain activeX

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hello everyone!
    This has been an ongoing nuisance for me and I hope there is a solution.
    If I set the backstyle property of a commandbutton to transparent, it works until the button is clicked. The button's background is a shape object with a color gradiant, so I cannot solve this problem by simply changing the backcolor of the button.
    Any suggestions, work-arounds?
    Thanks,
    Tom

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-05-10 20:37, TsTom wrote:
    Hello everyone!
    This has been an ongoing nuisance for me and I hope there is a solution.
    If I set the backstyle property of a commandbutton to transparent, it works until the button is clicked. The button's background is a shape object with a color gradiant, so I cannot solve this problem by simply changing the backcolor of the button.
    Any suggestions, work-arounds?
    Thanks,
    Tom
    Hi Tom
    I have my theory on why it will not work...

    But as a work around Try:

    1) Using a Frame control (from Forms control)
    2) To get the Frame control to the colour
    gardient try selecting your current Shape
    and copying & paste into paint prgm.
    save as name OR just do a copy & paste
    Directly into the frames property.

    The Frame on a worksheet is an embedded
    self contained object that will hold its
    own objects.
    What you have to do is to
    1) Get into Edit mode
    2) Select the Frame
    3) Right click on it and select Frame
    object > EDIT
    4) From the Edit mode select the ActiveX
    control buttons and place them in the
    container. In your case the cmdbutton
    If the ActiveX toolbox doesn't appear then
    right clci k again and from the selection
    choose > Toolbox....select your control
    to insert into the container here.

    You need to be in Edit mode and right click
    Then select Toolbox to select the cmdbtn
    to insert > right click and set background
    here.......
    Kind Regards,
    Ivan F Moala From the City of Sails

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks for the reply Ivan.
    I may have muddied the waters by including the irrelevant information about what type of surface the commandbutton was placed on. This transparency problem does not seem to care where the control is placed. I tried placing the button on a frame as to your advice in your reply and it did not seem to help in my case.
    A workaround for now appears to be:

    Sub ControlInQuestion_Click()
    ControlInQuestion.Visible = False
    ControlInQuestion.Visible = True
    'Code Here
    End Sub

    Seems to reset the initial properties.

    If you have any other suggestions, please reply.

    Thanks again for your help,
    Tom

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
  •