« first day (1784 days earlier)      last day (207 days later) » 
00:00 - 20:0020:00 - 23:00

12:01 AM
[rubberduck-vba/Rubberduck] 4 opened issues. 19 issue comments.
[Minesweeper] Games Played: 65, Bombs Used: 39, Moves Performed: 9466, New Users: 11
12:31 AM
"The next best thing to having good ideas is recognising good ideas from your users. Sometimes the latter is better." - Eric Raymond
1:18 AM
Public Sub foo()
    ? "bar"
End Sub
pretty prints to ...
Public Sub foo()
    Print "bar"
End Sub
When executing the latter a RTE438 occurs.
Need to preface it with Debug. for it to actually run.
Achievement Unlocked: return home safely from roadtrip.
2:17 AM
@IvenBach You might enjoy Surely you're joking, Mr. Feynman.
3:08 AM
TDD: a 2003 paper studying the effect of the practice...
3 hours later…
7:24 AM
@MathieuGuindon: Hi Matt. So I've reinstalled Office from 365 to 2016 and, big surprise (not), Property window is behaving normally, no lag upon Backspace...
8:01 AM
Are we with this movement (programming wise?) @this blog.cleancoder.com/uncle-bob/2012/08/13/…
^ thoughts? @MathieuGuindon
> ##### Off-topic
**@retailcoder**, don't worry about your PR comments the other day. Actually, @Linda-Editor and I are planning on changing the text again to 'grammatical element'. If you hadn't added your input regarding the definition of 'token', I likely wouldn't have thought of this. Might even in the end write 'token' in some way to improve the content.

##### [_Locals_ window](https://docs.microsoft.com/en-gb/office/vba/language/reference/user-interface-help/locals-window) & [_watch_ w
2 hours later…
9:57 AM
@PeterMTaylor I actually read his entire book about the topic. I think it completely makes sense.
10:51 AM
@SonGokussj4 that's worth sending a frown on 365 =)
11:49 AM
@Duga That puts us 5 ahead. :)
@M.Doerner Question wasn't phrased well. Since there are now no plaintext source code files in my bare origin repo, the concern arises that doing git pull won't generate those plaintext files again for me. However, my hypothesis is that somewhere, buried in all the objects directory files, git will be able to recreate that plaintext for me, so I shouldn't worry at all.
^hypothesis correct?
I'm feeling like Tom when Jerry's just dinged him with a frying pan:
I see nothing but stars!!
(and one little duckling circling in the constellation)
@MathieuGuindon Well, for now, A) I didn't find this problem anywhere on the internet. B) Tried that only on my 2 devices, don't know any other person with the same problem. So who knows. Still possibility it's because I have something on my PC/NTB
@Duga Isn't this a known issue with all the lists now? I thought something @Comintern did with his awesome update to the CI somehow broke it in all of them.
12:20 PM
@PeterMTaylor In the "Interface Adapters" section, he says:
> No code inward of this circle should know anything at all about the database. If the database is a SQL database, then all the SQL should be restricted to this layer, and in particular to the parts of this layer that have to do with the database.
As I understand that, that means that business rules should not be encoded into triggers or functions or stored procedures. Am I reading that right?
> **Rubberduck version information**

OS: Microsoft Windows NT 10.0.17134.0, x64
Host Product: Microsoft Office x86
Host Version: 16.0.10730.20334
Host Executable: WINWORD.EXE

RubberDuck throws an unhandled exception, when you open the VBEditor via a C# VSTO addin in Word.

**To Reproduce**
Steps to reproduce the behavior:
1. Make sure that all Word instances are completly closed.
2. Create a "Word 2013 and 2016 VSTO Add-In" in Visual Studio an
That goes against what I was taught - let the database worry about the data. Let your code worry about everything else.
Of course, I learned that 30 years ago, so things may have changed...
Instead, at that lowest "Entities" level, I would have a data object (or more) that encapsulates the data and the rules necessary to maintain and access it properly would be methods on the object.
I wonder if that presumes a "thin database".
There are some who thinks that database are best used as a dumb data store, letting the middle tier handle all the logic.
Others think that you should have a "fat database" where all business logic should be encapsulated in stored procedures or views or equivalent.
I tend toward the latter because it's much easier to achieve independence in enforcing business rules at the database level than it is at the application level.
12:48 PM
That last statement is what I'd always been taught and it makes a lot of sense. I guess the real key is to have a plan and to make sure that all programmers stick to it.
i.e., Business rules belong here! Don't scatter them willy nilly!
In the diagram, the business rules are said to be a part of the entities, which is the most inner circle. By its description, it is also the most independent unit.
The problem, though, the DB is put on the outermost circle.
Ah, right - because the author also says they want to be able to swap databases out
A fat database precludes that.
Stored procedures, triggers and functions are generally very non-portable, even if you insist on sticking to ODBC standard.
So, yes, that architecture requires a thin database.
1:05 PM
and who am I to argue with Uncle Bob, right?
I guess that makes me a cheeky bastard, then. ;-)
I really do think that the database independence is overrated.
IME, products that try to be database-independent tend to be poor performing.
agreed. with all the effort necessary to migrate from one "SQL server" to another (note the lower case "s"), rewriting some SPs and functions would just be part of the plan.
hates how MS takes every day, normal words and uses them for its product names I can't access Access! >-(
I think that's kind of the point. ;-)
Be happy they didn't require us to put ® in front of those everyday words....
Yeah, well they can take their ® and...
brand cows?
1:12 PM
ah well, time to focus on the job at hand... finding the nearest BMV so I can go renew my license so they'll let me on an airplane in a week and a half.
Pretty sure after hanging around worldbuilding, I'd not be allowed on an airplane.
I know too much about high-explosives and nuclear weapons and poisons and such things.
Last time I checked, thought crime isn't a thing. yet.
Doesn't matter. They pull you for a "random" inspection.
One of the other people on there got pulled twice last time he flew.
@this Very much emphasis on yet. Reminds the world that "1984" was a warning, not a hand-book.
1:30 PM
@FreeMan seen this?
In real life, it's a combination of both.
wow. Having not yet read Brave New World I wasn't aware of his take on it. Based on the high-level analysis there, they are both being proven correct in varying degrees.
Most will fall for the BNW model. Most the rest will fall for the 1984 model.
yeah, what @Hosch250 said, but more wordier.
I agree. real world villains are rarely one-dimensional as Hollywood would like us to believe.
1:39 PM
I haven't decided whether I'm a villain, a hero, or nobody yet.
I'm not a hero, I think I have a tendency toward villainy, but I'm guessing I'm a nobody, since I don't really want to be a villain (hence, I keep my villainy in check).
Just don't be a redshirt.
@this Good point.
ATM, I'm a greenshirt ;)
I mostly wear greens, greys, blues, and black. Other colors don't look good on me.
2:01 PM
  Dim project As VBProject
  Set project = Application.VBE.ActiveVBProject
  project.VBComponents.Remove project.VBComponents(workingName)
Any ideas why I get error 5 "Invalid procedure call or argument" when workingName = Form_*?
It seems that VBComponents.Remove won't remove an Access form...
@FreeMan it's a document module, the host owns it
oh... so I have to delete it a different way then.
but, it seems to live in VBComponents...
that's how I managed to save it to file in the first place.
every document module has an associated VBComponent and code module... just like Sheet1 has a code-behind
still, if you want to remove Sheet1, it's Excel territory
(or add a new sheet)
2:13 PM
well... This is Access, but I'm a-guessin' the theory is the same.
I'm fully expecting the same error to be thrown if you try to remove an Access report module too
DoCmd.DeleteObject acForm, <formname> I'm pretty sure @this said something about that a day or 3 ago
Yeah, you're in Accessland, not VBAland there.
I think Application.LoadFromText will just silently overwrite the same form/report
so you may not need to do that if you use that method.
<--- needs someone to waive a flag at him when he crosses international boarders.
not sure I'd call it international.
2:18 PM
it's more like crossing a county line. Or even just into another neighorhood
@MathieuGuindon hey, it still works - he simply shouldn't make foreign tourists mad and needs to be told when he's doing that, no?
@MathieuGuindon I'd like to be warned if I've crossed an international boarder, too.
^^ that
I think branding cows in front of some Indian boarders may have that effect, @FreeMan
frankly, your first reference to "branding cows" made me think of a marketing department. Took me a moment to get the reference.
2:23 PM
Does the Show Hidden Members stick across VBE sessions, or do I need to remember to do that every time I open it?
I think the latter
wanders off to rewrite his Access file import routine
hmm. now I need a sanity check myself --- I have a stone-age-old codebase that had references to MSXML2.DOMDocument, with MS XML 6.0 referenced for however long. I have not changed that. I compile the project and it complains not having that object. I have to change MSXML2.DOMDocument60. HTH did that work before?
or I'm being gaslighted.
2:28 PM
see above reference
it's freaky. I would like to think that I've been happily compiling the code all the along until just now and that nothing changed in respect to the references.
"I didn't change anything, I swear!" That's what they all say.
yeah I wouldn't be surprised if I did something stupid but it completely baffles me how.
2:51 PM
25 mins ago, by FreeMan
@this funny you mention that... I had the very same "o__O" reaction last week answering a SO question where the OP was trying to late-bind a DOMDocument60... I couldn't get that class/interface working late or early bound. Could MS have borked it with some update?
(I think I remember using DOMDocument60 before... but that was at least 5 years ago)
yeah, late-bound would use CreateObject("MSXML.DOMDocument")
60 won't work
why, because Microsoft.
?typeof createobject("MSXML2.DOMDocument") is MSXML2.DOMDocument60
?typeof createobject("MSXML2.DOMDocument") is MSXML2.IXMLDOMDocument2
blah, I'll just use IXMLDOMDocument2. #goodnuff
3:20 PM
> Thought of marking this bug as [critical] because interfering with other add-ins is a big no-no.. however if I understand correctly it's just us failing to load (needs investigation), and the VBE still ends up opening, just without RD loaded, correct?
hot damn. i just found a reason to use a form reference instead of a form name -_-
im trying to do some stuff on a sub form
its yelling at me because it cant find the form
expressions via forms are always fragile and can't be checked.
yeah, looks like i am going to rewrite the function
yeah, I usually convert those expressions into proper references so that it just work™ and there's no surprises
expressions via forms are always fragile and can't be checked
3:28 PM
more importantly, you get VBA compiler to check for you if something change
3:43 PM
Q: VBA Copy and Delete Rows loop optimisation

Matt WilliamsI'm trying to identify which cells in Column C in a spreadsheet of data are dates and if they are, then check if that date is older than 2 years old. If the second condition is met then the below code should copy the entire row from sheet "DUP_ALL" to a new sheet (Archive) and then delete the cop...

> Yes, VBE appears with all its standrad content but RD is not loaded.
You have to close all the word instances and open the VBE by hand afterwards.
3:58 PM
@Duga speculation: if this is invoked as part of add-in startup, it might be too early. We know that VBE loads its addins while it's still in towel, soaking wet and dinner hasn't been even cooked.
Q: Update Dashboard tabs to compare subcontractor to peers then email performance summary

TonyPMy macro is cobbled together using some code from Ron DeBruin and various other sources and it currently works but I am sure it is not as efficient or bulletproof as possible. Currently it updates the Weekly or Monthly Dashboard tabs and saves them as a PDF then emails them to the correct subcont...

@this ooh I think you're onto something there
4:16 PM
> https://github.com/makuepfer/VBE_Starter/blob/254126d81a93c540057f49090f6cc3d771fcb624/Makro_Starter/ThisAddIn.cs#L12-L17

public partial class ThisAddIn
private void ThisAddIn_Startup(object sender, System.EventArgs e)
Globals.ThisAddIn.Application.ShowVisualBasicEditor = true;
IIRC VSTO add-ins are loaded when the host application starts up, while the splash form is still being displayed. If this startup code runs befo
4:42 PM
@QuackExchange first, indentation
4:54 PM
> Got your point. But this application is just an example to show how I call the VBE.

Our use case is the following:
We've got an word-ribbon with a button to open up all the macro-files that are loaded in Word (Startup-Path of Word).
In the end, we open up the VBE.
You can only click on that button, when Word has fully started up and a document is loaded.

It's not a big deal for us to leave away the line of code, that opens the VBE.
But I think it's pity that RubberDuck crashes when
5:11 PM
> Definitely needs investigation - it doesn't make sense that RD would crash if you bring up the VBE through VSTO but not with Alt+F11...
@Duga gah, add-in startup handler was a red herring..
we need a way to find out what exactly goes wrong ...
so ... either debug ourselves or get a debug build to Mauro
5:35 PM
Hoping appdomains aren't involved...
Q: Any way to imporve this VBA code?

EleuteryI have an import macro, create ID by concatenaning cells, then i compare using VLOOKUP with another sheet if any duplicate found, but it's runnning very slowly, so i want to know better ways to optimize this code, because once finished, i need to add another "for" for in case os duplicates found,...

@QuackExchange are you sure you want to imporve the code?
@this that's an... awkward... description, but quite vivid!
> Just to offer two more data points ---

As you may know already, different hosts has their own OM with different methods to activate Visual Basic Editor.

In Access, the command is `DoCmd.RunCommand acCmdVisualBasicEditor`

clicking a button that runs the code has no problems.

In Word, I've attached a docm file with a command button that does `Application.ShowVisualBasicEditor = True`.

This does not cause error. However, bizarrely, I get a debug dialog saying the code execution ha
@Duga makes me wonder if the VSTO is getting that debug dialog, then cause it to throw exception which then get handled by RD. Or, it could be totally unrelated and Word's just being... Word.
6:25 PM
Re the reorder parameters fix PR, what would be the preferred name for that extension method?
why can't it be ToString again?
because overriding ToString on an enum with one result being an empty string seems like a bad idea?
@Duga pretty sure the repro involves VSTO
@MathieuGuindon The signs point to yes. Except for that bizarre debug dialog.
@Vogel612 ToStringDangerWillRobinson?
I guess ToCodeString would work and wouldn't conflict, either.
that seems like a good one, because it makes the conversion explicit :)
expect an update later tonight
for now: dinnertime :)
6:29 PM
FWIW I'm fine with ToCodeString, just pointing out that "code string" isn't a CodeString - hence a xml-summary comment seems in order.
I still like ToStringDangerWillRobinson, though... </sadface>
Why not just ToCode?
I like that
it's better than ToCodeString for sure, because it doesn't imply the return value is a CodeString
what about TokenString?
better than the AsToken I had in mind earlier (didn't share it here, because it implies a Token is involved)
TokenString works great I think
6:43 PM
not ToTokenString?
yeah. let's not involve Dororthy's dog here.
I guess technically a "To" is warranted
Hence why I asked. I thought I read somewhere that as a naming convention, extension methods ought to have To prefix.
That makes no sense.
6:44 PM
but with Token, it looks unfortunate.
The whole System.Linq; namespace is a litany of extension methods
only the terminal aggregators use a To there, and everything else would be nonsensical
@this not extension methods.. IIRC it's a guideline for naming methods involving a type conversion of some kind
That makes more sense, i think.
Mentioning that, it kind of implies that ToCode might implies it converts it to Code, not a String, no?
it does (kinda.. there's no Code type, so...)
my vote goes to TokenString :)
I suppose if you wanted to avoid Dorothy's dog, you could AsTokenString
but meh - TokenString is good by me, too.
6:50 PM
Who's Dorthy?
Wizard of Oz - her dog's name was Toto.
BTW, I speel gooder. Shuldn't bee Dorothy.
@this :D I got that before I got to the explanation, for once.
See, I know she was named Dorothy, but I didn't know her dog's name
I knew that from the book. I don't think it's as noticeable in the movie.
I think the movie referred to the dog only 3 or 4 times.
6:53 PM
I think she uses it a couple times, but it just kind of gets lost in the action.
the only scene where the dog had a role was the unveiling of the curtain
otherwise it's just scampering all around the place.
LOL, that was the one scene that they botched the worst.
(at least as I remember the movie. Been a while)
@this I think she was usually carrying it.
dang, my google-fu is gone, I can't find the "is" vs "as" convention
6:56 PM
"I'll get you my pretty. And your little dog Toto, too!" - Wicked Witch of the West to Dorothy, Tin Man, Cowardly Lion and The Scarecrow as they followed the yellow brick road.
some things stick with you when your kids watch the same movie over and over and over and over and over and over and over and...
LOL, and I actually came here to go to a different chatroom to check on something I was doing in Docker...
@Hosch250 we're here to serve
@Duga oh, didn't realize the suggestion already went through
anyone else notice [running] showing up unexpectedly in the CE's node for the project?
7:00 PM
pics or it didn't happen
i.e. "no"
unless that's VS' CE in which case... "no"
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4927?src=pr&el=h1) Report
> Merging [#4927](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4927?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/63e529a2bd25f73822bcea037c83b4001b5aa800?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `0%`.

@@ Coverage Diff @@
## next #4927 +/- ##
I'm not seeing [debug] showing up there...
I think the logic to omit the status from the project caption is borked. We shouldn't need to use that anymore - we have typelib API.
7:09 PM
I'm still getting an accented u there, though
(in the CE, that is)
yeah, same thing.
IIRC, there is a procedure in the RD codebase that parses the window caption
and does a poor job of handling..... anomalies with the window caption.
window caption gets junk if it's too long IIRC
not the actual caption we see, though. Just the inmemory representation of the caption. Go figure.
7:11 PM
@this yesterday we were talking about Application.SaveAsText in Access.
I've got Access.Application.SaveAsText acForm, component.Name, localPath & component.Name & ToFileExtension(component.Type)
not sure about the component.Type - isn't that the same for both form and report?
and I'm getting an RTE 32584 'No object with the given name and type exists in thedatabase'
yeah, you're using VBIDE's names.
Not sure... I'm going through For Each component In Access.Application.VBE.ActiveVBProject.VBComponents and I've not run into reports
FYI - it is legal to have same name for both an Access form and a report
7:13 PM
(which is why there's the object type argument)
so you probably should do GetExtension(acForm) instead of GetExtension(component.Type)
anyway, your other issue is because of different nanming between 2 OMs.
If you create a form named Foo in Access, in Access' OM, that's Foo.
But in VBIDE's OM, that's Form_Foo
what OM do I wander wade through to find the ...
Oh, I have to remove the Form_ from the component.Name?
hence the error when you use component.name (VBIDE OM) to execute an Access method.
One more consideration....
7:15 PM
so obvious. Once you know...
you're doing For Each component In Access.Application.VBE.ActiveVBProject.VBComponents
that means you will miss some forms.
(or reports, too)
see, you can create forms or reports with no code-behind. Those do not get a VBIDE's VBComponent object.
component.Export localPath & component.Name & ToFileExtension(component.Type) picked them all up & gave me a text file...
got it.
If your goal is to collect all forms & reports, code or no code, you need to use Access OM again.
In this case, CurrentProject.AllForms and CurrentProject.AllReports
ayie carumba!
but maybe you don't care about codeless forms/reports. In which case, your loop is fine but just don't be surprised if your repository start missing one or two forms/reports...
7:18 PM
Q: How to shorten code and add variables

joe daudai wrote a macro that is take 20 mins+ on other computers but when i run it on mine it only takes 5 mins. it is a larger macro and i am new to VBA coding world. i was wondering if i could condense it down so that it can run faster not only for my computer but other computers too. Sub Macro1() Dim...

Now you start to see why I insist on two-part naming, to keep reminding about which OM we're dealing with.
if I'm using the Access OM to export the forms, do I get an FRX file for the form itself and a .cls for the code behind?
No, that isn't how it works.
(or is it FRM for the form)
You get a single file with both "frx" and "cls" combined
7:18 PM
(which we typically just call frm)
have you looked at it before?
@QuackExchange shudders even worse than thinking about my own task. Just from reading that little bit
I've used the component.Export and Application.SaveAsText, neither seemed to have any "frx looking bits". But then again, I haven't spent that much time looking at the files. I just assumed it would spit out something it could slurp back in.
well, if you look inside, you will see a bunch of binary fields.
(encoded as hexadecimal, of course)
  MultiUse = -1  'True
Attribute VB_Name = "Form_MyForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
that's the "frx" part.
that form has no controls whatsoever?
7:22 PM
is the only non-regular VBA code in what I exported via component.Export
ahh, no no
yes, it does. loads of em
component.Export will give you only the code.
got it.
Application.SaveAsText will give you both "frx" and code
again, this depends on your goal
7:23 PM
Application.SaveAsText is giving me the RTE which is where we started... I'll go back and have a look at those tweaks you suggested and see where I end up.
if you do not want to maintain the layout, the controls added, etc. etc. you might be fine with just the component.Export which gives you code only.
If I can maintain the form layout/design in git as well as the code itself, that would be most bonusical
but if you want to preserve all controls, etc. etc., you must work in Access OM.
VBIDE OM is not what you want to use.
7:24 PM
got it.
scrolls up
[rubberduck-vba/Rubberduck] build for commit 765f9312 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4927?src=pr&el=h1) Report
> Merging [#4927](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4927?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/63e529a2bd25f73822bcea037c83b4001b5aa800?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `0%`.

@@ Coverage Diff @@
## next #4927 +/- ##
[rubberduck-vba/Rubberduck] build for commit 765f9312 on unknown branch: 64.51% (target 0%)
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4927?src=pr&el=h1) Report
> Merging [#4927](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4927?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/63e529a2bd25f73822bcea037c83b4001b5aa800?src=pr&el=desc) will **decrease** coverage by `0.02%`.
> The diff coverage is `0%`.

@@ Coverage Diff @@
## next #4927 +/- ##
7:43 PM
I can haz hex?
Hi I don't know if this is the right place but I am just bored need some suggestion on which movie to watch ?
anyone has a list of their fav movies?
It's not the right place, but... we were just discussing Wizard of Oz
The Princess Bride is one of my favs. Wife loves it too, but, for some reason, she's mentally tied it to a season (don't remember which), so we're only "allowed" to watch during that season.
Yeah, I don't get it either.
flu season?
> This PR supersedes #4890 and should automatically close it. I kinda broke that PR when I submitted some changes to in in the fork it came from which are fixed here
Thanks @FreeMan
7:51 PM
@this that... that would make a lot of sense, to be fair.
yer welcome, @noob!
Of course, that's not a list. Well, OK, it is, but it's a short list...
Okay tell me if any other movies come to your mind. We'll make the list longer
to be fair, Fred Savage didn't really look sick, did he?
and it would have been more funny if everyone in the story had flu.
Just think- Indigo and Wesley hacking it up while dueling.
@this Inhellishsense tells me I've got .AllDataAccessPages, .AllForms, .AllMacros, .AllModules, and .AllReports as properties of CurrentProject. Is there a way to make one loop through all of them, or do I have to loop each collection individually? Also, which, if any contain the queries?
Your queries is in another castle. :-)
tables and queries belong to DAO's OM.
@this he was a kid. His acting skillz weren't that flash. Cut him some slack!
7:56 PM
we're talking about the same kid in The Wonder Years.....
@this that woulda added some entertainment.
@this never watched that show...
and I'm getting tired of raiding castles.
well considering it lasted a few seasons, I'd say he's pretty much your average star child actor.
and yes you need to enumerate each collections, sorry.
^child acting skills
oooor.... you could just buy OASIS-SVN or Ivercy....
I mean, you long ago left VBIDE country....
raid castles or get management to fork over (minimal) cash. FreeMan can predict his future
7:59 PM
or you can iterate the collections using the RD reflection API... just saying :D
hmm. not sure that works.
RD reflection wraps the VBIDE OM, doesn't it?
00:00 - 20:0020:00 - 23:00

« first day (1784 days earlier)      last day (207 days later) »