ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Procedure too large" error ...DAMN (https://www.excelbanter.com/excel-programming/326852-procedure-too-large-error-damn.html)

-[::::Shamran::::]-

Procedure too large" error ...DAMN
 
I keep getting Procedure too large" error on one of my macros !!
I really don't won't to cut it in two because the function has to run from
one button click !

shamran



Fredrik Wahlgren

Procedure too large" error ...DAMN
 

"-[::::Shamran::::]-" wrote in message
...
I keep getting Procedure too large" error on one of my macros !!
I really don't won't to cut it in two because the function has to run from
one button click !

shamran



The error message is pretty self explanatory. Do you do basically the same
over and over? Please explain what your macro does and paste some relevant
portion of it. It doesn't matter if you split it. Let thefirst part call the
other.

7fredrik



Harald Staff

Procedure too large" error ...DAMN
 
Hi Shamran

You can run multiple macros by calling them from another macro. Try running
Main here -or to assign it to a button:

Sub Main()
Macro1
Macro2
Macro3
End Sub

Sub Macro1()
MsgBox "I'm too sexy for my shirt"
End Sub

Sub Macro2()
MsgBox "I'm too sexy for my hat"
End Sub

Sub Macro3()
MsgBox "I'm too sexy for this song"
End Sub

HTH. Best wishes Harald

"-[::::Shamran::::]-" skrev i melding
...
I keep getting Procedure too large" error on one of my macros !!
I really don't won't to cut it in two because the function has to run from
one button click !

shamran





-[::::Shamran::::]-

Procedure too large" error ...DAMN
 

"Harald Staff" wrote in message
...
Hi Shamran

You can run multiple macros by calling them from another macro. Try
running
Main here -or to assign it to a button:

Sub Main()
Macro1
Macro2
Macro3
End Sub

Sub Macro1()
MsgBox "I'm too sexy for my shirt"
End Sub

Sub Macro2()
MsgBox "I'm too sexy for my hat"
End Sub

Sub Macro3()
MsgBox "I'm too sexy for this song"
End Sub

HTH. Best wishes Harald


NICE ... I'll give it a try later !

Jesper



-[::::Shamran::::]-

Procedure too large" error ...DAMN
 

"Harald Staff" wrote in message
...
Hi Shamran

You can run multiple macros by calling them from another macro. Try
running
Main here -or to assign it to a button:

Sub Main()
Macro1
Macro2
Macro3
End Sub

Sub Macro1()
MsgBox "I'm too sexy for my shirt"
End Sub

Sub Macro2()
MsgBox "I'm too sexy for my hat"
End Sub

Sub Macro3()
MsgBox "I'm too sexy for this song"
End Sub

HTH. Best wishes Harald


I have just tried it and it works ... talk about saving my day ... thanks !!

jesper



Harald Staff

Procedure too large" error ...DAMN
 
Glad to hear that Jesper.
Providing a little cold water for tomorrow morning:
No routine should ever have to be as long as too large, tasks should be
crunched down to small single minded units. But that's next semester, now
celebrate.

Best wishes Harald

"-[::::Shamran::::]-" skrev i melding
...

I have just tried it and it works ... talk about saving my day ... thanks

!!

jesper






All times are GMT +1. The time now is 04:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com