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

I have some functions in VBA e.g. one that is called
Function CountByColor(InRange As Range, WhatColorIndex As Integer, Optional
OfText As Boolean = False) As Long.

When i write =CountByColor(A2:A4;3;FALSE) in my worksheet it returns #NAME?.
What am I doing wrong?

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

problem solved, pls disregard

"Adam" skrev:

I have some functions in VBA e.g. one that is called
Function CountByColor(InRange As Range, WhatColorIndex As Integer, Optional
OfText As Boolean = False) As Long.

When i write =CountByColor(A2:A4;3;FALSE) in my worksheet it returns #NAME?.
What am I doing wrong?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default call a function from VBA

Adam,

Two things spring to mind.

Have you stored the code in a general code module (not a form, sheet module
or ThisWorkbook)?

Also, but I don't think this is the problem, you are using continental
separators (; not ,). Is this correct for your Excel?

--

HTH

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


"Adam" wrote in message
...
I have some functions in VBA e.g. one that is called
Function CountByColor(InRange As Range, WhatColorIndex As Integer,

Optional
OfText As Boolean = False) As Long.

When i write =CountByColor(A2:A4;3;FALSE) in my worksheet it returns

#NAME?.
What am I doing wrong?



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
Is there a do not call function? pokdbz Excel Discussion (Misc queries) 2 December 27th 07 04:00 PM
how i can call the function reneabesmer Excel Worksheet Functions 2 May 2nd 05 12:13 PM
how to call a function with variance which is function Name Jean-Yves[_2_] Excel Programming 1 September 1st 04 07:12 PM
Function Call Phil Hageman Excel Programming 4 October 9th 03 04:32 PM
call function sirron Excel Programming 1 August 26th 03 03:39 PM


All times are GMT +1. The time now is 01:12 PM.

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"