ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Creating a Date Selector in Excel VBA? (https://www.excelbanter.com/excel-discussion-misc-queries/577-re-creating-date-selector-excel-vba.html)

Mark

Creating a Date Selector in Excel VBA?
 
check out my calendars at:

http://au.geocities.com/windsofmark



However, if you want an Excel-based Calendar and schedule
list, then send the info to me and I will create it.

see my excel stuff at:
http://www.geocities.com/excelmarksway




- -Mark

-----Original Message-----

I'm trying to create a spreadsheet that allows you to

define maintenance
schedules for lanscape management work.

The items that are going to be in the maintenance

schedule generally
occur yearly (e.g. turf refurbishment) or monthly (e.g.

litter
collection, grass cutting).

I want to be able to have a dialog box appear that allows

the user to
specify for the yearly items what date of the year

maintenance occurs
(dd/mm/yyyy) or for the monthly items what date of the

month
maintenance occurs (dd/mm).

Does anyone have any ideas about how best to achieve

this? I thought
about have 3 textboxes with spinnerbuttons bound to them

so the user
can create their own dates by selected the dd/mm/yyyy

components
seperately, or maybe 3 drop down lists that do the same

thing.

However.......if I did this, how would I stop dates being

created that
don't actually exist? E.g. 30th February, 31st September

etc?

I suppose I could write an error handling routine for

each month
selected and check to see if the days selected for that

month fall
within an acceptable range e.g. range for September would

be:

Range
Septmember_Days = 1
September_Days < 31

The user would need to click an 'OK' button once they

have the date
entered as they want it, and then the date from the

textboxes is passed
to a variable, or perhaps stored in a cell somewhere.

Whatever, as long
as it's retrievable later on in the application.

But is there a better way of doing this? I would have

thought Excel
would have some kind of built-in calandar type function

to do this sort
of thing but I can't seem to locate it if it does.

Cheers
-Rob


--
TheRobsterUK
----------------------------------------------------------

--------------
TheRobsterUK's Profile:

http://www.excelforum.com/member.php?
action=getinfo&userid=9924
View this thread:

http://www.excelforum.com/showthread...hreadid=320436

.



All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com