since i have this in several macros i wanted to create a function that i can call.
the status bar argument uses two variables: timeremaining and labels. the second is for when the time goes below 1 min. then the label is changed to sec. the 'timeremaining' calculation uses the two variables time1 and time2.
now since the default is 'by ref', could i pass three variables to a function, the third being timeremaining which will be updated by the function. then since the function can only return one variable all i need to pick up is 'label'.
finally how do i get the result back into the calling procedure?
sub
.
status time1, time2, timeremaining
.
endsub
function status(time1,time2,timeremaining)
(stuff happens)
timeremaining = (this will update the timeremaining variable in the procedure?)
if timeremaining<1 then
labels = "sec."
endif
then what to do for the above procedure to get 'labels'?
thanks
al
This message was edited by almagg on 2002-10-30 15:18
the status bar argument uses two variables: timeremaining and labels. the second is for when the time goes below 1 min. then the label is changed to sec. the 'timeremaining' calculation uses the two variables time1 and time2.
now since the default is 'by ref', could i pass three variables to a function, the third being timeremaining which will be updated by the function. then since the function can only return one variable all i need to pick up is 'label'.
finally how do i get the result back into the calling procedure?
sub
.
status time1, time2, timeremaining
.
endsub
function status(time1,time2,timeremaining)
(stuff happens)
timeremaining = (this will update the timeremaining variable in the procedure?)
if timeremaining<1 then
labels = "sec."
endif
then what to do for the above procedure to get 'labels'?
thanks
al
This message was edited by almagg on 2002-10-30 15:18