R
RobertS
I pulled the follwoing from A-97 help. I put "ListMondays"
into the RowSourceType property for a ComboBox. Do i need
to put arguments also? If so, how? Do I need an "=" sign?
Is there any help available for this feature?
The following user-defined function returns a list of the
next four Mondays following today's date. To call this
function from a list box control, enter ListMondays as the
RowSourceType property setting and leave the RowSource
property setting blank.
Function ListMondays(fld As Control,id As Variant,row As
Variant,col As Variant,code As Variant) As Variant
Dim intOffset As Integer
Select Case code
Case acLBInitialize
' Initialize.
ListMondays = True
Case acLBOpen 'Open.
ListMondays = Timer 'Unique ID.
Case acLBGetRowCount 'Get rows.
ListMondays = 4
Case acLBGetColumnCount 'Get columns.
ListMondays = 1
Case acLBGetColumnWidth 'Get col width.
ListMondays = -1 'Use default
width.
Case acLBGetValue 'Get the data.
intOffset = Abs((9 - Weekday(Now))
Mod 7)
ListMondays = Format(Now() + _
intOffset + 7 * row,"mmmm d")
End Select
End Function
Thanks!
into the RowSourceType property for a ComboBox. Do i need
to put arguments also? If so, how? Do I need an "=" sign?
Is there any help available for this feature?
The following user-defined function returns a list of the
next four Mondays following today's date. To call this
function from a list box control, enter ListMondays as the
RowSourceType property setting and leave the RowSource
property setting blank.
Function ListMondays(fld As Control,id As Variant,row As
Variant,col As Variant,code As Variant) As Variant
Dim intOffset As Integer
Select Case code
Case acLBInitialize
' Initialize.
ListMondays = True
Case acLBOpen 'Open.
ListMondays = Timer 'Unique ID.
Case acLBGetRowCount 'Get rows.
ListMondays = 4
Case acLBGetColumnCount 'Get columns.
ListMondays = 1
Case acLBGetColumnWidth 'Get col width.
ListMondays = -1 'Use default
width.
Case acLBGetValue 'Get the data.
intOffset = Abs((9 - Weekday(Now))
Mod 7)
ListMondays = Format(Now() + _
intOffset + 7 * row,"mmmm d")
End Select
End Function
Thanks!