« first day (1440 days earlier)      last day (1740 days later) » 
00:00 - 19:0019:00 - 00:00

12:01 AM
RELOAD!
[bruglesco/memory-card] 2 commits. 220 additions. 65 deletions.
[Cardshifter/Cardshifter] 1 commit. 20 additions. 1 deletion.
[rubberduck-vba/Rubberduck] 2 opened issues. 20 issue comments.
 
 
1 hour later…
1:09 AM
My view appears to concur with @mansellan about ID matching code behind so we know the context.
Sort of know which valve fixes the leaking pipeline...
 
1:39 AM
> ![unit test labels](https://user-images.githubusercontent.com/26076874/40091872-15d8105a-586f-11e8-9d0f-6ec3bfbfe2f2.png)
![unit tests icons missing](https://user-images.githubusercontent.com/26076874/40091875-17d9ef7c-586f-11e8-9a30-e9ee3405d7db.png)

Version 2.2.6709.33354
OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office 2016 x86
Host Version: 16.0.9226.2126
Host Executable: EXCEL.EXE
 
2:15 AM
I never really paid much attention to these nursery rhymes. That is until I heard the song "5 Little Monkeys Jumping On The Bed". The premise of this nursery rhyme is simple: there are five ill-behaved monkeys that are jumping on a bed. 🙈🙉🙊 ... https://dev.to/jvarness/what-nursery-rhymes-teach-us-about-the-dry-principle-4j5g
 
 
3 hours later…
5:39 AM
0
Q: Office CommandBarButton Icon Browser in the VBEditor

Thomas InzinaFrustrated with the solutions that I found online I decided to write my of Icon Browser. Form the onset I decided that my Icon Browser should work from the VBEditor and not show any of the thousands of blank button faces that I've been sifting through. CommandBarButtonCallBack:Class Descript...

 
 
3 hours later…
8:46 AM
0
Q: VBA PDF Creator for 2 worksheets that needs to loop over the data validation list

user169828I have a worksheet with SQL data connections as tables of sales data At the moment the manual process works: I use list (data validation pull down) to populate data for 8 countries. I have come up with the below VBA and tried to run it with a few problems: Sub CreatePDFforEachFilter() 'Need ...

 
 
1 hour later…
10:43 AM
 
 
2 hours later…
1:07 PM
> Bonjour,

I did a quick scan of the issues but couldn't find anything related.

Now that git integration is gone, I would like to have the option to overwrite existing modules, classes and forms while importing, so I can manually sync with a repository in a vcs.
 
1:41 PM
> I hear annotations are on their way out (although I'm yet to stumble across anything concrete to confirm this), so this may be a bug to ignore. Either way, the `'@IgnoreModule` annotation is not working as I would have expected. Although the majority of inspection results are ignored, `Option Explicit` is not (see image, where I have `'@IgnoreModule` in Module 2)

![image](https://user-images.githubusercontent.com/25348920/40120583-75b92696-5917-11e8-961e-793f980f8602.png)

I often leave o
 
@Duga Hmmm??
 
2:07 PM
> There was an idea at one point, to use member-level annotations such as `@Description`, `@DefaultMember`, and `@Enumerator`, and module-level annotations such as `@PredeclaredId` and `@Exposed`, and to use these as an easy interface to the corresponding member & module attributes.

The problem with that is that because the rewriters work off the code pane token streams (so that token positions line up exactly with what we see in the editor), attributes get wiped out on rewrite anyway (this i
> Looking at the [source code](https://github.com/rubberduck-vba/Rubberduck/blob/next/Rubberduck.Inspections/Concrete/OptionExplicitInspection.cs), I confirm that the inspection is ignoring the `@IgnoreModule` annotations.

The fix is rather simple: results for a given module should be made conditional to the return value of the [IsIgnoringInspectionResultFor](https://github.com/rubberduck-vba/Rubberduck/blob/next/Rubberduck.Inspections/Abstract/InspectionBase.cs#L119-L139) method from the `In
> `InspectionBase` currently defines a number of useful overloads to determine whether an inspection (i.e. a derived type) should be issuing results for a given inspection, given a target:

protected bool IsIgnoringInspectionResultFor(Declaration declaration, string inspectionName)

protected bool IsIgnoringInspectionResultFor(IdentifierReference reference, string inspectionName)

This is confusing. A derived inspection shouldn't need to pass its `Name` property to the base class,
> @retailcoder Ah, that clears that up, thanks.

Sorry, the screenshot wasn't the best; to clarify, for the example I screenshotted, the only inspection result that got through was `Option Explicit`
> The [XAML is still referring to `RubberduckUI`](https://github.com/rubberduck-vba/Rubberduck/blob/next/Rubberduck.Core/UI/UnitTesting/TestExplorerControl.xaml#L487) - the fix is to pull the resources from `Rubberduck.Resources.UnitTesting.TestExplorer` instead. This is entirely my oversight.

The CommandBar menus need more attention though:

public override string Key => "TestMenu_RunAllTests";

The `ParentMenuItemBase` class is [pulling the resource keys from `RubberduckUI`](https:/
 
3:20 PM
Another day begins
 
4:17 PM
Another day almost ends
 
That's a fast day!
 
:D You got that right. 10 hours programming in excel and now everyone in my office is gone. Surprising.
Anyway, Hi folks ^_^
Can you test something for me in the newest RD?
 
Should be able to.
 
When I click through methods in my project, the "<number> references" in RD toolbar is not changing a number from 1.
But when I press it it will find all of them.
Just if that's only me or is a new thing.
Hmm, interesting. If I click on another Module or Form -- In default VBA explorer --, it will change. But when I click on another opened text module it's stuck on the last item.
 
I have it change when I click on it.
 
4:23 PM
the context-sensitive label might only be updating when the caret position changes via a click or keystroke nope, it does update when a module is activated
 
^ When I first created it the number did stay at 0 or 1, until I clicked around.
 
also if parser state doesn't know about the method you're in, then the label won't update
 
I know how it should work. That's the thing. It's working differently. Imho.
 
looks like parser state isn't up to date
 
Well I've click on "Ready" to refresh it just before the recording
 
4:27 PM
hmm, the label that identifies the module and module type should update accordingly with the currently active code pane
(does here)
something doesn't look right. does maximizing the code panes change anything?
 
Yeah. I know. I've tried restarting Office.
Okay, so after restart and pressing the button, some "Network error" popup... ?
Then I've closed it and opened it once again and it works just fine...
 
network error wouldn't be on us... (unless the version check bombed?)
 
Who knows what that was. It's gone now. :-)
"Network error, can't access.... bla bla". but after next restart it was ok.
 
is the file on a shared drive?
 
I'm trying to write a SELECT query against a new table I just created. It can't find the table, even after I've refreshed in the object explorer. Does creation of a table require a disconnect/re-connect to use new tables? What am I missing?
 
4:42 PM
intellisense in SSMS sucks, that's what you're missing :)
 
if you insist on using it, it's better to start out writing SELECT 1 FROM ....
complete the FROM body (including any joins you need)
then go back to the SELECT and then it'll work.
 
Internet at work s**** today.
It keeps timing out on me.
 
Refresh local cache (CTRL+SHIFT+R) did the trick.
 
Are you sure, @DainIronfootIII or is IT on to you hanging out here. :p
 
I'm sure.
Can't even connect to our DBs very well.
 
4:45 PM
@IvenBach Yeah, that's necessary whenever you modify the schema. It won't autorefresh, like VBA's intellisense would. I guess they were worried that it'd be horribly slow if you connect to a remote server and thus refresh is manual.
@DainIronfootIII :( sorry, man.
 
And now to figure out why my TypeScript files aren't auto-compiling :(
 
@IvenBach TIL
OMG IT WORKS
 
One tiny mite against your mountain of knowledge.
 
I know nothing
and I can't ride a unicycle
 
4:49 PM
@MathieuGuindon so you've been typing it all by hand?!?
 
typing what?
 
SQL w/o intellisense
 
I'd go bonkers if I had to type every thing out.
 
I've grown past the "going bonkers" stage and moved on to "acceptance" and "resignation"
 
4:51 PM
Script As menu helps a lot but even so, there's plenty to modify.
 
Mugs even nuttier than I thought.
 
didn't have fancypants intellisense on C-64. #GetOffMyLawn
 
but even so, I do agree that intellisense isn't very good. Heck, even VBA's does it better than SSMS.
 
^ Feel the burn. Limitation of the times?
 
Don't worry, @MathieuGuindon, I can write C# on a whiteboard.
 
4:52 PM
@this Nah. Desktop :)
 
@DainIronfootIII but can you invert a binary tree on a whiteboard?
 
@MathieuGuindon Sure. flips whiteboard
 
@SonGokussj4 hmm ok i think there was a old report about RD not working well w/ network drive. IDK.
 
@DainIronfootIII LOL! I wonder how many Google applicants actually did that. Kudos for "thinking outside the box"
 
TBH, I'm not sure what inverting a binary tree is, but if I knew, I could write the C# on a whiteboard.
 
4:53 PM
^ I'm curious too
 
no idea either, I'm wild-guessing a tree structure with bool nodes, and inverting would be true->false and false->true, and the test is whether you can traverse the tree efficiently
 
@MathieuGuindon No.
A binary tree is a tree with at most two children per node.
I knew that much from searching ordered lists.
 
oh, no
flipping means to rearrange the ordering of leaf nodes
 
@this Working on loading it already :)
 
yeah, that's why I was not understanding how one'd "flip" it
 
4:56 PM
@DainIronfootIII the only tree I know by name is maple
 
sooo..... how much maple could mat chuck if he could chuck maples?
 
Noooooo..... you unpinned the message about build failure :( (Yes, that was me)
 
I think it would be easier for the maples to chuck Mat.
@SimonForsberg That was me. They got it working.
 
@this sounds fun, but what's the purpose?
 
Let's see...
Do a depth-first traversal and flip the nodes if they exist.
So left = right and right = left (need a temp variable there).
 
5:00 PM
IDK. they like dem abstract problems nobody needed a solution?
 
It's amazing how much I've learned about stuff with RD.
 
that's how - I'm asking why
 
Parse trees are awesome for learning things.
 
i suppose to maybe provide a reverse order?
 
then why not build your tree in the order you need it in the first place?
 
5:01 PM
so that you can iterate the Flipped tree using same algorithm.
well, we can go SELECT ... FROM .... ORDER BY ... DESC;, no?
so it'll be good for the optimization if the engine can run the tree both directions
whether that needs a flipping, though.....
 
...AFAIK it's a bunch of records, not a tree
 
seems easier to just provide an algorithm to traverse the tree backward.
not if you're using index. Most indices are B-trees.
 
Partly, it's because it's a simple algorithm that is easy to code on the whiteboard.
Gives insight into the candidate's experience programming and stuff.
OK, so I need to keep a mirror in my pocket. If they ask the question, just put the mirror up to the tree.
 
still, i'm curious how many binary trees they actually write out there.
 
@this Lots.
 
5:06 PM
> I'm probably a similar age and I would agree, except that the reason a recent grad is likely to do better on this problem than an experienced programmer is that they've actually studied it. It's not "something they've never done before". It's something they read about in a textbook within the last few months.
^ nails it
 
@DainIronfootIII rephrase that..... in a business application.
 
A fair amount.
 
you totally have to do trees if you're writing a database engine, a compiler, a kernel but above that?
 
pretty sure the answer is "none"
 
@this Searching.
Search an ordered string.
The obvious answer is to build a binary tree...
 
5:07 PM
nah, i'd just use some github library
 
or if they do need one, then they use the data structure that was written 15 years ago
 
^
 
@this That uses a binary tree...
 
Sure but I don't care.
 
@this Until you get the broken edge case...
 
5:08 PM
I'm paid to solve a business problem, not to write code.
That would be more reflective of my poor choice in selecting a library to do that, no?
 
a plumber doesn't need to be able to make pipes out of molten copper.
 
^
 
@this I'm paid to write code to solve business problems.
And, TBH, binary trees are easy peasy. Wait until you meet a non-binary tree...
 
@DainIronfootIII exactly! not to reinvent the wheel!
@DainIronfootIII like, erm, a parse tree
 
@MathieuGuindon Yes.
If you can't work with a binary tree easily, you can't work with a parse tree.
 
5:10 PM
I think I've worked with a parse tree, and 5 minutes ago I didn't even know the definition of a binary tree
I couldn't write Antlr though
 
@MathieuGuindon And you can work with a binary tree easily enough.
 
probably
 
@IvenBach just for fun - this might be of interest in groking what's a B-tree: youtube.com/watch?v=coRJrcIYbF4
 
At some point, it's just a definition that allows us to work with simplified problems.
 
remember that JavaDeveloper guy obsessed with tree structures? this discussion reminds me of him
I never understood the hype around trees
 
5:12 PM
@MathieuGuindon You know what a linked list is?
That's basically a tree.
 
@MathieuGuindon in the case of database, a B-tree is much faster to filter down to a specific record
 
A special form of a tree--that only has one child per node.
 
feel weird to me.... you must traverse them all
 
and how many times have you needed a LinkedList<T>?
 
the whole point of the tree is to avoid visiting all the nodes
 
5:14 PM
<~ 0
theoretical CS is nice & all, but doesn't prepare you for the real world IMO
 
with a linked list, you can't pluck out a 8th node without visting the 1-7th node
 
@MathieuGuindon In C#, none. In C++, it makes it way easier to add a new element without swallowing memory.
 
a binary tree, OTOH, would let you locate the 8th node without visiting all the nodes. The # of nodes you visit is governed by how many level of the tree there is.
 
@this You can't anyway, unless they are stored adjacent in a block, when you can do memory-offsets to calculate (and pray) where it is.
 
but that's an array, not a linked list
 
5:16 PM
Right.
And a normal list in C# you have to visit them anyway--or build it into a dictionary so you can grab an item by index.
 
@this I saw it but don't understand what it's doing. Yes, I see that it's sorting the numbers. The logic of how it does so I'd have to work to understand.
 
numbers are just example - it can be actually be actual data. This is pretty much what an index in a SQL database looks like
the goal is to keep the tree balanced, so that you minimize the # of levels of the tree (which means less nodes you must visit to get to the leaf node)
at each node you visit, you test if it's greater/equal/lesser than the value you're seeking
if lesser, you go to the left node. if greater, to the right. if equal, you're done.
so the ideal root node is something that's in the middle, and the next level, is whatever that's in the middle of the half they occupy, and so on.
and that is why you can easily pluck a specific record out of a database that contains 1,000,000 tables with only 7 nodes visited (or something like that).
 
@IvenBach Guess-the-number game. Optimal strategy.
That's basically searching a binary tree.
 
you can also why adding an index incurs a cost to the update/delete of a row
because for each changes to the data you make, the tree likely has to be rearranged because it must stay balanced
 
That's why you need at most 7 guesses to guess a number in 1-100. Because 2^6 is 64 and 2^7 is 128. So you need 7 guesses.
 
5:24 PM
42
it's always 42
 
@MathieuGuindon 42 is not the number I was thinking of.
 
@DainIronfootIII it is now.
 
you're thinking wrong then!
 
@this Wrong.
@MathieuGuindon :P
 
@this he's thinking 24, because of the earlier tree inversion discussion
 
5:26 PM
@DainIronfootIII I may be doing this but I don't know how to word it or put it programatically so it's easy to understand.
 
5:37 PM
I have returned. I am poking around the level 1 issues looking for something I can contribute and I am a bit overwhelmed by the codebase. Inspections, for example. I don't know where the inspections actually occur or how they are performed. There are 2118 files in this repository and I don't know where to begin. That is all. #noob
 
@HackSlash LOL.
Pick an issue, and someone can walk you through where everything is.
 
After the recent reorganization, I'm afraid I can't help much with that :)
 
inspections are invoked by the Inspector
 
Right, I saw that
are we talking FindIssuesAsync ?
 
5:39 PM
@HackSlash it may help to keep in mind that we try hard to keep it modular as possible so that you can limit your changes to only the narrow scope of whatever it is. Inspection should be a matter of implementing a base class.
 
that's actually especially true of inspections
i.e. how they're invoked isn't relevant to implementing one
(but we're happy to explain everything regardless)
@HackSlash yup. that's the inspector going through every implemented inspection and invoking them asynchronously
 
Ok, so where are the inspection definitions?
 
you'll find them all under Rubberduck.Inspections.Concrete
 
Every implementation of IInspectionBase, I think.
But yeah, that's the project you want.
 
Gleesh, so if I was making a new inspection I could copy one of those files and hack it up?
 
5:43 PM
pretty much, yeah
 
Ok, maybe I'll start there.
 
and it would automagically "just work" :)
 
cool beans
So those files are loaded dynamically
 
the next part to know about is declarations which you need to work with to implement the inspections.
Yeah
 
5:43 PM
through reflection, yeah
 
They are part of the solution.
Oh, no.
 
@DainIronfootIII ?
 
They aren't loaded dynamically (unless you have it as an add-in).
Ours are all included in the project...
Executed dynamically, sure.
 
They're discovered through reflection, that's why there's nothing to wire up for a new one to work
 
magic
 
5:55 PM
Pretty much =)
 
I'm getting Recordset.RecordCount = -1 still. I've altered the table to have a PK of ID INT IDENTITY(1,1) but when I query against it SELECT ID FROM dbo.SubContractors WHERE Name = 'Foo'; the correct count isn't returned.
 
got any rows with Name = 'Foo'?
 
Yes, 1
 
Recordset.RecordCount tends to yield the number of records iterated, not records returned
what matters is whether Recordset.EOF or Recordset.BOF
 
please note that hte type/location of recordset matters
IIRC, the only way to get an accurate count is to use client-side static recordset
Also, more importantly, getting a count should be considered a form of anti-pattern
 
6:09 PM
^
 
Why is that?
 
ok, so I have 100 chickens laying eggs.
so I go and count the eggs, record the # of eggs my chickens has laid, then go to collect the eggs.
uh oh, i dropped few....
oh and some hens laid some more while I was counting
what was the count again?
 
basically, Recorset content should be considered stale as soon as it's retrieved
 
^
the only meaningful count is the eggs I've collected at the end
but I can't count until I've collected them all
or as they would say, "don't count your eggs before they're hatched"
 
I see what you're saying.
I think.
I'm wanting to see if a name already exists in a table, and add it if it doesn't.
 
6:14 PM
anyway the point is, if you want to know whether your query returned results, Recordset.EOF is what you want to check, not Recordset.Count
 
As Mat alluded to, you're generally more interested in checking the BOF/EOF
then you don't even need either
if you only want to insert if the name doesn't exist, then it's faster to write a SQL statement that will do just that.
 
I just put an RD idea here and go. It's late :-)
What about adding "Created" (date/time) column to Todo Explorer? :-)
 
e.g. INSERT INTO foo (bar) SELECT 'baz' AS bar WHERE NOT EXISTS ( SELECT NULL FROM foo WHERE bar = 'baz');
 
I lack the knowledge to know how.
 
6:16 PM
^ and, assuming a transaction, that makes the check and insert atomic
 
(this works selecting from another table, too, just adjust the NOT EXISTS subquery accordingly)
^^ and that's the crucial point. you don't need to be such chatty with your SQL Server. "Do you have it?" "Ok, you don't have it, so let's insert it.", "What was the ID you gave it?" "Ok, now let's insert children..."
you need to be able to go "Hey! Those bunch o' data? Insert it only if you don't have it, and gimme all the new IDs" in only a single roundtrip.
 
Laymans terms: "Touch the DB as little as possible". Provide it everything it could possibly need to do whatever you want?
 
exact-o
 
0
Q: 2010 Access vba setting formatconditions doesn't work with certain ranges?

LEBoydI have the following code: i = i + 1 StrSearchCriteria = "=($W1=" & Chr(34) & "ETF" & Chr(34) & ")" With .Range("A:A").FormatConditions .Add Type:=2, Formula1:=StrSearchCriteria With .Item(i) .SetFirstPriority With ....

> Totally confused here
 
I'm trying to get there. Much failing to do till that's achieved. Reading up on your insert statement.
 
6:19 PM
you most definitely want to avoid RBAR programming here.
that's "row by agonizing row"
 
I've already read about that.
 
:+1:
 
I know not to do that.
What I don't know is how to not do it.
 
@this precisely what I'm putting up with. 3rd-party tool takes 5 hours to do something I've scripted and completes in less than 5 seconds
 
CTE (common table expression) as what exactly?
 
6:20 PM
@IvenBach the best thing since sliced bread
 
That sounds painful.
 
@IvenBach no it's realy!
 
breadcrumbs for CTE?
 
it's basically subqueries
 
CTE is essentially a sub-query that's pulled out of the query
 
6:21 PM
in classic SQL (like, in 80s or even 90s) you had to do stuff like....
 
so, it's un-nesting nested stuff
 
Sort of like assigning the query to a variable and then using that variable in another query as part of a single transaction?
 
@this I don't want my eggs to hatch. That means I can't eat them.
@SonGokussj4 Hmmm. How would we track that?
 
@IvenBach nothing to do with transaction
 
SELECT foo, bar, (SELECT baz FROM otherFoo WHERE otherFoo.Id = foo.Id) FROM (SELECT x AS foo, y AS bar, id FROM yetAnotherFoo) AS someSubQuery WHERE id = (SELECT TOP 1 id FROM evenMoreFoo ORDER BY someDate);
that's just.... horrid.
 
6:24 PM
just takes a nested SELECT and neatly pulls it above the main query, instantly enhancing readability tenfold
 
you have 3 nested SQL statement in a one big SQL statement and you have to read it inside-out
 
And easily confuses me.
 
it would me, too
so yeah CTE let you put it all top to bottom
 
How is that shown neatly with CTE?
 
for each (SELECT ...) you put in a WITH nameOfCTE AS (SELECT ....) then in the main SQL simply refer to it as if they were just tables.
 
6:25 PM
with source1 as (
    SELECT x AS foo, y AS bar, id FROM yetAnotherFoo
), source2 as (
    SELECT TOP 1 id FROM evenMoreFoo ORDER BY someDate
)
SELECT foo, bar, (SELECT baz FROM otherFoo WHERE otherFoo.Id = foo.Id) FROM source1 where id = (select id from source2)
something like that
(not-so-great example)
 
keep in mind that the CTE's scope is limited to only one SQL statement; you can have many CTEs as you like but you don't get to carry CTE to next statements.
Yeah, I realize it now. Sorry about that.
It's more useful for the FROM
 
(and subqueries in the SELECT/WHERE is potentially a code smell, anyway)
 
Studying your INSERT example and coming back to this after.
Using INSERT (Transact-SQL) as a guide
[ WITH <common_table_expression> [ ,...n ] ]
INSERT
{
        [ TOP ( expression ) [ PERCENT ] ]
        [ INTO ]
        { <object> | rowset_function_limited
          [ WITH ( <Table_Hint_Limited> [ ...n ] ) ]
        }
    {
        [ ( column_list ) ]
        [ <OUTPUT Clause> ]
        { VALUES ( { DEFAULT | NULL | expression } [ ,...n ] ) [ ,...n     ]
        | derived_table
        | execute_statement
        | <dml_table_source>
        | DEFAULT VALUES
        }
    }
}
[;]
Your example has INSERT INTO foo (bar). That's everything preceding the SELECT statement.
 
yes
 
6:35 PM
I'm having a disconnect since I'm unable to find out where SELECT is a valid component of INSERT ... SELECT ...
 
` | derived_table`
 
Thank you.
> derived_table
Is any valid SELECT statement that returns rows of data to be loaded into the table. The SELECT statement cannot contain a common table expression (CTE).
 
no i should have looked
dml_table_source
wait.
i must be looking at a different version
but yeah derived_table is right one
and no you don't embed the CTE in the SELECT -- that's why the syntax is WITH aCTE AS (....) INSERT .... SELECT ... FROM aCTE;
e.g. think of CTEs as something that you must define upfront before you start the main SQL statement (which may be an INSERT, UPDATE, SELECT, etc.) at the outermost level.
 
I'm still on just INSERT ... SELECT ....
 
okay, so take the SELECT part and put it above the INSERT, wrap it in a WITH <name> as ( .... ) and then use that <name> in your insert in place of the SELECT
 
6:40 PM
It's the multiple distinct pieces, when used together, that makes it hard for me to see. Leaning the correct names and what they represent is what I need right now.
 
with source as (
    select ... from ...
)
insert into blablabla from source
 
with the INSERT .... SELECT .... you are mostly interested in making that the list for the columns to insert (the () after the INSERT INTO <table name> matches with the list of columns to select from
where it comes from is completely up to you.
so, INSERT INTO foo (a, b, c) SELECT x, y, z FROM bar; is valid (3 columns inserted, 3 columns selected)
note that if you use the shorthand INSERT INTO foo SELECT x, y, z FROM bar;, this assumes that the table` foo` has exactly only 3 columns that requires a value and there are no other restrictions.
IME, however, it's a PITA, so it's easier to always be explicit w/ the insert list
 
> I am unable to reproduce this issue. Was it fixed as a byproduct of some other change?
> @A9G-Data-Droid the above MCVE isn't compilable... I get a repro with this:

```
Sub test()
Dim foo As Object
Set foo = New Collection
DoSomething foo
End Sub

Sub DoSomething(ByRef bar As Object)
bar.baz = "x"
End Sub
```

> Procedure 'DoSomething' can be written as a function
 
@HackSlash basically the fix for #2719 involves modifying this method:
        public override void ExitArgList(VBAParser.ArgListContext context)
        {
            var args = context.arg();
            if (args != null && args.All(a => a.PARAMARRAY() == null && a.LPAREN() == null) && args.Count(a => a.BYREF() != null || (a.BYREF() == null && a.BYVAL() == null)) == 1)
            {
                _contexts.Add(new QualifiedContext<ParserRuleContext>(CurrentModuleName, context));
            }
        }
...the listener will need to get ahold of the DeclarationFinder to locate the Declaration for the argument, and from there determine if the type is an object type
 
@MathieuGuindon Or just check for Object...
 
6:56 PM
> Gee whiz. I did a similar thing. My code runs but I'm not seeing that suggestion in code inspection. I copy and pasted your code above. No such warning or suggestion in code inspection. I even went in to settings and hit reset on code inspections. I still don't see that message.

```
Public Sub canBeFunction()
Dim foo As Object
Set foo = CreateObject("Scripting.Dictionary")
Debug.Print foo.Count
DoSomething foo
Debug.Print foo.Count
End Sub

Private Sub DoSomethi
 
@DainIronfootIII no. it doesn't matter if the type is Object or Collection or Class42
 
@HackSlash you're running off the current [next]?
 
I'll reinstall
 
I.. hmm
@HackSlash I'd verify the settings file before doing that :)
(in theory the reset should have, erm, reset inspection settings though)
but just in case
 
00:00 - 19:0019:00 - 00:00

« first day (1440 days earlier)      last day (1740 days later) »