Why wont it work?

  • Thread starter Thread starter Bobby
  • Start date Start date
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)
 
Hi Bobby,

What is the name of the macro that you want to run and where is it housed?
 
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)
 
Norman the module name is: slist(was module1 before I rename it) and it
is located in the current WorBook
 
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.)
 
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.
 

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