Excel 2000 Macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am gettting the following error when trying to compile my excel macro.
"COMPILE ERROR: PROCEDURE TOO LARGE"
How do I get around this error message and allow excel to compile my
auto_open macro?

Thanks in advance.
Keven
 
Break the procedure in to two or more smaller procedures,
passing, if necessary, variables from one procedure to the next.
Good structured programming techniques would already lead you
down this path.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

message
news:[email protected]...
 
Hi keven

Adding to the others a small sample. Macros can /should be in separate
modules:

Sub Auto_open()
Call PartOne
Call PartTwo
Call PartThree("Tada !")
End Sub

Sub PartOne()
MsgBox "Hi"
End Sub

Sub PartTwo()
MsgBox "Bye"
End Sub

Sub PartThree(strMsg As String)
MsgBox strMsg
End Sub

HTH. Best wishes Harald
 
Thank you for the example, really helped to clarify what the others where
saying, I am very new to programming and greatly appreciate the assistiance.
 

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