Why wont it work?

B

Bobby

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)
 
N

Norman Jones

Hi Bobby,

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

Bob Phillips

You should be referring to the macro in that module, not the module itself.

--

HTH

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

Bobby

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

Dave Peterson

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.)
 
N

Norman Jones

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.
 
Top