« first day (1755 days earlier)      last day (1425 days later) » 

12:01 AM
RELOAD!
[banane-io/pdb-frontend] 1 opened issue.
[bruglesco/FleetCommand] 1 commit. 108 additions. 3 deletions.
[rubberduck-vba/Rubberduck] 2 opened issues. 16 issue comments.
[skiwi2/pokemon-buylist] 4 commits. 235 additions. 79 deletions.
[Zomis/minesweeper-core] 2 commits. 13 additions. 2 deletions.
[Zomis/minesweeper-server] 3 commits. 32 additions. 10 deletions.
[Minesweeper] Games Played: 127, Bombs Used: 95, Moves Performed: 18733, New Users: 6
 
@this I had that open on my second browser for a bit. Creeped me out a little tabbing back and seeing it in chat.
 
 
2 hours later…
2:28 AM
> The headline of the web page reads "From unit testing to **source control**, from code inspections to refactorings, programming in VBA will never be the same."

However, #3758 triggered the removal of source control (git) from the project - the recommendation is to use the Export feature and then version control the resulting file(s) or structure. Maybe changing the phrase above to read something like:
"From unit testing to code export *(allowing source control with your preferred tools)*,
> Hey @GadgetSteve, thanks for reporting this - you're right: the website is terribly outdated, it desperately needs a refresher! I've transferred this issue over to the website's own repository, so it can be tracked and closed when a commit fixes it. Cheers!
 
 
4 hours later…
6:32 AM
 
6:48 AM
Is there a way to rescue a repo that after renaming doesn't open up with the .sln file?
Was required to edit the .sln file and fix my FUBAR misspelling of Excersize --> Exercise. My battle with #Words will never end.
It's fixed. Bed time.</iven>
 
 
3 hours later…
10:19 AM
 
aight. wrote a few lines on how the release process works
 
 
2 hours later…
1:11 PM
@IvenBach I would gladly show you my code :-D But then, you wouldn't sleep for weeks and would have to go to rehab... :-D
2
Hi :-) Last update about merging DLL into EXE files... So in Visual studio, if you upgrade from 2.0 .NET Target Framework to 4.0 .NET Framework, there is a new field in Reference library and that is `Embed Interop Files` and that (to my understanding) embeds only that you used in your project. So I've got instead of 2100KB exe file only 315KB exe file. :-) And it works without needing to merge the Excel dll...

So for those that didn't know :-)
 
1:48 PM
 
2:01 PM
@MathieuGuindon did you review Wayne's PR?
 
I had a look a little while back, ...TBH that stuff is a bit above my level but I love that there's xml-docs for pretty much everything in the API
 
AIUI, the VBA mocking issue is solved; we just need to get it to be in mergable state
However, this does not enable us to actually create the actual objects, so the IoC idea will need a different solution and that's what I'll be asking.
 
@this did you see the email I CC'd you on last night?
 
That is why I'm commenting about the PR. :)
 
2:13 PM
Assuming we do get an answer on how we can create an actual instance of a VBA object, IoC will need to be its own DLL, since it's going to be a runtime thing, rather than an addin thing
 
yay, another project :-)
 
yeah, we didn't have enough.
 
wanna get to the point where we have one project per star ;-)
 
yeah it has to be a COM API that the VBA code consumes, pretty much like unit testing, fakes, etc.
 
I think 700 projects is.... scary.
 
2:14 PM
*780
 
lol
 
posted on March 27, 2019 by CommitStrip

 
I mean just loading the solution alone....
@Feeds How strangely apropos.
@MathieuGuindon yeah; we also will have to work out a host-agnostic way of shipping the DLL with the file. Probably take a page out of Wayne's book and embed the DLL as a base64 string & load it runtime.
or who knows, maybe we can write the IoC in .... VBA.
Thinking about it, if it's just API calls, it's probably the easiest. As long we don't have to subclass.
 
Dim container As RubberduckIoC.Container
Set container = RubberduckIoC.Container.Create()
container.RegisterInterface("ISomething", "Something") ' strings?
container.RegisterFactoryMethod("Something", "Create")
'..
something like that
 
would be nice if it wouldn't be so stringy. (ditto for mocking)
But TBH I don't see a way around that.
 
2:25 PM
yeah
I believe the odds of getting a NameOf operator in VBA7.x are pretty slim.
 
We do have type libs. That is easy to do.
(not natively, though)
The other consideration is whether we want to get into AOP
 
nah
although, if IoC can work, then we support do the DI flavor of AOP with ...DI interception
 
hmm.
I think that would be better, yes.
I never liked how AOP basically just adds another layer of abstraction over the entire codebase
 
aye, it's very... meta
 
and if you don't have the AOP framework, you're stuck with fugly boilerplate code.
Not pretty.
That's why TypeScript is so unappetizing to me, in fact.
 
2:31 PM
wouldn't we need to slip between the VBA source code and its compiled p-code in order to do AOP though?
sounds... scary AF
 
Ah, no not necessarily.
I was thinking in the sense of create custom keywords --- write VBA+ code which then is transpiled into much more verbose VBA that calls functions, etc.
That way, the shipped product is still a vanilla VBA and will run without any special DLL, etc.
 
ah, kind of like pre-preprocessor macros then
 
but the shipped code would be a hell to work with; you better have that VBA+ code handy.
Yeah.
That's what some of earlier AOP framework used to do before DI became a thing, AIUI.
 
3:03 PM
Btw: I'd like next release to be done by one of the contributors that didn't do that (or something like that) yet
 
@Vogel612 Do what? Release?
 
yeap
 
@Vogel612 that's a great idea!
 
I could do that, I guess. I've not released since we did InnoSetup still...
 
This should help refine the Releasing wiki article
 
3:10 PM
or, I'm-ready-for-this-Iven
 
there's also the need for the translation wiki, too.
 
Yea, that one might be a little more involved, honestly. I might be able to get to it this weekend
 
@MathieuGuindon Good idea.
He can learn about DLL versioning :)
 
4:12 PM
New meaning on "You will pay"
AOP = ??
@MathieuGuindon Can I retract my earlier statement about being RD competent?
I sometimes don't understand how #Words work.
 
@IvenBach aspect oriented programming
probably.
 
^
here's an example for C#: PostSharp
A good example is creating a logger. Right now we new up the logger instance in a bajillion places all over the RD codebase. AOP would mean we just decorate the class and at the build time, the framework automatically insert the code to create the logger for us. Therefore, we have less code at the source code level, but the output is now quite different from what we have at the source code.
Therefore, woes to anyone who try to dissemble the source code as it'll be very fugly after all the AOP insertions
That's why I'm not so enthusiastic about the idea of creating a AOP framework for VBA. It would mean we get to write less boilerplate code, yes, but it ultimately just automate the writing and hide it away. If the poor sap tries to read the postVBA....
 
@IvenBach lol nope :)
 
4:34 PM
@this not even necessarily at build time
some AOP frameworks don't or can't hook into the compiler. They can emit IL to proxy stuff around
 
True, but the end result is same; the output generated is different from what you see at the source code level.
 
right :)
 
Interwebs be broke at work. C# practice time!
 
since the AOP framework usually are expressed as something... attributes? comments? transpiled language. I don't know if others would agree but I usually see TypeScript as essentially JS's AOP framework
As long you have the framework, it might be more convenient but once shipped, well, have fun figuring out what your shipped code is really doing!
 
@this that is so fitting
 
4:41 PM
Well, in a sense TypeScript compiling to JS is not that different from C compiling to machine code.
 
@M.Doerner except that you don't get machine code level errors from valid C
and that JS is a steaming hot pile of a mess
and that it's not theoretically (and practically) different for every CPU type it runs on
I may have some issues with JS...
 
Do tell us how you really feel, @Vogel612
 
I bet with some older compilers you could write valid C that compiled to invalid machine code.
 
Isn't that more of a reflection on the compiler's quality rather the C language?
 
@this nah. not right now. I'm off to go dancing :)
 
4:44 PM
That the target language of the compiler/transpiler is JS is an entirely different problem.
 
The problem with TypeScript is that you end up basically pretending you're not writing JavaScript but you are still playing with the same constraints you would face when writing vanilla JavaScript. TypeScript just does more for you and hides that in the output.
 
My point is that TypeScript compiling to invalid js is not a problem of the language but one of the compiler.
 
yes, but producing a JS level error is not invalid JS
it's just that the semantics of the language tell you that the transpiler fucked something up
 
If it is an error as in a bug, then your input was wrong.
 
not necessarily
also that's not the point
the point is that C provides a basically waterproof abstraction over machine code.
TypeScript does not provide the same over JS
which implies that it's more of a framework than a language
something like RoR to Ruby
Instead of Ruby to C
 
4:48 PM
I've never done Ruby nor Ruby on Rails - exactly what does the "on Rails" contribute to Ruby?
 
it's basically a web framework
 
so, basically "C# on ASP.NET"
 
except it's also partly EF
 
ok
 
and it has a proper templating engine built in
not that you can't substitute your own over it
 
 
2 hours later…
6:26 PM
I'm having a very very difficult time making UsedRange not include a blank row at the end of my data. I've tried deleting every blank row, clearing every blank row, and even stripping the formatting from the entire sheet including my data to make it stop being included. I'm trying to save this sheet as .csv, and if I have a blank row at the end of the UsedRange there will be a ,,,,,,,,,,,, row in the csv file. Any ideas?
Even spotted a FreeMan answer while doing my homework :)
 
don't use UsedRange?
is your data inside a ListObject?
(aka "table")
if so, you can just grab the table.DataBodyRange, and never need to worry about having too many or too few rows, or working out what the last row is.
 
@MathieuGuindon I never use UsedRange myself, it's just my understanding that that is how Excel saves .csvs. That's why I'm fighting with it now.
@MathieuGuindon I'm not using a ListObject/table, though if that solves my .csv saving problem I'm happy to use it.
0
Q: UsedRange - can't eliminate trailing blank row

puzzlepiece87Both VBA and non-VBA answers accepted. Problem I'm trying to save a sheet as .csv, but because the UsedRange includes a trailing blank row, I get an unwanted row of commas in the .csv. What I've Tried Deleting all rows under my data Using the eraser tool to Clear All from all rows under my d...

^ if you want internet points / to help future others
Oh wait, may have found it
 
6:44 PM
.UsedRange 'I'm told this recomputes the UsedRange
#TIL
 
@MathieuGuindon Might not even be correct, don't take as gospel
Just what I found while doing homework.
 
have you tried clicking on the first empty row, ctrl+shift+down, then delete all the rows?
 
@MathieuGuindon But that's not VBA...
 
in VBA that would be lastRowRange.End(xlDown).EntireRow.Delete
 
@MathieuGuindon Yes though technically I did click first empty row, scroll down, hold Shift, click last row, right click delete.
Because I'm inefficient
 
6:47 PM
wait you scrolled manually all the way down to row 1,048,576??
 
I have before. Also, scrolled sideways to the end that way too :)
 
ctrl+arrow ftw
 
@MathieuGuindon Wait no I didn't - I just did it again and did your way without even thinking about it, so I must have done it your way
@MathieuGuindon Agreed on this
I've never played a video game and not been able to explain a button combo I'm using to someone, but just now for the first time did something in Excel without even being aware I was doing it :P
Gah this is so dumb
I don't got it, just tried the confusing directions here for how to reset last cell
 
Are you performing the CSV SaveAs using VBA? If Yes, it would be useful to post that. — Tim Williams 55 secs ago
 
The parts in the Tip boxes are incorrect.
 
6:50 PM
that was my first thought tbh
 
@MathieuGuindon Yes I am, replying now.
 
that should be edited into the question IMO :)
 
@MathieuGuindon Editing it in and I seemingly got it.
 
cool, upvoted!
try removing the .UsedRange calls (I doubt that getter is side-effecting), and further editing to include the expected msgbox output and the actual msgbox output
...then again, a side-effecting property getter wouldn't be completely out of character for a VBA type library
3
 
@MathieuGuindon Will do. And for some reason the usedrange did go to the expected output, not sure what I did, trying to recreate now but failing.
 
7:12 PM
@MathieuGuindon UselessRange?
 
^ that
 
@TimWilliams Edited actual/expected results into question, cleaned up code block to make it easier to follow. — puzzlepiece87 3 mins ago
@this I'll see if it's possible to specify the range when saving csvs
 
I wonder if a named range or a listobject would make this less messy
 
I doubt it is. But the suggestion to copy the correct range into a new sheet, and then saving that sheet, should work IMO
@this absolutely
 
@MathieuGuindon I'm not above trying that but it's frustrating because that happens right before this
It's literally filter, copy specialcells(xlcelltypevisible) to a new sheet, then trying to save the new sheet
 
7:27 PM
OMG I just received book-writing advice from the Ron de Bruin. #MVPBuzz
 
@MathieuGuindon Nice! What did he suggest?
 
Talking about which, I need to finish my next blogpost...
 
using 5pt Arial Narrow if I wanted to fit everything I want to talk about in 20-30 pages editing it online to make it as large as I need to without fearing for my storage space :)
 
hi guys.. can't stop but thought I'd share something I just found. You can instantiate UserForms via their string name:
With VBA.Global.UserForms.Add("UserForm1") ' instantiates and returns UserForm1 object
.Test ' do something with it
End With
Shame it doesn't work for ordinary classes.
gtg catch you guys later
 
Wow, that's fascinating. Thanks!
 
7:30 PM
hey Wayne, now that is a nice use for what I would otherwise call an obsolete API!
 
^
 
hmm, we need an inspection that flags UserForms.Whatever as obsolete, to encourage actual OOP rather than global state management
 
@Comintern might be interested in the code, too - may help us get some more insight in how VB* runtime handles creation. (or not)
 
@this that makes userforms mockable, no?
 
@MathieuGuindon In terms of storage space, how large can a book get?
 
7:33 PM
@MathieuGuindon I don't think that solves the problem. The problem is the need to successfully convert a ITypeInfo into a System.Type object in order to make it usable for Moq
 
@puzzlepiece87 no idea :/
@this facepalm that's right
 
even if it's a e-book, there would likely be a cap on the "page" count - nobody wants to read a 20,000 pages odyssey.
However, that does mean one thing - you could build a IoC container using pure VBA using userforms as the springboard.
you can open an userform invisibly, right?
 
@MathieuGuindon I was surprised text could have size issues, but please keep an offline copy too.
I don't want you to lose any of your hard work due to hacking/service outage/failure to save/whatever
 
lol it was more of a joke though
 
Oh :D
 
7:37 PM
Whew. Wire removal downstairs included the precious internet cable.
 
You do have to admit that 20,000 "pages" e-book is much lighter than a 20,000 hardcover book.
(that would be a hell of a binding job, if it's a single giant volume)
 
not intending to write a 30-tome series though
 
Mathieu Guindon's Everything you want to know about VBA but didn't and more
 
> Beginner's Guide to Rubberduck (working title)
> (backcover) Curious about VBA but never even dared recording a macro? This series is for you!
Chapter 1: Hello Developer Tab!
 
> "Of course, of course you didn't. No one ever meeeeeans for these things to happen."
 
7:46 PM
lol
 
@MathieuGuindon I'm writing my book on beginning programming with C# using blog posts, sort of.
 
> Everything you wanted to know about VBA and Everything You Didn't As Well
 
^ I think that's the title I was trying to remember (and failed)
 
One blog post up. 3 more or less written and being edited.
 
I really need to start churning through my 13 14 drafts..
 
8:02 PM
@MathieuGuindon Figured it out, it was the formatting of the actual data range. When I clear the formatting from the data range, Ctrl-Shift-End still covers the range including the blank row, but VBA shows me that the blank row is no longer included in the UsedRange.
 
"clear formatting" shouldn't be reliably used to fix the used range though
deleting unused rows should do
 
@MathieuGuindon Tried both, and that's not true according to Microsoft docs.
 
weird
it does work nicely to slash file size when used range goes out of control
 
@MathieuGuindon I take it back, the doc itself didn't say that, just someone who linked to the doc.
The actual doc only says you may clear the formats but doesn't say deleting rows won't accomplish the same thing. I think the commenter who said that is wrong.
Actual doc comment: "reset that last cell by clearing all of the formatting that may be applied in empty rows or columns between the data and the last cell"
For the record, I am guessing there's something about Thick Box Border that probably affects formatting of adjacent rows silently.
 
hmm that's a possibility
deleting a row is essentially nuking it from orbit, it and its formatting
Clear contents => pellet gun
Delete row => bazooka
 
8:18 PM
@MathieuGuindon Exactly how I would have phrased it. Someone in the comments suggested that I check the cells for spaces. In my head, I was like "I already nuked them from orbit, don't think that's the problem." (In real life I triple-checked and thanked them for the suggestion)
 
@MathieuGuindon Man, what's deleting the spreadsheet like?
Since it escalated that quickly already...
 
@Hosch250 that would be a SCUD
 
LOL
 
wow that's a word (acronym) I haven't heard in a while.
 
@this It's older than VBA!
 
8:42 PM
SCUD?
I suppose it would be, but it used to be on news a lot in early 90s.
 
8:55 PM
@this Yeah, it's from the cold war.
 
I honestly don't know if an average Joe Sixpack would have known what a SCUD was prior 90s but during the Gulf war, it was hard to not hear news mentioning it - you'd think it was the bogeyman or something the way they carried on about it.
 
its kinda funny, SCUD isnt an acronym, its a codename that nato came up with
well... at least i think its funny
 
it's also some kind of shrimp
...which is even funnier :)
 
9:12 PM
should have been a kind of a prawn.
 
9:30 PM
Moar stars likely inbound...
@rubberduckvba @sadukie For this particular question... not really. However, it's a super cool thing... so definately want to make a note and help others become aware. Do you have a link to it so I can add it to my notes for what I'm collecting to launch http://gotBASIC.com?
 
@KySoto Possibly after scud clouds.
They are low clouds that get blown before approaching storms.
 
10:22 PM
Neat little video on there.
 
@KySoto I have major NASA nostalgia now.
 
10:45 PM
I'm writing a thing...
 
10:55 PM
uh..... this is so wrong on many levels
 
11:35 PM
posted on March 27, 2019 by Rubberduck VBA

VBA is often said to be an event-driven language: a lot of worksheet automation involves executing code in response to such or such workbook or worksheet event. ActiveX controls such as MSForms.CommandButton are trivially double-clicked, and code is written in some CommandButton1_Click procedure. But how does it all work, and can we leverage this event-driven… Continue reading Everything

 
Tutorial: Everything You Ever Wanted To Know About Events https://rubberduckvba.wordpress.com/2019/03/27/everything-you-ever-wanted-to-know-about-events/
 
11:53 PM
Nice article, Mat!
FWIW: In Access, objects expose several OnXXX members but unlike what you suggest in the article, those aren't methods that raises events but rather define how to handle the event. Left blank, no event is raised. Set to [Event Procedure] string, it will raise the event to all subscribers. Set to "=<someFunction>(), it will execute whatever the named function. That is quite different thing, and AFAIK, an Access-only thing. IDK if worthwhile to note that explicitly.
I would probably add a caveat about passing ByRef parameters, particularly to multiple subscribers; you can't assume that the order of subscriber is deterministic.
 

« first day (1755 days earlier)      last day (1425 days later) »