?
Solved

Calling VB function from cell in Excel 2010

Posted on 2011-09-12
2
Medium Priority
?
403 Views
Last Modified: 2012-08-14
I have a function that I have pasted into the "This Workbook" module in the VBA Project for my Excel 2010 workbook.


Public Function IsADate(cel) As Boolean
    IsADate = IsDate(cel)
End Function


I was expecting that in a cell in the spreadsheet that I could now type =IsADate(C3). But when I do Excel does not recognise the function and I get a #NAME? error.

I'm sure this used to work on older versions of Excel (but could be wrong!)

I've Excel I've enabled all macros and ticked trusted access to the VBA Project object model...

What am I doing wrong? Thanks in advance.
0
Comment
Question by:mikealsweiler
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Assisted Solution

by:Didier Vally
Didier Vally earned 1000 total points
ID: 36527452
0
 
LVL 42

Accepted Solution

by:
dlmille earned 1000 total points
ID: 36527453
Paste the function in a public module, not ThisWorkbook module.

See attached.

Dave


isADate-r1.xlsm
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

765 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