View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default How do I call a method in VB from Excel with JUST code?

If the latter, it can only return a value, not manipulate the cell or the
sheet.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"K Dales" wrote in message
...
By "method" do you mean a method of a particular object? Or do you just

mean
"run a piece of code I wrote"? If the former, I don't see how you would
specify the specific object you are referring to nor be able to deal with

all
the possible return values. If the second, you are just talking about a
standard user function: write a Public Function abc() and you can use it

in a
worksheet cell.

"Doseeson" wrote:

I want to call a piece of code from VB while I'm in Excel, but here's

the
tricky part, I don't want to use buttons or any graphical interface. I

just
want to be able to call the functionality of a piece of code from a cell

with
just formulas.

Something like "=abc()" to run the code in method "abc"

Is that possible?

Thanks,