gambit
March 27th, 2001, 05:12 AM
hi
hope some one can help.
After running the code below i always can this run-time error '91', Object Variable or with block variable not set
why is that so?
private function myfn() as integer
dim i as integer
i = 1
if i = 1 then
fn = 0
msgbox ("0",)
else if i = 3 then
fn = 2
end if
end function
private sub mysub ()
dim abc as integer
abc = myfn
if abc = 1 then
msgbox "error:", , "debug"
elseif abd = 2 then
exit sub
end if
end sub
after 0 was printed out , the error message came out.
thank you!
hope some one can help.
After running the code below i always can this run-time error '91', Object Variable or with block variable not set
why is that so?
private function myfn() as integer
dim i as integer
i = 1
if i = 1 then
fn = 0
msgbox ("0",)
else if i = 3 then
fn = 2
end if
end function
private sub mysub ()
dim abc as integer
abc = myfn
if abc = 1 then
msgbox "error:", , "debug"
elseif abd = 2 then
exit sub
end if
end sub
after 0 was printed out , the error message came out.
thank you!