Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default call a vb function from a cell

Hi

I have a function that i want ot use in a xcel formula?
can this be done
my function...
Public Function myfun(str As String) As String
myfun = "xxxx"
End Function

How do i call it from a cell
i tried in excel spreadsheet cell
=myfun("helloworld")
but this does not work is it possible?

thanks mike
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default call a vb function from a cell

instead of just typing in =myfun("helloworld")

you should click in Insert Function, then select your function fro
the "All" list

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default call a vb function from a cell

Hi I cant see the function,
I want to call a function I have written!
not a standard excel function!
The all list only lists excel functions, where
should i define my vb function to appear in this ALL
list? i can see it!

HELP

-----Original Message-----
instead of just typing in =myfun("helloworld")

you should click in Insert Function, then select your

function from
the "All" list.


---
Message posted from http://www.ExcelForum.com/

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default call a vb function from a cell

Put it in a general module rather than a sheet module or the thisworkbook
module.

Make sure it isn't declared as private.

--
Regards,
Tom Ogilvy

"mike grasso" wrote in message
...
Hi I cant see the function,
I want to call a function I have written!
not a standard excel function!
The all list only lists excel functions, where
should i define my vb function to appear in this ALL
list? i can see it!

HELP

-----Original Message-----
instead of just typing in =myfun("helloworld")

you should click in Insert Function, then select your

function from
the "All" list.


---
Message posted from http://www.ExcelForum.com/

.



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
Sum Column above current cell dynamically using function call TopSlice Excel Worksheet Functions 7 September 15th 09 02:03 PM
Use reference text from one cell in another function call Randy Excel Worksheet Functions 3 March 10th 08 05:31 PM
How do i call a function to a cell? Bill Excel Worksheet Functions 3 February 17th 07 12:54 AM
How do I call a VBA function from a cell? Scott Lyon Excel Programming 1 October 14th 03 06:55 PM
Write a function call into an Excel cell from VBA Conceptor Excel Programming 2 September 10th 03 05:41 PM


All times are GMT +1. The time now is 07:50 AM.

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

About Us

"It's about Microsoft Excel"