Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 287
  • Last Modified:

VBA Function - How do I call it

See attached.

Note the VBA function GetPartNum.

I am trying to call this function but excel sheet cannot seem to find it??

(I did not write the function)

How can I get excel to "find" this function.
SerialNumbersPuzzle.xlsm
0
Patrick O'Dea
Asked:
Patrick O'Dea
  • 3
  • 2
2 Solutions
 
Martin LissOlder than dirtCommented:
If it's in a code module, the function needs to be Public.
0
 
Patrick O'DeaAuthor Commented:
It is public


However, I may be doing some other fundamental thing wrong...

Perhaps you could have a quick look???

:-)
0
 
Martin LissOlder than dirtCommented:
To call it from another sheet do

Sheet1.GetPartNum 5 ' or whatever value is correct
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Anthony BerenguelCommented:
I added a module to your workbook and moved your function to it and it runs for me. Give her a go.

ab
SerialNumbersPuzzle.xlsm
0
 
Patrick O'DeaAuthor Commented:
Thanks folks - I've got it now!
0
 
Martin LissOlder than dirtCommented:
I added a module to your workbook and moved your function to it and it runs for me. Give her a go.
I was going to do that but then I saw that it was homework so I thought I'd leave it to the student. Oh well.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now