1 ''' // ****************************************************************** 2 ''' // Tools Collection for various tasks 3 ''' // (c)digital-ecom 2009 4 ''' // ****************************************************************** 5 6 Option Explicit 7 Option Private Module 8 9 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 10 ''' // DATE RANGES 11 '\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ 12 ''' // Function: Get a date range which can be used within DateTimePicker Controls 13 ''' // Input: 14 ''' // Returns: Array containing date time values which can be converted into a SYSTEMTIME structure 15 ''' // Called By: dlgDemoDatePicker - Image4_Click() and all other Image Click events 16 Function DateRanges_Get() As Variant 17 Dim TimeArray(2, 1) As Variant 18 19 ' Define first element of SYSTEMTIME Array to be minimum date. 20 TimeArray(0, 0) = 1 21 TimeArray(1, 0) = 1 22 TimeArray(2, 0) = 2008 23 24 ' Define second element of SYSTEMTIME Array to be maximum date. 25 TimeArray(0, 1) = day(Now) 26 TimeArray(1, 1) = month(Now) 27 TimeArray(2, 1) = year(Now) 28 29 DateRanges_Get = TimeArray 30 End Function 31