Skip to main content

Search

Search

Pictures Change Based On Multiple Checkboxes

Comments

2 comments

  • Avatar
    Legacy Poster

    OK, I have had some luck with this process - I have been able to apply some small VB scripting to the named data source for the first picture.  It's currently doing a simple if-then-elseif-elseif-... through all of the checkboxes and stopping on the first one it finds.  My current plan is to repeat the process for the 2nd, 3rd, and 4th pictures except to stop on the 2nd, 3rd, and 4th checked box consecutively.

     

    I have 2 questions from this:

    1) I tried doing a for loop to cycle through my named data sources for the checkboxes (which were all created back-to-back).  However, the last 4 named data sources that I created - for the pictures - are scattered throughout rather than being either the first 4 or last 4.  In addition, one checkbox shows up twice in the for loop.  Is there a way to make this work?  It would be much better than if-then-elseif-elseif-... balogna.  I suspect that it's just a limitation of how Bartender handles things (my version is 10.1), but I thought I'd ask to be sure.  My code was something like this:

    for counter = 1 to 9

        if not IsNull(Format.NamedSubStrings(counter).Value) then
             Value = Format.NamedSubStrings(counter).value
        end if
    next

     

     

    2) The bigger question - in my checkbox control I have the file name (with path) specified as the value if checked.  However, the value for unchecked is empty.  My "if not IsNull(Format.NamedSubStrings(counter).Value) then" statement tests as true every time, even when unchecked.  Is there a better way to test a checkbox to see if it's checked?  Or do I need to check for the length of the value?  That seems really off to me, surely there's a better way to see if a checkbox is actually checked?

     

     

    Thanks for any help you can provide!

    0
  • Avatar
    Legacy Poster

    Just a thought on question #2: Did you try IsEmpty() also?

    0

Please sign in to leave a comment.