ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calling subs (https://www.excelbanter.com/excel-programming/294605-calling-subs.html)

mike

calling subs
 
Hi all,

I just finished some new code in a program that calls a
sub. When I ran the modified code, the program just skips
over the call command. Any reason why this would happen?
If there are any errors in the sub, shouldn’t it come up
as an error instead of avoiding the sub completely?


Bob Phillips[_6_]

calling subs
 
Show us what you have to give us a chance.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Mike" wrote in message
...
Hi all,

I just finished some new code in a program that calls a
sub. When I ran the modified code, the program just skips
over the call command. Any reason why this would happen?
If there are any errors in the sub, shouldn’t it come up
as an error instead of avoiding the sub completely?




Frank Kabel

calling subs
 
Hi
as always: post the relevant code :-)

--
Regards
Frank Kabel
Frankfurt, Germany


Mike wrote:
Hi all,

I just finished some new code in a program that calls a
sub. When I ran the modified code, the program just skips
over the call command. Any reason why this would happen?
If there are any errors in the sub, shouldn’t it come up
as an error instead of avoiding the sub completely?


pikus

calling subs
 
Do this: Set a breakpoint on the line preceding the calling of th
subroutine. Run the code and when it reaches the breakpoint it wil
stop and show you the highlighted line with the breakpoint. Press “F8
to step through the code one line at a time. This will show yo
exactly what is happening as the program runs, whether the subroutin
is actually being skipped or if there is a bug in the sub itself tha
causes it to look as though it is skipped. Beyond that we must have
look at the code to tell you more. - Piku

--
Message posted from http://www.ExcelForum.com


mike

calling subs
 
I would show the code but it’s long and messy. I already
did the break point and "f8" thing and it literally steps
over the call. I set the break point one step in front of
the call command then I hit f8. The call is highlight
then I hit f8 again and the next line after the call is
highlight. Maybe I will strip out all the code in the
call sub then put a msgbox("") command to see if it will
ever go to that sub.





-----Original Message-----
Do this: Set a breakpoint on the line preceding the

calling of the
subroutine. Run the code and when it reaches the

breakpoint it will
stop and show you the highlighted line with the

breakpoint. Press "F8"
to step through the code one line at a time. This will

show you
exactly what is happening as the program runs, whether

the subroutine
is actually being skipped or if there is a bug in the sub

itself that
causes it to look as though it is skipped. Beyond that

we must have a
look at the code to tell you more. - Pikus


---
Message posted from http://www.ExcelForum.com/

.



All times are GMT +1. The time now is 03:38 PM.

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