Solved

Calling VB function from cell in Excel 2010

Posted on 2011-09-12
2
393 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
2 Comments
 
LVL 5

Assisted Solution

by:Didier Vally
Didier Vally earned 250 total points
ID: 36527452
0
 
LVL 41

Accepted Solution

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

See attached.

Dave


isADate-r1.xlsm
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

707 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

12 Experts available now in Live!

Get 1:1 Help Now