« first day (1825 days earlier)      last day (1355 days later) » 

12:01 AM
RELOAD!
[rubberduck-vba/Rubberduck] 6 commits. 3 opened issues. 1 closed issue. 21 issue comments. 77 additions. 2405 deletions.
[rubberduck-vba/RubberduckWeb] 3 commits. 7 closed issues. 3 issue comments. 26 additions. 76 deletions.
[Minesweeper] Games Played: 135, Bombs Used: 96, Moves Performed: 18763, New Users: 11
 
 
2 hours later…
2:17 AM
Storm swung through my area, and internet is crap now :(
Setting up a new computer. My mom's 10yo MacBook Pro died, I bought a new computer, and sold her my old one since I needed a bit more memory on my C drive.
Makes it hard to download stuff with bad internet :( It's so bad that ReCaptcha won't even load.
On the scale of less than 100kb/sec...
More specifically, about 20-30kb/sec...
 
Wow that’s bad.
 
I passed my interview today with HR, and I've got one with the company architect tomorrow over lunch.
If that goes well, I'll have a third one with the unit mentor (basically a kind of HR-person who makes sure nobody works too much overtime and helps keep people on track for their personally-set goals to help keep them happy, and stuff).
It's for an IT contracting company.
VS Code finally downloaded :)
 
 
2 hours later…
4:04 AM
@Hosch250 interview with another company?
So you’ll be doing contracting work outside of current employment or as replacement?
 
4:58 AM
Buzz Lightyear could advise you @Hosch250 that connections connections everywhere
 
 
3 hours later…
 
 
2 hours later…
10:06 AM
> When I double-click a Code Inspection result, Excel goes "Not responding" and a few (3 or so) minutes later wakes up. Are 4318 findings a lot in a 30K line project?

This is not practically usable at present.
Of course I could disable many of the default observations but as a first run it's useful to run through them ... if I could only run. I might try exporting to Excel and writing a macro to jump from the finding to the place in the code, without RD running.

**Rubberduck version infor
 
10:26 AM
@IvenBach you need to set up a web cam and aim it at your glass wall. You could win millions on one of those funniest videos shows! Once you do, you can work on RD full time!! :)
Even if you don't, you can share with us for pure entertainment purposes.
 
> This seems to be duplicating #4928. As it stands, you want to disable automatic inspections after reparse. You can still get inspection results if you refresh from the Code Inspections toolwindow. For all other cases, Inspections will not be run.
> Sure, but I have to run Inspections first to get the results, then unload RD and run my little SheetChange macro (on the sheet where I pasted the copied results ) that jumps to the offending line much more quickly than RD. My question is, is there a simple toggle rather than Unload? How about the performance? Would you expect a three minute wait after a double-click? If that's just how it is, I'll use this workaround.
 
10:44 AM
@Duga I have no idea what you're doing
...
 
Following these instructions for setting up my ForEach Loop in SSIS. In Figure 3, he shows setting the Result Name to 0. Is there any particular reason for doing so? Is it "convention"? Will it break if I don't?
 
why in the world do you have your own macro to navigate to RD inspection results?
and how did you get inspection result navigation to take 3 minutes?
 
> Posting a Debug level log might help identify what's causing RD to take 3 minutes to navigate from an inspection click to the location in code.
 
11:34 AM
~sigh.. I just tried to :wq out of a spreadsheet
3
 
lol!
@MathieuGuindon not that this comes as a surprise to you, but I marked a method with '@obsolete, parsed & looked at inspections and the call was properly flagged. #itworksheretoo
 
@Vogel612 the TW gets very flakey with lots of results - repro'd with the battleship code on 2016 x64. Ok maybe not 3 minutes, but much, much longer than it should be - freezes everything for a long time on first double-click.
 
hrngh... that's bad
 
> I notice a similar but much smaller delay for a Word project I have which currently has about 10k loc. I think this issue is mainly when you expose an existing project to rubberduck. It should be possible to switch off code inspections for each module with an annotation '@IgnoreModule' so that you can expose modules/classes 1 at a time and deal with a smaller number of issues. Unfortunately, this annotation doesn't seem to be working as expected at the moment.
 
anything in the logs that could suggest where it comes from?
@Duga ~sigh... it is possible. that feature works just as expected...
 
11:41 AM
> I notice a similar but much smaller delay for a Word project I have which currently has about 10k loc. I think this issue is mainly when you expose an existing project to rubberduck. It should be possible to switch off code inspections for each module with an annotation '@IgnoreModule' so that you can expose modules/classes 1 at a time and deal with a smaller number of issues. Unfortunately, this annotation doesn't seem to be working as expected at the moment. (See github.com/rubbe
 
@Duga that was fixed recently though
..no?
 
okay, apparently it doesn't work as expected..
grumble grumble mumble mumble
 
> `'@IgnoreModule` works here just fine in Access on build .4734. I had .4729 installed yesterday, and wasn't in the VBE extensively, but don't recall having had issues with it of late (#4965 not withstanding).

I just tested it out to confirm - I get 18 inspection results in some "borrowed" code without it, and no mention of the module in my inspection results with it. (Tested in Access because I had a project open.)
 
12:34 PM
> Noting another that I just came across, to see if there is One Change to Fix Them All:

```VBA
ErrorHandler:
With Err
LogManager.Log ErrorLevel, Strings.Join(Array("Navigation failed for: ", this.SiteValues(CStr(ClinicIDLinkKey)), ". Number: ", .Number, " Description: ", .Description), vbNullString)
Dim errNum As Long
errNum = .Number
Dim errDesc As String
errDesc = .Description
End With

IWebDownloader_NavigateToDownloadLocation = False
Err.Raise Fai
 
1:09 PM
> That's useful to know. I've just tested again and indeed '@IgnoreModule is working in most cases.
> Following my comment on #4990 I've done a bit more investigation. It seems that there is a specific inspection which is not ignored by '@IgnoreModule. This inspection result is the 'Public member name contains an underscore. Unfortunately, vbWatchdog seems to have a large number of this type of memeber.
> Following my comment on #4990 I've done a bit more investigation. It seems that there is a specific inspection which is not ignored by '@IgnoreModule'. This inspection result is the 'Public member name contains an underscore. Unfortunately, vbWatchdog seems to have a large number of this type of memeber.
 
@IvenBach Replacement.
 
> Found the problem. Its the inspection result 'Public Member name contains an underscore' that is being ignored by '@IgnoreModule' annotation.
> Found the problem. Its the inspection result 'Public Member name contains an underscore' that is being ignored by '@IgnoreModule' annotation.
> Found the problem. Its the inspection result 'Public Member name contains an underscore' that is being ignored by '@IgnoreModule' annotation.
 
@Duga That's helpful to know!
 
> @daFreeMan. Found the problem. Its the inspection result 'Public Member name contains an underscore' that is being ignored by '@IgnoreModule' annotation.
> @SteveLaycock that's an easy enough fix then, don't use underscores in Public Members!

This seems to be <s>the</s> a cause of #4965, so you may want to update it as well to note your findings.
 
1:39 PM
@Duga lol
 
> @SystemsModelling the freeze with the inspections toolwindow is definitely not normal.

> Barring review comments (and assuming a successful build...), that's everything I intended to go into this one. Note that I had to disable group virtualization to handle the expand and collapse all buttons, but when I did the second round of performance testing it turned out to be "acceptable" for the ~3000 inspection result project I tested on. Not instantaneous grouping changes, but sub 1 second. If
 
Hi Guys. A little help? I'm adding my own classes into Public UserControls as Scripting.Dictionary but sometimes my script results in error and I thought that when VBA script (excel) ends, it will clear all data. Like in Python and so on. But to my surprise no... The dictionary still holds my custom Class so when I wanted to add it it told me "key already exists..."
What's the best way to guarantee that everything is clean when I start my script even after some unhandled error.
 
where is this public field defined?
 
In standard module.
Another way that came to my mind is to create a custom class clsMyControls that would imitate Dictionary, had a Private Sub Class_Terminate() that would empty it but I'm not sure if the Terminate would fire if some unhnadled error occured...
Or if there is another, a better way... There are no tutorials for "structure your big application this way:" :-/

For past 2 years I was adding it into collection (without Key) and just lately discovered that I had so many duplicate custom classes in those collections it shocked me...
My ideal program workflow

1) form is opened, all controls are initialized as my custom classes and added into some form of a collection (dictionary) with key: "FormName@ControlName"

2) when another form from the initial form is opened, controls again initialized as my custom classes and added into the same collection with key: "AnotherFormName@ControlName"

3) When I close the second form, all custom classes are deleted from the Dictionary

4) If some unhandled error occurs when I'm modifying the code or in production, the Dictionary with my custom classes are emptied.
I'm not sure where to put what for this to work.
 
2:12 PM
when VBA script (Excel) ends so does the dictionary live as long as Excel is open or as long as VBA code is running?
 
it's a global variable, it won't die until you tell it to
(or make code changes that invalidate the compiled code)
@SonGokussj4 you could add the items with Set collUserControls("key") = value, that's basically a "add or update" that won't throw a "key already exists" error
or, explicitly clear the dictionary at one point, or explicitly End execution
 
> So, I started again, reloaded RD, opened the Code Inspections, waited a minute, clicked a finding and it was there in a second or two. Repeat, same result. Scrolling a page down takes a few seconds but not annoyingly so. I don't know what's different this time, so next time I start from scratch I'll be more methodical about recording the time so I know what part of the log corresponds to what I'm doing.
 
2:37 PM
@MathieuGuindon Nice!
Didn't know about this :)
I'll use the Set.
 
2:51 PM
but a have a very poor support for it - citation needed, ideally not coming from some hater that believes VBA is a toy language. Not supporting class inheritance is hardly making a dent in OOP support. Here's some full-blown OOP VBA code that's arguably better written than many implementations written in Java, C#, or other inheritance-supporting languages. You can't write a Model-View-Controller app in a language that has "poor support" for OOP. Consider removing that useless jab. — Mathieu Guindon 40 secs ago
breathes damn it gets me every time
 
341
A: Can you write object-oriented code in C?

mepcotterellYes. In fact Axel Schreiner provides his book "Object-oriented Programming in ANSI-C" for free which covers the subject quite thoroughly.

I guess if C can, VBA, can, too!
 
@MathieuGuindon As I read the accepted answer, I thought it was yours. Might be worth inviting the author over to see if (s)he's interested in a little side project!
 
3:20 PM
weird... I just tried renaming a variable - clicked OK and nothing... The log said:
> 2019-06-05 11:18:29.0653;ERROR-2.4.1.4734;Rubberduck.UI.Inspections.InspectionResultsViewModel;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE))
Which I would assume means that the project wasn't freshly parsed. However, it certainly looked freshly parsed. I clicked the parse button and it worked OK.
 
> This is the same issue, just with a with block instead of an if then block.

The underlying problem seems to be that the inspection makes the completely wrong assumption that variables in VBA are scoped to the containing block.
 
@Duga You know that old expression "the squeaky wheel gets the grease"?
squeak, squeak, squeak,
:)
This one, however, may be different:
    With populateCommand 'as ADODB.command
       'do some setup stuff
      Dim insertRS As ADODB.Recordset
      Set insertRS = .Execute
    End With
Fires AssignmentNotUsed on the Set...
No I guess that makes sense. nevermind
 
3:36 PM
is insertRS ever used thereafter?
 
yeah. No. it's not.
 
if that's an INSERT command, then why bother with a Recordset?
 
that's what I get for too much task switching.
 
and it's plain weird to have a read-only forward-only recordset for "inserting"
 
3:37 PM
(forwardonly is probably apropos; readonly, not so much)
 
yeah... somehow missed the fact that ADODB.Command.Execute is a thing.
 
no... wait... there has to be a reason. May not be logical or valid, but there has to be a reason...
gimme a sec.
 
Uh, no, that's not the point. The point is that .Execute will always give you a readonly forwardonly recordset, even if you expected something else.
If you want some other type of recordset, you need to rs.Open cmd instead
 
I only Set rs = cmd.Execute when the command selects something I need
otherwise it's just cmd.Execute fire-n-forget
maybe I'm doing this wrong
 
3:41 PM
That is fine if you have no plan to modify data via a recordset, or don't need disconnected recordsets.
 
yeah, whatever the reason for that little sinppet of code is now lost to the dust bin of history. Probably some copy/pasta leftovers
 
but if you do modify data or need some particular client-side functionality (e.g. disconnected rs), then you can't just assign from cmd.Execute; it won't work the way you expect it to work.
The worst thing about ADO is that it will never give you a runtime error if you gave it some nonsensical settings; it just silently substitute with what it think is valid.
 
Some testing seems to work just fine w/o the added .recordset. Plus, the insertRS was not being used for anything. That was essentially the last line of the method
 
Digging holes to fill it, eh? :D
 
that is being used to populate a table that's bound to a form. it selects & displays records that aren't otherwise in use.
@this That's my primary MO, if you haven't noticed...
to be fair, after hanging out 'round here the last couple of years, the holes aren't quite as deep as they used to be.
and the holes are different shapes than they used to be, so that's some kinda progress, right?
 
4:04 PM
I'm wondering - if one sets up a git repo on a virtual machine that may be used by different users (using a generic user profile), what's the best way to ensure that each commit requires author name/email to be supplied?
 
don't use a generic user profile?
is the VM on a domain?
 
I would agree 10000% w/ not using generic user. :(
yes and not in my control to de-generialize
so I'm F'd?
 
AFAIK, yes... but IDK much ;-)
 
 
1 hour later…
5:11 PM
> **What**
Functions and property getters in VBA/VB6 don't *need* to explicitly return anything in every execution path, or at all actually. Let's implement an inspection that flags functions and property getters that wouldn't compile in VB.NET because *not all code paths return a value*.

**Why**
This inspection would be useful for code that needs to easily portable to .NET, and could potentially prevent bugs. It's different than "Function return value is not assigned", which doesn't care f
 
Interesting. Got a #NotFake call from SS informing my me numbers been "cancelled". Pineapple AHOY!
 
Wow! I'll be sure to answer all calls just in case they cancelled mine, too!
 
@IvenBach be sure to check your voter subscription status, might have a [bad] surprise at the polling office in November otherwise. hth does a SS# randomly get "cancelled" anyway?
 
5:30 PM
I think the #NotFake was an indication that it was very fake, indeed.
 
^
 
sarcasmDetector.fail();
 
yeah
 
#HumorFail
 
i got it as you was super serial
 
5:31 PM
serial?
 
and did the O_o face
 
@MathieuGuindon The voting system in the US isn't rigged at all...
 
its a play on super cereal
which was a southpark joke
 
@IvenBach nothing surprises me in the US anymore.
 
which makes fun of...
googling....
 
5:33 PM
@MathieuGuindon Don't hold it against me that I was born there. #NotMyChoice
 
yeah al gore
i thought it was al gore, but i wasnt sure
 
5:44 PM
21 hours ago, by IvenBach
CoworkerWalkingIntoGlassDoor++;
 
While strictly not a co-worker. This one's a visitor.
 
I like that chat transcript keeps the timestamps
GlassDoorIncidents++;
 
we need Duga to be able to pull them all and make us a graph. :)
 
@Duga get-glassdoorincidentcount
 
5:57 PM
> Since I was "wishing", I thought I would add another item to this request. When an item in the Type declaration is an Object also include the Class Init and Terminate procedures with an instantiation of the object(s) and setting them to Nothing.
> @SmileyFtW caveat: can only work for classes that are creatable.

Set this.Thing = New Object 'invalid
 
hi guys... i'm still on v2.2.6693.19208... i accidentally docked the Find References pane... what's that trick to undock panes that absolutely under no circumstances should ever be docked..? =-)
i seem to remember editing some file with a text editor...
 
double-click its title bar
 
oh. well that's ridiculously normal, lol. which one is it that gets stuck docked?
i had a sticky one.
 
 
1 hour later…
7:14 PM
DuckCheck: When using Excel.Range.Find(What:=vbNullString, SearchFormat:=True then using Excel.Range.FindNext(previousFoundCell) is it ignoring the supplied format?
 
Find/FindNext are documented as caching the values for all optional parameters
so, it shouldn't
 
I'm not having it use the SearchFormat which is what I'm expecting it to do.
It shouldn't but based on my testing it is.
 
tbh Range.Find and Range.FindNext should always have all optional parameters specified explicitly
 
docs.microsoft.com/en-us/office/vba/api/excel.range.findnext has no option to supply anything other than After.
 
<~ never uses Range.Find
 
7:22 PM
I thought it'd be faster with Range.Find(). I was wrong.
Debugging this took way more time.
 
7:39 PM
@Hosch250 any performance concerns about the xaml converters in the CI TW?
 
8:03 PM
@IvenBach Dumb question, but what does it mean in plain English to say SearchFormat:=True?
 
TFW you have to go through mega-database with bajillion objects that nobody bothered to delete "because nobody's sure if it's in use"
 
I just went on the documentation page for Range.Find and it didn't explain
 
@puzzlepiece87 docs.microsoft.com/en-us/office/vba/api/excel.range.find the parameter SearchFormat
 
@puzzlepiece87 DoSomething NamedArgument:=value
 
@IvenBach Right, that's where I was, but what does it mean?
@MathieuGuindon Right, I must be communicating poorly. What does the parameter accomplish?
 
8:05 PM
45 mins ago, by Mathieu Guindon
<~ never uses Range.Find
 
@puzzlepiece87 You can search for a format that's an the cell. IE Yellow font, or Border, or in my case a particular Range.NumberFormat.
 
We're accomplishing a lot so far xD
 
wow "the search format" has to be the most thoroughly lame documentation ever published for a SearchFormat parameter
 
^
 
@IvenBach Okay cool, and you're probably completely correct in doing it this way, but do you expect to have results returned for searching formats of vbnullstring?
That seems like something that could only be returned for cell values, not numberformats.
 
8:08 PM
I don't care what is in the content of the cell. Using vbNullString will give me results when the cell is empty whereas "*" does not.
 
Wait, so when you're searching format, the What:= field still applies to cell value? Then how do you search for (to cite your example) yellow font?
 
@MathieuGuindon CI TW?
Code Inspector Tool Window?
 
Sub Macro3()
    Range("F8,I16,M22,P14,M10,K7,I8,F15,F22,H29,M30,Q28,Q22,M17,I24").Select
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
    Range("C18").Select
    Application.FindFormat.Clear
    With Application.FindFormat.Interior
        .PatternColorIndex = xlAutomatic
        .Color = 65535
        .TintAndShade = 0
        .PatternTintAndShade = 0
@puzzlepiece87 ^ QuickNDurty macro recorder applying yellow interior. Note the "" in What.
 
TBH, not sure.
I'd guess if it was any of them, it'd be the two image ones in the lists.
 
8:14 PM
they look pretty straightforward, and I'm not seeing a caching opportunity there... but maybe there's a better way than to use converters for this?
hm
I was looking at the grouping one
 
@puzzlepiece87 This will end up being a post cause this was an ankle-biter of a problem to resolve.
 
Do you have virtualization enabled on those controls?
 
pictures Iven biting his ankle
 
That will make it only load what the user is seeing, instead of loading all of them.
 
@Hosch250 see, I think that might be [part of] the main problem - the PR comments do mention something about virtualization being disabled
 
8:16 PM
 
gosh I hate that toolwindow
@IvenBach wtf is that? lol
 
Scavenger is the official name from Diablo. Long ago they were nicknamed ankle-biters and it's always stuck.
 
I'd like to do it, but TBH, I'm enjoying my week not programming much :)
 
8:17 PM
It's one of the first mosters you face in the cathedral.
 
@Hosch250 no worries
tiktiktiktitktik nope, no monsters here
 
I'm trying to learn kubernetes and machine learning on the side, though.
And am interviewing at a couple of jobs.
 
@IvenBach You're problem is using ActiveCell, if you're in fact using it.
Works fine for me once I stopped using .Activate
Notoriously unreliable.
Here's my code:
 
How do I post that as a well-formatted code block?
 
8:23 PM
@puzzlepiece87 Paste code then Ctrl+K.
I'm not using ActiveCell. That's just the macro recorder.
 
Ah okay.
Also, I take it back, I thought it was working but I made an error.
Also, @IvenBach, you already solved the problem or you're still working on it?
 
Based on all my efforts I'm concluding that Range.FindNext() doesn't actually honor any format supplied.
I solved it on my test WB.
 
Ah okay.
 
It's just barfing, a tad, on the workbook I made this for.
:grumble: now I can't break out of search.
 
9:23 PM
cursor-based stored procedures give me headaches.
 
once I rewrote a cursor-based SP that took 3 days to process. 100% equivalent set-based rewrite completes in ~3 seconds.
to this day I've still no idea wth caused it to lock itself up
 
IKR? doing it procedurally in T-SQL is just horrid
 
Boss: Is it still running?
Mug: Who knows? I hear the HDD spinning like a top so I assume yes. Let it roll for now.
 
the company charged us to get the script. my boss was tempted to charge them to get the rewritten one
 
O_o
 
9:26 PM
Here's your "correct" script. Hand us back our money.
 
^
what really gets my goat is that they should have had written it as a table-valued function. Heck, even a scalar function would have been tolerable, since it's much more reusable
but no, they had to write it as a one-row sprocs. I'm not going to write a INSERT INTO...EXEC around that one-trick pony.
 
10:04 PM
@MathieuGuindon I'm pretty sure that my PR enabled the virtualization again
not that I understood what that accomplished
 
@Vogel612 that Rubberduck now can host virtual machines? ;-)
 
considering that for some values of VM, RD already is hosted in one, that's somewhat funny :)
 
#TermOverload :)
 
10:20 PM
@Vogel612 (mod hat) - does this comment come off as snark?
There's no such thing as "once in a while" with code. Either it works, or it doesn't. Any money bets the problem is the data. Watch for leading/trailing spaces in your inputs, and/or consider Trimming the string input before the comparisons - again seriously consider using StrComp instead of an implicit and bug-prone Option Compare setting. Good luck! — Mathieu Guindon 2 hours ago
 
it's oversimplifying and somewhat blunt
not sure whether it's snark, though
22 comments does indicate that the post is a bit of a mess, though
and considering that this should've raised an auto-flag about an hour ago, I'm reasonably sure an SO mod already took a look at it
 
OP is still adamant that their code "sometimes works"... which makes no sense whatsoever
 
@MathieuGuindon maybe to you, but OP might not be quite as knowledgeable as you ..
 
And then they go on to sing my praises in a shitty self-answer that is just as broken as the original code, but worse.
Meh. Moving on, ttgh
 
wtf is that answer...
 
10:26 PM
I tried real hard to make sense of their screenshots too... Couldn't figure out in what way they supported OP's claim
So yeah, a mess.
 
That's the fun thing about those implicit voodoo conversions; even if you've explicitly cat it, it can get cast again downstream (e.g. re-formatted on Excel spreadsheet as already suggested).
 

« first day (1825 days earlier)      last day (1355 days later) »