Solved

VBA Function - How do I call it

Posted on 2014-03-11
6
260 Views
Last Modified: 2014-03-11
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
Comment
Question by:Patrick O'Dea
  • 3
  • 2
6 Comments
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39922043
If it's in a code module, the function needs to be Public.
0
 

Author Comment

by:Patrick O'Dea
ID: 39922049
It is public


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

Perhaps you could have a quick look???

:-)
0
 
LVL 45

Assisted Solution

by:Martin Liss
Martin Liss earned 150 total points
ID: 39922050
To call it from another sheet do

Sheet1.GetPartNum 5 ' or whatever value is correct
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 10

Accepted Solution

by:
Anthony Berenguel earned 350 total points
ID: 39922062
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
 

Author Closing Comment

by:Patrick O'Dea
ID: 39922069
Thanks folks - I've got it now!
0
 
LVL 45

Expert Comment

by:Martin Liss
ID: 39922071
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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now