Here's a thought! ... why not write code to determine if the year is a leap
year, then you won't have to ask the user (who may respond incorrectly) ...
MVP Visual Basic
Please respond only to the newsgroups so all can benefit.
: Thank you both for all of your help!!! Yep, looks like I missed the "end
: if" there, and now the code works perfect!!! One question for you guys if
: may; is there a way to use "Case like something" with Select Case? I know
: you can use <>= not, etc... but when I try "like" it gives me an error? I
: wanted to try to set up the below program so that if the person accidently
: mispells the month, it still will work using case like "feb" for example.
: But Select case does not seem to like, "like", which is mind boggling to
: Or is there a special syntax to use for that? Any ideas? And thanks
: for al the help!!!! One step closer for me to not be a VB newbie:)
: > >>Private Sub Febber(f, Feb)
: > >>
: > >>Do While f=1
: > >> Feb = InputBox("Is this a leap year?", "Leap Year?")
: > >>
: > >> If UCase(Feb) Like "Y*" Then
: > >> f = 29
: > >> ElseIf UCase(Feb) Like "N*" Then
: > >> f = 28
: > >> Else: f = 1
: > >>Loop
: > >>
: > >>End Sub
: > >
: > >I don't see an "EndIf" to complete your IF block??? Likely your
: > >The error message merely has problems diagnosing your error clearly.
: > >
: > Yup, i'd say so too.
: > Especially for newbies (although i still do this myself) i would
: > recommend to write if or select blocks by writing out the conditional
: > part and straigh away putting the block end line down. Then go up and
: > fill in the in-between stuff. Putting a little reminder at the end
: > line also helps, when things span out a bit longish.
: > S'thing like :
: > if boo then
: > end if 'boo
: > --
: > Regards, Frank