ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Stop" not working (https://www.excelbanter.com/excel-programming/312623-stop-not-working.html)

JMCS

"Stop" not working
 
My programme is not doing what it's supposed to.

My standard approach (used successfully many many times and presumably the
morm)) in such cases is to put "Stop" in just before the relevant code line,
and then step through the code line-by-line. However, if I do this in this
particular case, the programme carries on through as normal, doing all the
instructions around the Stop, and completely ignoring it. Suggestions,
please?

Simon Lloyd[_581_]

"Stop" not working
 

Well not having seen your code or knowing what you are trying to achiev
i suggest that where you would want the code to break momentarily yo
would need to type msgbox "your comment here", so now to move on yo
need to click ok or programme the vbok to perform the task yo
require.

Hope this helps.

Simo

--
Simon Lloy
-----------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=26677


Bob Phillips[_6_]

"Stop" not working
 
Use breakpoints, that is the norm.

--

HTH

RP

"JMCS" wrote in message
...
My programme is not doing what it's supposed to.

My standard approach (used successfully many many times and presumably the
morm)) in such cases is to put "Stop" in just before the relevant code

line,
and then step through the code line-by-line. However, if I do this in

this
particular case, the programme carries on through as normal, doing all the
instructions around the Stop, and completely ignoring it. Suggestions,
please?




JMCS

"Stop" not working
 
Thanks, Bob

You didn't answer my question, but your suggestion helped me solve the
programme problem.

I'd still like to know what is going wrong with "Stop" as I've being using
it without problem for over 12 months (limit of my exposure to Excel VB)

"Bob Phillips" wrote:

Use breakpoints, that is the norm.

--

HTH

RP

"JMCS" wrote in message
...
My programme is not doing what it's supposed to.

My standard approach (used successfully many many times and presumably the
morm)) in such cases is to put "Stop" in just before the relevant code

line,
and then step through the code line-by-line. However, if I do this in

this
particular case, the programme carries on through as normal, doing all the
instructions around the Stop, and completely ignoring it. Suggestions,
please?





JMCS

"Stop" not working
 
Simon

Thanks for your advice. I was about to follow it when Bob's suggestion came
in. Still on the learning curve...........

"Simon Lloyd" wrote:


Well not having seen your code or knowing what you are trying to achieve
i suggest that where you would want the code to break momentarily you
would need to type msgbox "your comment here", so now to move on you
need to click ok or programme the vbok to perform the task you
require.

Hope this helps.

Simon


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=266770



Bob Phillips[_6_]

"Stop" not working
 
The problem for me with Stop is that you have to amend the code to add it,
and then remove it again later. If you break at many different points in a
large program, this becomes a headache.

I would also suggest that Stop is a legacy of previous versions of Basic,
before we had any decent debugging tools. Breakpoints, stepping code, Watch
items, etc., are more sophisticated and more flexible.

--

HTH

RP

"JMCS" wrote in message
...
Thanks, Bob

You didn't answer my question, but your suggestion helped me solve the
programme problem.

I'd still like to know what is going wrong with "Stop" as I've being using
it without problem for over 12 months (limit of my exposure to Excel VB)

"Bob Phillips" wrote:

Use breakpoints, that is the norm.

--

HTH

RP

"JMCS" wrote in message
...
My programme is not doing what it's supposed to.

My standard approach (used successfully many many times and presumably

the
morm)) in such cases is to put "Stop" in just before the relevant code

line,
and then step through the code line-by-line. However, if I do this in

this
particular case, the programme carries on through as normal, doing all

the
instructions around the Stop, and completely ignoring it.

Suggestions,
please?








All times are GMT +1. The time now is 10:51 PM.

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