« first day (1022 days earlier)      last day (548 days later) » 
00:00 - 17:0017:00 - 00:00

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 5 commits. 1 opened issue. 5 issue comments. 1682 additions. 95 deletions.
 
12:19 AM
This irks me.
@Mat'sMug I'm requesting a grammar change.
I want ArgumentListContext to be more like ArgListContext.
The first is for calls, the second is for parameters.
The second is like this: [(] [param] [,] [whitespace] [param] [)]
The first is like this: [ [[arg][,]] [whitespace] [arg] ]
Notice how the comma is built into the argument.
That makes it easier to remove the non-last parameter, but harder to remove the last parameter.
Or maybe the trade-off will be worth it...
 
@Kaz I'm actually doing pretty good. Mostly.
Some people found out that I'm good at delivering software, so they have me spending my time teaching other people how to do it instead of actually doing it....
Which is kind of awkward.
Gagh! The ticker still lives~
2
@Comintern depends on your perspective. You or I probably don't see it as evil, but Joe who's never xor'd a thing ever does.
 
True enough. Some of this stuff might warrant a //Here be dragons comment.
There be dragons on this one:
    [StructLayout(LayoutKind.Sequential, Pack = 1)]
    public struct BStr
    {
        [MarshalAs(UnmanagedType.BStr)]
        public string Value;

        public BStr(string input)
        {
            Value = input;
        }
    };

    internal class NativeVariant : IDisposable
    {
        private readonly IntPtr _baseAddress;
        private readonly BStr _string;
        private readonly IntPtr _stringBaseAddress;

        public Variant Variant { get; }
        public IntPtr VariantPointer => _baseAddress;
 
in The 2nd Monitor, 3 hours ago, by Jeroen Vannevel
You're talking to a bot which posted a quote from somewhere else on the stack exchange network
I've done too much C -> C# interop. That looks totally reasonable to me...
Shouldn't that check to see if it's already been disposed @Comintern? I think that will throw if Dispose gets called more than once.
 
Yep, you're right. I should also check to see if the string is null or empty before allocating memory for it.
 
12:35 AM
argumentList : positionalOrNamedArgumentList;
positionalOrNamedArgumentList :
    (positionalArgumentOrMissing whiteSpace?)* requiredPositionalArgument
    | (positionalArgumentOrMissing whiteSpace?)* namedArgumentList
;
positionalArgumentOrMissing :
    positionalArgument whiteSpace? COMMA                                                            # specifiedPositionalArgument
    | whiteSpace? COMMA                                                                             # missingPositionalArgument
That is driving me nuts.
 
IKR?
 
Why in the world is the named arg list nested in the positional arg list?
 
Gtg. See ya guys.
 
See you, duck.
 
Later! Thanks for dropping in.
 
12:36 AM
I'm going to rewrite that.
 
This just feels wrong:
    public Variant(string input, IntPtr bstr) : this(VarEnum.VT_BSTR)
    {
        if (Environment.Is64BitProcess)
        {
            data = (long)bstr;
        }
        else
        {
            data01 = (int)bstr;
        }
    }
 
So does this: argumentList : positionalOrNamedArgumentList;
Why define an alias like that?
I think we are both rubberducking off each other.
3
 
lol
 
What do you think of this?
positionalArgumentOrMissing :
    positionalArgument whiteSpace? COMMA        # specifiedPositionalArgument
    | whiteSpace? COMMA                         # missingPositionalArgument
;
 
I think mine has to be "wrong". There's no other way that I can figure out to keep StructLayout(LayoutKind.Explicit), immutable, and allocate memory.
I like that.
Subject to the opinion of the unit tests.
 
12:40 AM
Should we compile broken code like that?
If we have an arg list that does ", ,", it isn't valid VBA.
 
You mean parse it? I don't see why not. It's not like it's going anywhere.
 
No, but it also makes for more edge cases.
Ones that we can't deal with properly.
 
Can't you just make the argument lists require an argument?
 
Yeah, I can just remove the "missingPositionalArgument" option.
 
positionalArgument (whiteSpace positionalArgumentOrMissing)*
 
12:42 AM
And I'm going to merge the positional and named argument nodes.
 
On of these days I'm going to get the line numbering and labels working.
It needs a separate endOfStatement context.
 
// 5.6.13.1 Argument Lists
argumentList :
    (argument whitespace? COMMA whitespace?)* argument
;

argument :
    positionalArgument
    | namedArgument
;

positionalArgument : argumentExpression whiteSpace? COMMA;
namedArgument : unrestrictedIdentifier whiteSpace? ASSIGN whiteSpace? argumentExpression;

argumentExpression :
    (BYVAL whiteSpace)? expression
    | addressOfExpression
    // Special case for redim statements. The resolver doesn't have to deal with this because it is "picked apart" in the redim statement.
That looks more like it.
@Comintern You know how to build the grammar, right?
How do I do it again?
 
Yeah. All you need to do is open the properties of the .g4 file and select the ANTLR build action.
 
Ok.. I really hope I'm not going to regret doing this
 
Don't I have to install something?
 
12:48 AM
Then grab the files from the obj\Debug folder.
 
@Mat'sMug what is that?
 
@Mat'sMug Is that a disassembled harmonica?
 
A dismantled Hohner Marine Band, key of A, bathing in rubbing alcohol
 
@Hosch250 You shouldn't - it should just show up in the build actions.
 
OK.
 
12:50 AM
@Mat'sMug Doesn't alcohol dry out the wood?
 
The comb isn't dunked lol
Just the reed & cover plates
 
That's much better.
I love this: _returnValue?.Dispose();
 
C#6 seriously rocks
 
IKR?
OK, time to test out my marshalling chops.
        [UnmanagedFunctionPointer(CallingConvention.StdCall, SetLastError = true)]
        private delegate IntPtr GetSettingDelegate(IntPtr appname, IntPtr section, IntPtr key, Variant Default);

        private NativeVariant _returnValue;
        public IntPtr GetSettingCallback(IntPtr appname, IntPtr section, IntPtr key, Variant Default)
        {
            OnCallBack();

            _returnValue?.Dispose();

            TrackUsage("appname", Marshal.PtrToStringBSTR(appname), Tokens.String);
 
Time to fix the resolver :/
 
12:58 AM
Yay!
 
Hehe
 
FML - ListBox.ListWidth returns a String: "0 pt"
WTF MS?
 
Oh wow, thank God Hohner oriented the holes - you'd have to be blind to put the draw reeds on the blow side
 
you think this is HTML/CSS or something? putting units in the property FFS
 
@ThunderFrame somehow I wish that was the silliest thing they did...
 
1:02 AM
yey - "curse you VBA" got 10 stars
wonders why it took so long
suspects @Comintern made a second account to cast a double curse
 
17 failing tests in the grammar :/
I don't mind so much about the 29 failing inspection/refactoring tests--I had to comment out code there to get it to compile.
Down to 13 failing grammar tests.
 
1:20 AM
@ThunderFrame LOL - sock-puppet curses.
 
A few additional failing tests in the inspections :/
 
It works!!
Like new!
Tastes terrible though
 
LOL.
Wait a sec, what's the hammer for?
Those things are usually screwed together.
You typically don't want to hammer on delicate things like that.
 
Hohner Marine Band harps are nailed :-)
 
Huh.
Well, good job :)
I had a harmonica once (never learned to play it), and it was screwed.
I broke the parser pretty good.
I have 13 grammar tests that fail.
The whole parser bails out.
 
1:33 AM
Related to arglist or completely just messed up?
 
Arglist.
It hits lexpression and bails.
arglist is called in lexpression.
 
Hmm
 
argumentList :
    (whiteSpace? argument? (whiteSpace? COMMA whiteSpace? argument)*)?
;

requiredArgument : argument;
argument :
    positionalArgument
    | namedArgument
;

positionalArgument : argumentExpression whiteSpace? COMMA;
namedArgument : unrestrictedIdentifier whiteSpace? ASSIGN whiteSpace? argumentExpression;
That's what I changed.
 
@Hosch250 the assumption has always been that we're parsing valid code, but maybe that changed with the keyhook introduction?
 
@RubberDuck NAFAIK.
Ah.
I think I might have found it.
 
1:35 AM
@Mat'sMug & 7 is even better! Real Tuples!
 
@RubberDuck And out var arguments!
And foo is type newArgName!
2
 
Pattern matching FTW
 
positionalArgument : argumentExpression whiteSpace? COMMA;
That was wanting an extra comma.
 
And real variant marshalling! Oh wait...
2
 
Woot! The grammar passes!
 
1:37 AM
I've just accepted that I'm going to end up an F# dev.
 
LOL, come and join us!
F# pattern matching kills anything C# will get.
2
 
Because, ya know, VBA wasn't niche enough for me.
 
Everything that I expected to work works!
2
 
O! BTW! JAVA IZ UN AWEFUL VERZUN OF CSHARP
7
 
@RubberDuck I'd pin that if it was halfway relevant to the room.
 
1:38 AM
Lol.
 
Makes me feel better that I didn't get the Java job I applied for.
 
It's not a bad language. It's just awful verbose. I miss var.
 
And the arg syntax tree is much neater and cleaner.
Now that we have a half-way respectable number of grammar tests, I should go through the grammar and clean it up.
 
@Comintern is there a reason you can't use dynamic for the variants? Didn't MS introduce it specifically for office interop?
@Hosch250 masochist much?
 
I thought dynamic just invoked by name.
 
1:41 AM
@RubberDuck I've heard that pain causes growth.
@Comintern Not as far as I know.
 
notes F# mention while @Hosch250 is awake, JAVA mention while @Vogel612 is asleep
2
 
LOL.
 
The root of the issue is that the functions I'm calling are expecting a very specific alignment on the stack.
 
@RubberDuck that assumption is flying out the window in 3.0
 
@Mat'sMug Then the grammar will definitely need a going over.
Basically, every single token will have to be optional.
 
1:44 AM
huh
not at all
Antlr4 handles parsing errors perfectly well
 
Oh, I see.
 
we're the ones making it bail out
did you know Eclipse is running off Antlr?
 
WTH is my argument list off by 8 bytes?
 
Did you notice aspnet is dependent on it?
@Comintern that's painful.
 
Well, then sure, we might as well.
 
1:47 AM
@RubberDuck huh?
 
VS is having trouble syncing my commit.
 
Legit. Aspnet MVC uses ANTLR for something. A brand new project downloads the nuget package.
 
@RubberDuck IIRC, you can delete it without any harm.
 
@Hosch250 tell Ed Thompson. He's going back to the VS team.
Actually, that may be inadvisable. Lol
 
Why?
It is the "remote end"
WT*, GitHub?
 
1:50 AM
@RubberDuck interesting.. never noticed... oh wait, I haven't touched ASP.NET since... 2011
2
 
Counting objects: 27, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (27/27), done.
Writing objects: 100% (27/27), 43.98 KiB | 0 bytes/s, done.
Total 27 (delta 24), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; curl 56 SSL read: error:00000000:lib(0):func(0):reason(0), errno 10054
Everything up-to-date
"Everything up-to-date" my eye.
 
[Hosch250/Rubberduck] Hosch250 pushed commit f69722a9 to RemoveParamsRewriter: Tweak grammar
 
@Duga well that seems to have worked
 
Yeah, tried for the fourth time.
 
@Hosch250 "harmonized arglist parser rules" would probably have been a better commit message though
 
1:51 AM
The last two were done from cmd.exe.
Whatever.
No, "arglist" is for parameters.
"argumentList" is for arguments.
 
good thing there's no ListArgs and ListArguments, or we'd be confused
 
A thought @RubberDuck if your teaching others software assuming also rubber duck vba could there be some issues generated from your clients as feedback for us to do better??
 
@PeterMTaylor I think he does C/C# now.
 
grammar Nazi hat on - YOU'RE
 
^
LOL
 
1:55 AM
Oh well was an opportunity window for a moment
 
If rtcGetSetting is short reading the stack because it implicitly assumes that it will always get a 32 bit pointer or a DWORD, I might have to drive up to Redmond and have a stern chat with somebody.
2
 
Ok I could have spelt it as "you are" then @ThunderFrame
 
@Comintern If you don't mind spending two hours on the phone, you can get someone in the US.
 
They won't be able to see how red my face gets on the phone though. Maybe Skype.
 
They might hire you.
 
2:00 AM
But then I'd probably have to sign an NDA or something.
 
OK, this is sweet.
Now I have Debug.Asserts firing on me left and right.
 
Ack! Need to close the 30 notepad windows from running Shell pass-through tests.
 
lol
 
I had to sign an NDA with MS once - oh wait, I'm not allowed to say that....
meh, 1m rows in Excel is a fairly well known feature now - I'm throwing caution to the wind
 
2:17 AM
@ThunderFrame Did you really work for MS, or are you joking?
 
didn't work there, but the Excel team visited our office to get feedback on proposed features, and gripes we had about Office. That required an NDA as some of the features were in development and didn't show up for several years, or didn't show up at all.
 
@Hosch250 yeah he made rtcGetSetting short-read the stack because it implicitly assumes that it will always get a 32 bit pointer or a DWORD... oh wait
 
LOL
 
Dear MS, Can I haz Null return values where empty array would be too obvious?
2
One of my colleagues ended up working for MS and writing the specs for the Open XML formats.
 
I need to find a good PE decompiler.
 
2:30 AM
[Hosch250/Rubberduck] Hosch250 pushed commit d3457856 to RemoveParamsRewriter: Coming along...
 
PE Explorer isn't cutting it?
 
Dishes time.
 
@ThunderFrame I was thinking more along the lines of Hex-Rays. I don't have IDA anymore though.
 
does the free version of IDA do the job?
 
Oh, the online version does the disassembly just fine. The decompiler plugin only works in pro IIR.
 
2:36 AM
@Mat'sMug needs to busk some harmonica sell some t-shirts and cover an IDAPro licence...
 
Gonna see what Snowman spits out.
 
3:16 AM
LOL
I need to remember this when anyone claims that DoEvents makes code run smoother:
.text:10007357                 public rtcDoEvents
.text:10007357 rtcDoEvents     proc near
.text:10007357
.text:10007357 var_200         = byte ptr -200h
.text:10007357
.text:10007357                 sub     esp, 200h
.text:1000735D                 push    esi
.text:1000735E                 push    edi
.text:1000735F                 fsave   [esp+208h+var_200]
.text:10007364                 mov     eax, dword_1023A0D0 ; case 0x1303
.text:10007369                 call    dword ptr [eax+98h]
.text:1000736F                 xor     edi, edi
Note that it pretty much does nothing but call Sleep.
 
IIRC - it does nothing but max out the CPU?
lol - he suggests using Sleep instead of DoEvents
 
Yeah, I think the CPU loading comes from trying to count owned windows it isn't going to find.
 
3:34 AM
vbe7.dll was compiled with debugging symbols.
Bunch of functions turning up that aren't in the exports table.
 
3:55 AM
rtcHackTheStack?
 
Whoever compiled it had a G: drive: G:\Office15Main\65_VC8\VBE6\legovbe\vbe7.pdb
 
4:43 AM
[Hosch250/Rubberduck] Hosch250 pushed commit dd59b656 to RemoveParamsRewriter: Removing parameters works--except for param arrays
 
It always leaves the last comma in for param arrays :/
Also, @Mat'sMug, your rewriter supporters for each declaration type are great, except for one thing.
They should also work when you pass a context of that type on.
I'm switching them all over to work off exclusively off the target context.
I'm thinking someone should start a comic called "Wizard of IDE".
 
5:05 AM
[Hosch250/Rubberduck] Hosch250 pushed commit edc0a0c2 to RemoveParamsRewriter: Get paramlist parameters removed correctly
 
Basically, I just manually removed every single token from the first one after the previous parameter to the end of the argument list.
It works, but I wish I knew why my old way failed
Tomorrow, I'll work on getting everything that I broke working again.
 
5:40 AM
[rubberduck-vba/Rubberduck] build for commit 1a8478c0 on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
5:54 AM
[rubberduck-vba/Rubberduck] build for commit 23a079d1 on unknown branch: AppVeyor build succeeded
 
6:08 AM
> Addresses earlier comments - thank you to everyone that provided input. Includes some attempts at further optimizations. Though the use case coverage is broadened by this PR, one unit test is flagged as "Ignore". The unit test represents a future enhancement once parse results can provide more information about the RHS content/type. Although all enabled unit tests pass, running these changes in Excel does not update the VBA code as expected when executing the AssignedByValParameterMakeLoca
 
6:24 AM
WTH MS? I can set the TabStop property of a Label in the Properties Window, but I can't Let or Get the property in VBA?
 
 
1 hour later…
7:45 AM
With which host @thunderframe, Isn't the label in context of the project loaded so VBA acknowledges otherwise could be active x or other reference within host?
 
 
1 hour later…
9:05 AM
Mat I've just checked actual code and I have LOTS of IsNull() tests. Briefly, many properties of a range of > 1 cell that has mixed boolean values returns null. Here are some examples:
`

vArray = Application.RegisteredFunctions
If Not IsNull(vArray) Then

If IsNull(ws.Cells.MergeCells) Then ' true if all merged, false if none, null if mixed

If Not IsNull(rcl.FormatConditions(lCFIndex).Font.ColorIndex) Then

If IsNull(ws.Rows.OutlineLevel) Then ' some rows are grouped/outlined

If Not IsNull(oStyle.Interior.ColorIndex) Then
 
9:21 AM
@Comintern I thought there is a difference - Sleep allows other Windows procs to run; Doevents allows Excel events to run. So Esc can interrupt with Doevents but not with Sleep. But I've just tried it and Esc does not interrupt. Ctrl+Break halts with Doevents, but raises a RTE "execution interrupted" with Sleep. See "Gary's Student" reply
 
@RubberDuck TROOF
OHAI 1.2
OBTW JAVA IZ AWFUL
KTXBYE
2
 
@PeterMTaylor oh. No. I'm teaching folks TDD, SOLID, iterative development.... Extreme Programming basically. I'm working mostly with JVM languages now.
 
9:49 AM
@RubberDuck so you coach others while programming hard? :)
Does other compiler languages also run on JVM?
 
Yeah. Actually. More or less.
Not sure I understand the question, but I'm mostly working with Scala, Groovy, and JAVA. Unfortunately, I actually write Java now.
 
10:22 AM
Why "unfortunately"? There are always opportunities to "extend" your own abilities into other quarters or programming languages, like warm chocolate fudge drooling over a brownie. :)
Night all. Catch ya sometime over the weekend. Grass to cut and birthday parties to do.
 
10:38 AM
@sysmod Thanks for those examples.
@PeterMTaylor Label is a control on a UserForm, which are available in all hots
 
hosts not hots! :)
 
Kaz
11:21 AM
@ThunderFrame The way I understand (and use) DoEvents is that it's there to give the CPU an opportunity to catch up with the code. Especially when doing something that takes a while (say, opening a file), and especially when you're doing something like that over and over again, you don't want the rest of your code to start executing until everything else has caught up.
And/or when you need the screen to definitely update. Which I tend not to need to do.
 
 
1 hour later…
12:29 PM
@Kaz I use DoEvents when I want form controls to refresh, like progress bars, or to allow Esc to interrupt. I use Sleep when I want Excel to give time to other apps to run. For example when pasting to Powerpoint, (especially 2013 and up) I need to wait for shapes to appear, or tables to be rendered. The longest is Sleep 5000 for some detailed slides.
 
 
1 hour later…
Kaz
1:41 PM
TIL that if you change the casing of a variable/procedure name in one Class, VBA changes all occurrences in all classes.
 
@Kaz today???
note: built-in or not
 
Kaz
@Mat'sMug It's never come to my attention before
 
case-insensitive language
 
Kaz
And it wouldn't have, either, if RD weren't picking up the case changes in commits.
 
oh, that's git, not RD ;-)
@Kaz I take it that you got RD source control up & running smoothly.. how did that happen?
 
Kaz
1:48 PM
@Mat'sMug I didn't realise it was supposed to be broken?
4
 
^ I suspect there was some instruction following going on there.
 
Kaz
I think it's causing an intermittent Parse Error.
Though not one that actually yields an error result. Or seems to affect functionality.
Other than that, I just refresh -> Comment -> Go as I normally would.
@Mat'sMug By intermittent non-functional parse error, I mean this:
 
That's an awful lot of underscores in identifiers there.
 
Kaz
@Comintern It's a habit I'm growing out of.
 
1:52 PM
no CE folders :(
 
Kaz
@Mat'sMug Not complex enough to warrant it yet.
Once the project explorer no longer fits in its' box, then I'll start organising it.
 
but once it's complex enough to warrant it, it's a much bigger job to annotate every module :)
 
Kaz
@Mat'sMug It'll only be 30 or so.
5 minutes work.
 
I guess
 
Kaz
Premature optimisation, as they say, is the root of all evil.
 
1:56 PM
Postmature optimization is the root of lots of month-long projects though.
2
...and a couple month-long run-times on CR.
 
Kaz
@Comintern Aye. As always, it's more art than science, determining the useful point at which it's worth (re)-architecting your code.
 
ha! tell me about it!
moving inspections into Rubberduck.Parsing.dll, two years into the project...
dammit, SSRS... I suppose fixing this would be a breaking change huh
 
2:26 PM
Per "why not use Dim As New" - there is a subtle difference in instantiating an object that way - it uses the predeclared instance. This allows auto-instantiation of the object, decreases performance of compiled code (due to checking for whether an object is instantiated everywhere it's used), and can easily lead to coding errors. It is better to avoid unless you require object auto-instantiation. — Comintern 18 secs ago
 
lol, and you beat me to this one:
@appl3r absolutely. Variant (and Object) member calls are resolved at run-time (late-bound), similar to what duck-typed languages like Javascript do, or how C#'s dynamic works (i.e. run-time error 438 "object does not support this property or method" gets raised if itm.IDontExist is called, but the code will compile perfectly fine). Wanting strongly-typed generics in VBA is pretty much asking for the moon, VBA knows nothing of generics. — Mat's Mug 2 mins ago
 
Kaz
@Mat'sMug You could've stopped at "VBA knows nothing" ^^
 
lol
 
Kaz
Or, perhaps more accurately, "VBA doesn't want to know"
 
3:33 PM
For Christ's sake... here, is that enough "value" for you? FWIW I've contributed 388 answers in the VBA tag, I believe I'm providing "value" more than just criticism. If you're going to give "here try this" code-dump answers, at least have the decency of making them working code. — Mat's Mug 9 secs ago
 
What an @sshole.
 
lol
Once again Mat, thank you for your effort and for fixing my answer. I'll admit that the code was not optimize but it did work on my machine when I tested it. It seems like your main moderator around here, I'm not trying to cramp your style. I'm deeply humbled and forgive my answer, I would deleted if I could. I was simply trying to get him help as fast as possible.(sorry about that) — Miguel 41 secs ago
it was faster to "fix" his answer than what it took him to copy+paste 6 times the same loop
 
@Mat'sMug I must be missing something...
 
look at the answer's revision history
I first commented about his sloppy code, and he responded that I should basically be "providing value instead of criticism"
I might have lost it a wee bit
 
FWIW, "quick and dirty" answers tend to come back later as more "why does this code that half an hour to run", or "how do I combine these 6 copied and pasted loops", or any number of other things. If you answer questions using bad coding practices just to "help as fast as possible", you aren't doing anyone a favor - you're promoting using bad coding practices. — Comintern 7 secs ago
 
3:46 PM
ouch
 
The truth sometimes hurts.
 
I bet he clicked your user profile before starting to reply =) #LessonLearned
ok this is infuriating
^ correct setting, repeats column header rows on each page
 
This is why reporting tools drive me up the wall.
 
do they realize "header columns" and "column headers" are mutually exclusive
 
OK, apparently I'm not being clear today.
That wasn't the question. The question was "are you sure the VB6 code is doing what you think it's doing". Do you have access to the VB6 code to include in the question? All I'm seeing is the VBA macro and the C# code you're using now. — Comintern 58 secs ago
 
4:00 PM
If a was passed ByRef, then it would be ref a in C# — Mat's Mug 9 secs ago
 
@Mat'sMug stackoverflow.com/posts/43003083/revisions now that makes more sense...
 
I'm curious why people think they need to port working code.
 
Kaz
@Mat'sMug Yes. you did.
 
There's no way the existing solution uses Application.Run and assigns by ref.
 
Kaz
Just from a personal perspective. The moment I see someone say "Do you know who I am?! [Lists stuff they've done], it immediately comes across as weak and petty.
 
4:04 PM
@Kaz Knee-jerk response should be 'IDGAF who you are...'
 
At this point we don't know if the OP is using Excel, let alone VBA... — Comintern 12 secs ago
^Fastest gun haz to be fast?
 
@Comintern Their lives are not interesting enough.
 
@Comintern Port it from what to what?
 
The workbook you "can't edit" needs to be cracked opened (not very hard to do actually) and modified to write to a useful log file. As does your own code. If @Comintern can't hook the immediate toolwindow, no one can (Rubberduck unit test fakes may possibly allow redirecting Debug.Print calls soon...). — Mat's Mug 5 mins ago
 
If it is from VBA, almost any target language would be an improvement. Except maybe PHP and LOLCODE and Whitespace.
I don't think Folders even counts.
 
4:14 PM
@Mat'sMug LOL - It's on my agenda for this weekend...
 
so... the answer would be "wrap your macro in a Rubberduck unit test, setup a fake for Debug.Print that writes the content to a logfile instead of piping it to the debug output"
needs a tag
 
Answer should be "Install RD, go to Rubberduck->Debug Options->Redirect to File..."
 
oooooh
There's a Rubberduck feature coming up, that hooks into the VBA runtime and hijacks whatever native function call the runtime encounters; when executed through RD unit tests, this allows the add-in to redirect specific configured calls (e.g. MsgBox) and make them output whatever your unit test needs - I'm thinking we could use this to hijack Debug.Print calls and redirect them to a log file.. but that's work-in-progress at this point. You can read up about it here. — Mat's Mug just now
now come on, star us
3
 
I'm behind on reading blog posts.
 
wut, I'm writing them too fast???
 
4:27 PM
No, I think I blocked one of the feeds, and they all went away.
So, I'm not seeing them anymore.
I didn't want to see the VBA questions on CR.
 
Mar 17 at 5:35, by Blogging Duck
posted on March 17, 2017 by Rubberduck VBA

Rubberduck has been offering IDE-integrated unit test since day one. But let’s face it: unit testing is hard. And unit testing VBA code that pops a MsgBox isn’t only hard, it’s outright impossible! Why? Because it defeats the purpose of an automated test: you don’t want to be okaying message boxes (or worse, clicking No when the test needed… Continue reading Go ahe

 
> But… I don’t do VBA!
You could have mentioned me as a case-in-point. :)
 
hehe
 
@Hosch250 You know you secretly want to get into VBA, admit it and you'll feel better.
3
 
hides
 
4:32 PM
@IvenBach Nope, it is my life goal to not learn it.
 
:ducks:
 
@Mat'sMug You thought I was going to pull a 6-shooter like the wild west?
 
nah.. I just find it pretty funny that you know more about VBA already than many actual VBA devs
 
@Hosch250 Wait a sec. You already know more about the grammar than the daily SO "My codez say 'Compile error'" questions.
 
LOL.
@Comintern Only from reading the ANTLR g4 file.
 
4:34 PM
@Hosch250 You're like 90% of the way... Just gotta make a small effort to get in that last 10%
 
TBH, I don't know what I would use VBA for.
 
It's not like MS hides the information about how to close a For loop...
 
It won't write my papers for me...
 
@Hosch250 ...which is pretty much "only from reading the language specs"
 
Yeah, lol, it is funny. I know VBA, but I don't.
 
4:38 PM
@Hosch250 Wait a couple years - it's a workplace thing. If you work for any reasonably sized company you'll run into some idiotic MS Office workflow and think to yourself, "This is totally idiotic. I could just automate this". Then you'll propose a .Net program, and they'll hiss something like "You'd have to be approved by IT, and they don't approve anything". So you write it in VBA.
 
let's just say you know enough to know that you don't want to use it - and I totally understand you :)
@Comintern or that. totally that. exactly that.
 
@Comintern If I use my degree, I'll be IT.
 
IKR? That's why I learned it.
 
me too
 
Maybe I'll write an antivirus that looks for docs that use VBA and bans them.
 
4:40 PM
@Hosch250 IT isn't immune to that. I worked for a company that tracked IT inventory on spreadsheets.
 
</joke>
 
when I joined my current company, there was this monthly sales report that took literally half a day to do manually. now it's scheduled on SSRS and gets into the CEO's inbox the first Sunday of every month without anyone touching anything.
oh wait, I'm in IT now
 
@Mat'sMug Remember that 'easy' is relative.
You had the skillset to set that up, most people don't. I include myself in that statement.
 
eh, I "just" had to set up SQL Server, a whole data warehouse and deploy SSRS :)
 
I still need to set up some SSRS stuff here, just haven't had the time. I hate running ad-hoc query requests every couple days.
Unfortunately the parameters of Run() are not declared ref. At first I was kinda hoping interop would do some voodoo magic to make that work. But this seems not to be the case — Chad Schouggins 5 mins ago
^Seriously? It's not even declared in the typelib that way.
It's not even implemented that way.
 
4:48 PM
If the Run parameters aren't ByRef, then the VB6 code can't possibly work the way you describe. There is no magic. At this point your question can't be answered without seeing the VB6 code. — Mat's Mug 5 mins ago
 
@Comintern Me too.
 
"Any sufficiently advanced technology is indistinguishable from magic". VB6 is not a sufficiently advanced technology. Therefore it should be distinguishable from magic.
3
 
I VTC'd as unclear
 
00:00 - 17:0017:00 - 00:00

« first day (1022 days earlier)      last day (548 days later) »