Variable always offset by 1 row....

LizaM liza.mccarron at uwe.ac.uk
Mon Dec 14 10:04:45 UTC 2009


Thanks for posting the ElseIf correction - I had worked that out and
was going to post but forgot!

In testing before I discovered the correction I did however find that
if you use  Else If instead you then have to end each with a seperate
End If statement... seemed to achieve the same results but obviously
messy code!

On Dec 10, 3:11 am, dkmcf <mcfar... at msu.edu> wrote:
> On Dec 7, 2:29 pm, David McFarlane <mcfar... at msu.edu> wrote:
>
>
>
>
>
> > In general, if you mean
> > a series of If..Thens to have only one effect (like a "radio button"
> > instead of a "check box"), it makes more sense to use the full
> > If..Then..Else If structure, thus,
>
> > If CardSlideA.RESP = "c" then
> >      falsecardfilename1 = "circle.jpg"
> > Else If CardSlideA.RESP = "v" then
> >      falsecardfilename1 = "cross.jpg"
> > Else If CardSlideA.RESP = "b" then
> >      falsecardfilename1 = "square.jpg"
> > Else If CardSlideA.RESP = "n" then
> >      falsecardfilename1 = "squiggle.jpg"
> > Else If CardSlideA.RESP = "m"
> >      then falsecardfilename1 = "star.jpg"
> > Else  ' defensive programming!
> >      MsgBox "Unanticipated CardSlideA.RESP!"
> > End If
> > c.setattrib "falsecardfilename", falsecardfilename1
>
> Sorry to keep correcting my own examples, but I keep forgetting that
> in E-Basic, although "End If" is two words, "ElseIf" is only one.  So
> that example should read
>
> If CardSlideA.RESP = "c" then
>      falsecardfilename1 = "circle.jpg"
> ElseIf CardSlideA.RESP = "v" then
>      falsecardfilename1 = "cross.jpg"
> ElseIf CardSlideA.RESP = "b" then
>      falsecardfilename1 = "square.jpg"
> ElseIf CardSlideA.RESP = "n" then
>      falsecardfilename1 = "squiggle.jpg"
> ElseIf CardSlideA.RESP = "m"
>      then falsecardfilename1 = "star.jpg"
> Else  ' defensive programming!
>      MsgBox "Unanticipated CardSlideA.RESP!"
> End If
> c.setattrib "falsecardfilename", falsecardfilename1
>
> -- David McFarlane, Professional (& occasionally sloppy) Faultfinder- Hide quoted text -
>
> - Show quoted text -

--

You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list