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

  • Thread starter Thread starter Javad
  • Start date Start date
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
 
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
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top