Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How do I call a method in VB from Excel with JUST code?

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,
  #2   Report Post  
Posted to microsoft.public.excel.programming
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,



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default How do I call a method in VB from Excel with JUST code?

Maybe you could use one of excel's events--worksheet_calculate or
worksheet_change might be useful.

You can read more about events at:
Chip Pearson's site:
http://www.cpearson.com/excel/events.htm

David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/event.htm


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,


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel code to call a macro when a certain value in a cell isselected. [email protected] Excel Worksheet Functions 4 February 15th 08 08:18 PM
Can you call a Web Service from Excel 2007 without writing code? BigBadBubba Excel Discussion (Misc queries) 0 March 14th 07 03:32 AM
How do I call a method in VB from Excel with JUST code? K Dales[_2_] Excel Programming 0 May 27th 05 09:57 PM
How To Call VBA Code from Excel 4 Macro Gaston Excel Programming 4 March 25th 05 09:47 PM
Why system asks me to save change even after I call save method(VB.NET) steellock Excel Programming 2 April 27th 04 04:14 AM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"