VB> Strangeness

LisaGreen
5StarLounger
Posts: 964
Joined: 08 Nov 2012, 17:54

Re: VB> Strangeness

Post by LisaGreen »

Thank you so much Hans!!! Your opinion means a lot to me!!

Yet another beer... When I get to a crate I need your address to send it to!!!

Lisa

User avatar
Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

Re: VB> Strangeness

Post by Doc.AElstein »

Hi Lisa
A couple of comments.
_1 Once again, I don’t think it has anything to do generally with a sub definition. You may not have meant to say that specifically, but that is how I read what you uploaded.

_2 Your wording is not incorrect as far as I can tell, but I think it does not quite tell it like it all is. It doesn’t say the whole story. ( But then the whole story is a pretty boring confusion one, so I don’t blame you .. lol… :-) )

_._______________________

I did a first attempt at a worded summary based on what we have all seen so far which I think explains the situation as it appears to us currently. But as time goes on we might notice that it does something else that we have not noticed and I might change my mind. I have re uploaded your docx with my offering …
The words in Pink in particular I might re consider on reflection… :) The rest I think currently is correct.

_._________________________
Currently I think we have 3 scenarios to consider which will place the position of the break between procedures somewhere other than directly under the last routine ***, and I think my wording should cover them … It is quite tricky and I think we may need to look at this carefully to be sure we have it correct
( *** For the simple 2 cases of a)all blank lines or b)all comments ( without any lne continuations ) the situation is simple and the break is immediately after the last procedure )

These are the 3 situations I think, and the returned docx has three statements that I think summarise them

(i)
Scenario (i) https://imgur.com/k9hJhFG" onclick="window.open(this.href);return false;
If no line continuations are present and there is a one or more blank lines, then the line before the first blank line down from the upper routine is taken as the break point, , that is to say, the line before the first blank line is the last line of the upper procedure

(ii)
Scenario (ii) https://imgur.com/6yexJo2" onclick="window.open(this.href);return false;
Scenario( ii) https://imgur.com/C20dep7" onclick="window.open(this.href);return false;
Scenario (ii) https://imgur.com/CVqUwRC" onclick="window.open(this.href);return false;
If there are one or more line continuations present then the break point will be placed at the first blank line down after the line after last line continuation … unless scenario (iii)

(iii)
Scenario (iii) https://imgur.com/zkvMkBB" onclick="window.open(this.href);return false;
Scenario (iii) https://imgur.com/9ekvwCn" onclick="window.open(this.href);return false;
If there are no blank lines after the first line looking down after the last line continuation looking down. In this case, the break is at the line after the line continuation ... see Edit below


I wouldn’t be surprised if I have not quite got it correct yet, or have missed something…

Alan

Edit tuesday, 5th february.... I think SirNario (iii) is a bit different.....
SirNario_3.JPG : https://imgur.com/ho56uBN" onclick="window.open(this.href);return false;
There are no blank lines after the first line looking down after the last line continuation looking down, or after the first line looking down after the last line continuation looking down all lines contain comments . In this case, the break is at the line after the line on which the line continuation is on.
You do not have the required permissions to view the files attached to this post.
Last edited by Doc.AElstein on 05 Feb 2019, 17:30, edited 3 times in total.
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also

LisaGreen
5StarLounger
Posts: 964
Joined: 08 Nov 2012, 17:54

Re: VB> Strangeness

Post by LisaGreen »

I think you have indeed missed at least one "scenario" Alan!!! LOL!!

Lisa

User avatar
Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

Dead mouse making my cellar very smelly :-( & Sir Narios

Post by Doc.AElstein »

I expect I have missed a lot.

I just added something to SirNario (iii)…. But I think I will leave it for now. ( Here is a copy of notes I made myself to maybe add to later if I stumble on anymore SirNarios http://www.excelfox.com/forum/showthrea ... #post10935 https://tinyurl.com/y9kt4qkl" onclick="window.open(this.href);return false; )
But I think it is more efficient to wait until I stumble by chance on anything else. If I keep looking I probably won’t find anymore… _

_....Like trying to find that dead mouse that is making my cellar very smelly just now. I just spent an hour and I can’t find it. I probably won’t find it if I spend the rest of the day looking for it. More likely I will stumble on it when I am not looking.
A neighbor has a very friendly cat who often pops in if we let him , and that seems to keep the mice out to prevent something like this happening. But last Winter when we had most windows shut , I accidentally shut him in a few times and he did a poo in our house, and other smelly things , which was just as bad as the smell of a dead mouse. So that is just a Summer solution
I wonder if I could borrow a Police dog to sniff it out.
But I am not sure if they are trained on dead mice.
And… Considering that I am finding it extremely unpleasantly smelly just now, and that Dogs can smell a thousand times better than us, then I expect the dog would not be very happy with the job

:-)
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also

User avatar
Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

VB Strangeness? ...VBA has an intelligent routine ......

Post by Doc.AElstein »

I think I have some explanations now that seem to be consistent with what is going on to cause the strange behaviour. I got a few explanations, starting from here… , https://tinyurl.com/yyw85dmg" onclick="window.open(this.href);return false;
Probably the simplest to follow is this last one …… ….VBA has an intelligent routine to determine to which code sections, the 'comments between code sections “belong”.…..
_........ https://tinyurl.com/y4z723cj" onclick="window.open(this.href);return false;

If anyone is interested to take a look and thinks I have missed something then please let me know… I would not be surprised if I missed something, as I changed my mind about what is going on a few times already…

Alan

( P.S , talking about strange things.
The smell of a dead mouse that I mentioned in the last post, cleared up after a while. But in the last few days it started again. A bit strange, possibly a result of the untypical warm temperatures just now )
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also

User avatar
Doc.AElstein
BronzeLounger
Posts: 1499
Joined: 28 Feb 2015, 13:11
Location: Hof, Bayern, Germany

Position that light grey Boarder line anywhere in the VB Editor

Post by Doc.AElstein »

Hi
On my long list of other interesting things to do, I finally got around to doing what I think is a short easy to follow summary of the discoveries discussed by us here.
I did a short post which gives a quick, 2 Step guide , on how to put that thin grey border line at a line of your choice in the VB Editor.
https://excelfox.com/forum/showthread.p ... -VB-Editor

Alan

( P.S. As I recall, that smell was indeed of a dead mouse. I pretty well expected it was. Much later I found the remains of him in an old mouse trap I had forgotten about. It was not such a tragedy – old dried out remains suck up in my powerful industrial Hoover quite tidily )
You do not have the required permissions to view the files attached to this post.
I am having difficulty logging in with this account just now.
You can find me at DocAElstein also

LisaGreen
5StarLounger
Posts: 964
Joined: 08 Nov 2012, 17:54

Re: VB> Strangeness

Post by LisaGreen »

Great that you revisited this Alan! I'm going to download and look at the workbooks now!!!

Lisa