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

Thread: Active X checkbox

  1. #1
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi,

    I have a worksheet in which i have put some active x checkboxes. Some of them need to be very close, even almost overlapping. I have all the check boxes in the correct positions, and i set the backstyle to transparent. When i apply the changes, the checkboxes look good, but then when i exit design mode and click on the check boxes, they become opaque and partially cover other boxes near them. Is there a way to make the check boxes STAY transparent?

    Thanks

  2. #2
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi robfo0

    I have come across this problem before I spent about 15 minutes on it and gave up. I know this doesn't help you directly but it may save you wasting your time.



  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    heh, thanks dave

    so this leads me back to my original question from a few days ago. I want to know if its possible to trigger a macro with a checkbox which i created from the forms menu ON a worksheet, not userform.

    I can make this happen with active x controls, but the non-transparency is a problem.

    Im sure theres a way to do this as you can trigger events with pretty much everything else. any help is appreciated! thanks

    I know i can link a macro to it, but i want different things to happen if it is checked, and if it is unchecked. I CAN do this by linking to another cell then basing the macro on true or false, but is there a way to do it without doing that?

    [ This Message was edited by: robfo0 on 2002-03-16 11:13 ]

  4. #4
    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

    You cannot trigger an event with the forms
    control for the way you wish to do this.

    What you would typically do i assign a macro
    the the forms shape eg right click then assign macro.

    Typical macro would look like;

    Public Const UnChecked = -4146
    Public Const Checked = 1

    Sub Test()

    If ActiveSheet.Shapes("Check Box 6").ControlFormat.Value = UnChecked Then
    MsgBox "The checkbox was NOT checked"
    Else
    MsgBox "The checkbos WAS Checked"
    End If

    End Sub

    Because the Checkbox from the forms combar
    is part of the shapes collection you have to use the Shapes controlformat to
    get its properties & methods.


    Ivan


    Ivan

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Stockton, California
    Posts
    281
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Thanks ivan, thats what i was looking, although i had to change the code to this:

    Sub Test()

    If ActiveSheet.Shapes("Check Box 6").ControlFormat.Value = Checked Then
    MsgBox "The checkbox was checked"
    Else
    MsgBox "The checkbos was not Checked"
    End If

    End Sub

    it was giving the same result when i used yours...*shrug*

    Thanks very much though!

    for some reason, it was giving me the

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
  •