Using a sub within a function

S

Subodh

I want to use a function to get from a sub.
For example:
sub x(y as variant)
y=activecell.offset(1,0).value+5
end sub
Now, I want to get a function

Function myfun(z as integer)
tmp=x(z)
myfun=tmp
end function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top