Thank you
--
Jay Horvitz
jay...@home.com
You'll need six rows, not five.
>that will show the date, Is there a way that I
> can populate these without having to do a separate form for each month?
Is there a reason you're not using one of the calendar controls?
Terry Austin
Rick
Dim StartBox As Integer
Dim LastDay As Integer
Dim TheYear As Integer
Dim TheMonth As Integer
' Calculate the Index number for the
' Label that will receive Day #1
StartBox = Weekday(DateSerial(TheYear, _
TheMonth, 1)) - 1
' Calculate the last day of the month
LastDay = Day(DateSerial(TheYear, _
TheMonth + 1, 0))
' Clear existing Labels that might not
' be overwritten with a new day number
For x = 0 To 6
Label1(x).Caption = ""
Label1(x + 28).Caption = ""
Label1(x + 35).Caption = ""
Next
' Fill in the days of the month
For x = StartBox To StartBox + LastDay - 1
Label1(x).Caption = x - StartBox + 1
Next
"Jay Horvitz" <jay...@home.com> wrote in message
news:0MTN7.198987$My2.11...@news1.mntp1.il.home.com...
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net
<snip>
>Is there a reason you're not using one of the calendar controls?
>
>Terry Austin
>
I've heard of many problems with the calendar control
>
Why wouldn't you just use the built in calendar object?
>
>
> "Jay Horvitz" <jay...@home.com> wrote in message
> news:0MTN7.198987$My2.11...@news1.mntp1.il.home.com...
> > I am writing a program that uses a calendar but I am not sure how to
> > populate it. I have 2 text boxes that will show the month and year, and
I
> > have 35 smaller text boxes that will show the date, Is there a way that
I
> > can populate these without having to do a separate form for each month?
> >
> > Thank you
> >
> > --
> > Jay Horvitz
> > jay...@home.com
> >
> >
>
>
____________________________________________________________________________
__
> Posted Via Binaries.net = SPEED+RETENTION+COMPLETION =
http://www.binaries.net
-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----
Your question was asked earlier by Terry Austin and responded to by J French. I decided to
show an algorithm that worked in case Jay wanted to continue to do it himself. Besides, my
way allows for customizations of functionality that a "canned" control may not offer.
Rick
______________________________________________________________________________
>> Why wouldn't you just use the built in calendar object?
Because it is (reportedly) buggy - also it is another dreaded OCX -
also because Rick Rothstein has shown how to avoid such problems.
I count 3 reasons.
Each of which, alone, is sufficient. I was merely curious.
Terry Austin
That would be an excellent reason. It certainly gives you fits
with the P&D wizard until you edit the dependency file.
Haven't had any trouble with it since then, though.
Terry Austin