Code: Select all
BASIC runtime error. Argument is not optional.
Below is my code...
Code: Select all
function FIND_VARIED_MAXIMUM( fromDate as long, toDate as long, station as integer, point as integer, pointType as string, attrib as string, historialAttribute as string )
FIND_VARIED_MAXIMUM = findMax(fromDate, toDate, station, point, pointType, attrib, historialAttribute)
end function
sub findMax(theFromDate as long, theToDate as long, theStation as integer, thePoint as integer, thePointType as integer, theAttribute as string, theHistoricalValue as string)
dim i as integer
dim temp as variant
dim tempTemp as variant
dim teMinutes as integer
tenMinutes = 600
dim time as long
time = 00000000
for i = theFromDate to theToDate step tenMinutes
tempTemp = myaddin.CUST(time, station, category, point, pointType, historicalAttribute, attrib)
if tempTemp > temp then
temp = tempTemp
end if
next i
end sub