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 / December 2005

Tip: Looking for answers? Try searching our database.

Why wont it work?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bobby - 01 Dec 2005 22:26 GMT
Help!
I want to start automaticaly a macro or SUB in ThisWorkbook. This is my
code :

Private Sub Workbook_Open()
slist
End Sub

It keep's telling me that a variable or procedure is wanted and not a
module(slist is a module)! Where do I go wrong! This is driving me!(I
did try many things so far with no result)
Norman Jones - 01 Dec 2005 22:29 GMT
Hi Bobby,

What is the name of the macro that you want to run and where is it housed?

---
Regards,
Norman

> Help!
> I want to start automaticaly a macro or SUB in ThisWorkbook. This is my
[quoted text clipped - 7 lines]
> module(slist is a module)! Where do I go wrong! This is driving me!(I
> did try many things so far with no result)
Bobby - 01 Dec 2005 23:58 GMT
Norman the module name is: slist(was module1 before I rename it) and it
is located in the current WorBook
Dave Peterson - 02 Dec 2005 00:22 GMT
Put it back in Module1.

But inside that module1, there's a:

Sub XXXXX()

What's the name of the procedure you want to run?

(It follows the word Sub.)

> Norman the module name is: slist(was module1 before I rename it) and it
> is located in the current WorBook

Signature

Dave Peterson

Bobby - 02 Dec 2005 00:41 GMT
The Sub name is: slist or
Sub slist()
Norman Jones - 02 Dec 2005 00:48 GMT
Hi Bobby,

If you name a macro and a module with the same name, you will confuse VBA:
Change the name of the module (as suggested by Dave) and all should be well.

---
Regards,
Norman

> The Sub name is: slist or
> Sub slist()
Bob Phillips - 01 Dec 2005 22:30 GMT
You should be referring to the macro in that module, not the module itself.

Signature

HTH

RP
(remove nothere from the email address if mailing direct)

> Help!
> I want to start automaticaly a macro or SUB in ThisWorkbook. This is my
[quoted text clipped - 7 lines]
> module(slist is a module)! Where do I go wrong! This is driving me!(I
> did try many things so far with no result)
 
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.