kTitle is not displayed in the debugger, and when I step from Beep to Const / , the line goes directly to the End Sub line.
No error message, not a phone call, no postcard not email, nothing !
Seriously, I falled into that yesterday evening, and simply dimed the variable.
Now, after some boot and shutdown, and before lunch, I checked using the code above (in the main window).
BTW: I changed kTitle to kTit, kPC the line is ignored. I removed As String: same result.
And the cherry above the dessert was the infamous This is the first time you run the application I get at the first run (of the day / boot) in the IDE. The Debugger does not show anything from the Open Event, only Globals and Self wMain.wMain.
I think I now understand what happens (but your explanations are good): I replaced the Const by a Dim, because there was a problem. It does not works better, but because I had hard time, I forgot that part and keep in mind what I said about Const.
Sorry about the buz and one more thank for the explanation.
Thanks Alexander. I also tried that, after the first error. The error were elsewhere (in the way I built the local file name to be read). The project worked yesterday evening when I shut down the computer (and it still works now).
Then earlier today, I recall what I wrote in the first post and started to want to understand.
Alexander: you gave me an idea and, yes, the Const works fine (I just checked deleting Dim and replacing it with Const, the error was elsewhere and the Const line was highlighted (I think, I do not recall), and I run the code, check in the Debugger and saw that the Const line was skipped in the step by step process. The rest is now know.