Public Sub in ThisWorkbook not found

  • Thread starter Thread starter Larry
  • Start date Start date
L

Larry

I don't know what's going on, but I have created a public subroutine in
my workbook, at the workbook level (not on a sheet) but none of my
sheets can see the subroutine.

I know this should be possible, I could swear I've done this for ages,
but I cannot figure out what is going on here.

The subroutine in ThisWorkbook is defined as:
Public Sub ScoreSummary(rngTarget As Range)

I try to call it from one of the worksheets with a simple call
statement:
Call ScoreSummary(Target)

I type the name using lowercase in the worksheet, and Excel puts the
proper capitalization in place, but I do not get prompted for the the
argument when I type the open parenthesis. When I compile the code, it
fails with sub/function not found.

I am using Excel 2003 on Windows XP sp2.

Anyone know what I'm doing wrong?

Thanks,
Larry
 
NEVER MIND!

Guess my brain is taking the Labor Day weekend off. The code should go
into a module!
 
Try

Call ThisWorkbook.ScoreSummary(Target)


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 

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