Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Public Sub in ThisWorkbook not found

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Larry - 03 Sep 2006 20:46 GMT
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
Larry - 03 Sep 2006 21:09 GMT
NEVER MIND!

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

> 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
[quoted text clipped - 21 lines]
> Thanks,
> Larry
Bob Phillips - 03 Sep 2006 21:10 GMT
Try

Call ThisWorkbook.ScoreSummary(Target)

--

HTH

Bob Phillips

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

> 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
[quoted text clipped - 21 lines]
> Thanks,
> Larry
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.