VBA Rubberducking

This chat has moved to Discord: https://discord.gg/MYX9RECenJ
890d ago – Mathieu Guindon
284

export all events for this room

Starred posts

Nov 5, 2014 20:11
"I Built"
Nov 5, 2014 15:53
What is this sorcery? ;) lol hi @Blackhawk!
Nov 5, 2014 14:57
Well, you can check the Lenb()
Nov 5, 2014 13:39
Glad I asked first. bwahaha
Nov 5, 2014 04:02
tltstdtts
Nov 4, 2014 23:43
3
Q: Immutable Linked List in VBA

ptwalesI made an immutable list class using the head-tail idiom. If I did this correctly, it implements persistent data structures. Unfortunately it doesn't scale well as VBA is not tail recursive. Note: I use a method called seq.Assign to handle assigning objects without using Set. I would like to ...

Nov 4, 2014 19:48
Well... then again, around the office, if a user is surprised, we typically call it a bug.
Nov 4, 2014 16:27
You can look at the TestExplorerWindow's code-behind, it's registering (and raising) plenty of events :) ...so much I find it smells.
Nov 4, 2014 03:15
    internal static class CodePaneExtensions
    {
        public static Selection GetSelection(this CodePane code)
        {
            int startLine;
            int endLine;
            int startColumn;
            int endColumn;

            code.GetSelection(out startLine, out startColumn, out endLine, out endColumn);
            return new Selection(startLine, startColumn, endLine, endColumn);
        }
    }
Nov 4, 2014 02:20
IDK, that code is wrong in too many ways to count
Nov 4, 2014 02:18
> And now you see why prefixing str to variable names (aka Hungarian notation) is bad.
Nov 3, 2014 20:33
if you have VB6, you can make a non-.net COM add-in ;)
Nov 3, 2014 17:46
Nov 2, 2014 21:23
3
A: Call a method without calling it

CominternVB6 and VBA Not sure if this qualifies or not, because it is calling a method of a class: This goes in a class module: Public Sub TheFunction() MsgBox ("WTF?") End Sub Public Sub SomeOtherFunction() MsgBox ("Expecting this.") End Sub And this is the "calling" code: Private Decl...

Oct 31, 2014 15:55
Oct 31, 2014 13:26
Nope. is out of scope. =) We're a bunch of masocists.
Oct 30, 2014 20:45
don't let the room freeze while I'm on vacation
Oct 30, 2014 20:39
@RubberDuck My hunch is the overhead is in interacting with the sheet, it's almost always faster to read a range into an array, manipulate it, then write it back to a sheet and I suspect for the same reasons
Oct 30, 2014 17:05
ironically I'm sort of back in there now with this Business Analyst job.. but I report to the CEO and if I say I need SQL Server 2014 Standard, .. I'm getting it ;)
Oct 30, 2014 14:41
One of those "if it works don't break it while fixing it" things... but I hate leaving that sort of stuff in code since, well, just because it works for a while doesn't mean it will work forever
Oct 30, 2014 13:06
@RubberDuck No worries, it's not pressing since what I have works, just feels really, really dirty
Oct 29, 2014 20:17
Loong time ago..
Oct 28, 2014 19:53
You (and Eric) are right that it probably isn't necessary and to only do it if you have problems. Sometimes I forget that I've seen some of the office products pushed way beyond their limits
Oct 28, 2014 19:51
@RubberDuck maybe I should switch some of that stuff to ADODB huh, I forgot I had some of that lingering in my project... I've been exlusively using ADODB for quite some time but have some legacy methods using DAO (woops)
Oct 28, 2014 19:29
ooooh and it's Lippert, so you know it's legit :D
Oct 28, 2014 17:19
ooooh, good idea - moar coffee....
Oct 28, 2014 12:21
lol
Oct 27, 2014 13:34
@vba4all Making that change makes the Class_Initialize event of FactoryTest fire. Which in turn makes Factory's Class_Initialize fire, but it cFactory_AfterInitialize still doesn't.
Oct 27, 2014 02:26
> You cannot publish local branch master to the remote repository origin because a branch with the same name already exists there. You might want to rename your local branch and try again.
Oct 27, 2014 02:05
Oct 25, 2014 14:58
you could probably do something like this - support.microsoft.com/kb/72918?wa=wsignin1.0
Oct 25, 2014 14:51
@Fitzroy oh, I check for all "likely errors" - I'm only using the error handler for non-testable (generally related to external libraries doing things which are more difficult/impossible to validate first)
Oct 25, 2014 14:50
I don't like code that relies on the error handler to get you out of trouble. You should think about all possible scenarios and cater for them. When something calls the error handler - see if you can use pre-emptive checking to avoid that ever happening again.
Oct 25, 2014 14:45
@RubberDuck Which is my reason for contining to use both. I like the distinction.
Oct 25, 2014 14:18
But... reading records from a fixed-length fields text file into a bunch of DTO's is boring! ;)
Oct 24, 2014 23:03
Very cool @Blackhawk. Very cool. No idea what I would do with a matrix class, but very cool.
Oct 24, 2014 15:45
@Ticker - "run-time error 91"... how is that not a 1000th duplicate?
Oct 24, 2014 15:35
Small phone-post answer posted ;)
Oct 24, 2014 13:46
hey I even tried to make a property Private - because that would hide it from intelli-sense and also make it default at the same time but that failed...
Oct 24, 2014 01:16
Damn it I keep reading that as dog game...
Oct 23, 2014 21:30
case blocks are basically goto's
Oct 23, 2014 19:08
lol
Oct 23, 2014 18:58
Oct 23, 2014 15:54
there is just so much of it it overwhelms me ... i start reading a book on WPF get to chapter 5 or 6 and then suddenly I have to go so something else not in C# and WPF and by the time I am done doing something else I already forgot all the good stuff I read ... Labors of Sisyphus
Oct 22, 2014 20:40
Took me a while to embrace it, but I'll not go back.
Oct 22, 2014 19:37
@Blackhawk Annnnndddddddd bookmarked.
Oct 22, 2014 19:32
bah, ?lenb("a") outputs 2, so whatever
Oct 22, 2014 19:27
@Mat'sMug No... I wasn't able to figure out a good search query. I'd prefer not to see all the garbage questions.