Link to home
Start Free TrialLog in
Avatar of pang0018
pang0018

asked on

Triple State check box needed

I am trying to find a 3 state checkbox and can't seem to find an ocx or any kind of instructions to make one. The Check box needs to have values 0 - unchecked, 1 - pending check, 2 - checked.

The values 0,1, and 2 are needed but the descriptions were supplied by me and can be anything. Any help would be great.

Thanks in Advance.
Avatar of DaCableGy
DaCableGy

i don't know of any 3-states that are available controls, but it is easy to make one
use a image and a label and then when the user clicks on either change the image between img0, img1, img2 and repeat
i will look the same if you want to make the img look the same and you can also make some really graphical ones too.
so it will look like
image   label
XXXXX   XXXXXXXXXXXXXXX
X   X   XXXXXXXXXXXXXXX
XXXXX   XXXXXXXXXXXXXXX

and then use something like
sub image_Click
  if image.tag <> 1 and image.tag <> 2 then
    image.tag = 1
    image.picture = img1.src
  end if
  if image.tag = 1 then
    image.tag = 2
    image.picture = img2.src
  end if
  if image.tag = 2 then
    image.tag = 0
    image.picture = img0.src
  end if
end sub

that will create a nice loop so the user can cycle through
hope that starts you in the right direction
---DaCableGy---
ASKER CERTIFIED SOLUTION
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Accept TimCottee's comment as Answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer