Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm sure this must be blindingly obvious to everyone but me, but ....
I have a userform with a list box for user to choose from a list of dates which determines the start date of a range to be analysed. My code is in a general module, so I have declared the two variables to hold the date and the list index globally, in the code general module. The following is my code. I can't for the life of me work out why the function correctly assigns the date value to the list index, as displayed within the function, but on return to the code the variable is empty!! aaarrrgghhh!!! Many thanks for any help - Matilda public dStDt as date, iLstIndx as integer sub mySub() dStDt = startDateIs(dStDt) msgbox dStDt ' display results of function on return end sub function startDateIs(byVal dStDt) as date select case iLstIndx case 0 ' set value to dStDt case 1 'set value to dStDt etc... end select msgbox dStDt 'display results of function end function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function changed | Excel Worksheet Functions | |||
Is there a do not call function? | Excel Discussion (Misc queries) | |||
Call a Function | Excel Programming | |||
Returning actual page field changed in pivottable | Excel Programming | |||
returning ranges offset from argument range function call | Excel Programming |