Why can't I call my self-declared function?

J

Javad

Hello

I wrote this code in the General Declaration part of my Excel workbook (in
the VB environment):

Public Function jvdADD(Word1, Word2)
jvdADD = Word1 & Word2

End Function

Now, after saving the workbook, I expected to be able to call this function
from the standard environment of the workbook. For example I wrote in A3:
=jvdadd(a1,a2)

but it gave me:
#NAME?

how can I call that function from the standard environment of my workbook?

thank you
 
N

Niek Otten

The code should be in a General Module, not a Workbook or Worksheet Module

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Hello
|
| I wrote this code in the General Declaration part of my Excel workbook (in
| the VB environment):
|
| Public Function jvdADD(Word1, Word2)
| jvdADD = Word1 & Word2
|
| End Function
|
| Now, after saving the workbook, I expected to be able to call this function
| from the standard environment of the workbook. For example I wrote in A3:
| =jvdadd(a1,a2)
|
| but it gave me:
| #NAME?
|
| how can I call that function from the standard environment of my workbook?
|
| thank you
|
|
 
Top