« first day (1119 days earlier)      last day (2061 days later) » 
00:00 - 15:0015:00 - 00:00

3:00 PM
Also, keep in mind that future salary is tied to current salary in some ways.
So always go as high as you can
 
expect ~$50K, raise to ~$55K, settle for ~$53K. counter stupidly and you'll find the hard way that a lot of companies don't give you a chance like that. don't burn it.
 
I've heard that most companies have about 5-7% negotiating room, so if you're worried/wondering what's a safe amount to counter, use 5%
(Which fits what @Mat'sMug was just saying.)
And by "always go as high as you can", I mean always counter even if they give you what you want right away. Sorry, I didn't mean to say to open with a stupid number.
 
nah, I just have this impression that he thinks he can get $80K right off the bat. I mean, it's genuinely awesome if that's the case, but I had 10 years of working experience behind me to get to that.
and if they offer $60K and you counter to $80K, if I'm that employer I'd just withdraw the offer and wish you luck (i.e. you're clearly in it for the money, and that's not the type of employee I'm looking for).
 
To add just a little bit of dissent to the chorus, keep in mind that salary negotiation works differently between for-profits and not-for-profits. I work at a not-for-profit and every salary is based off of a set of pre-approved salaries (of a sort) since salaries are part of what is reported for keeping not-for-profit status.
Not that it seems like youre going for a not-for-profit, but I only put it out there in case you ever do.
 
3:21 PM
lol
@πάνταῥεῖ there's only like 4 people that use Bing and chances are, they are not answering questions. — I haz kode yesterday
 
but this is definitely the best:
 
> I need X to make a move.
> We'll give you 33% more than X.
> Wat? Yeah. Ok. Where do I sign?
Sign of a good company.
 
#WhyLifeNeverHappensThatWay
2
but yeah
 
@BrandonBarney that's one of my favorite vba reviews. "don't use vba"
 
3:35 PM
@RubberDuck Mine usually goes the opposite. "I need X to afford to live here.", "We can afford X * 0.75.", "Ugh, fine."
 
@Mat'sMug to be honest, I got royally screwed on PTO though, so....
 
@RubberDuck Probably about half as bad as mine.
 
@RubberDuck you need to find a company that has a "It's Friday work on your OSS project" policy
3
like @Hosch250's, "we can't keep you busy, so work on Rubberduck, Roslyn, or play Solitaire"
(paraphrasing lol)
 
@Mat'sMug I'd bet that his company is one of, probably two, that have that policy. Lol
 
IKR :)
 
3:41 PM
Mine has the "I know it's Friday and we just changed the deadline on Thursday to today, but I really need this done." policy.
 
ah, see I need to come up with some order form worksheet for... last week
 
I don't dare miss a deadline like that.
 
project specs were given yesterday
 
That's how ours works. I blame sales.
 
^^ exactly
 
3:44 PM
(Because it's actually their fault most of the time.)
 
@EBrown definitely don't have that policy. It's consulting work. The client gets their 40 then my company gets another 10.
 
@RubberDuck Mine's entirely salaried, and I'm averaging 45/week right now.
 
@EBrown haha my company has a "look busy when you're in the office" policy... but my job position is rather unique
my job is to travel and install/service machines at the customer's site, but our department serves our largest customer, so we're only out about 1/3 of the time. The other 2/3rds is spent in the factory/office looking busy lol
 
@shadowofsilicon that works out pretty nicely.. until they notice a truckload of up/down traffic to/from github.com/rubberduck-vba/rubberduck...
:)
 
@shadowofsilicon Glass company?
 
4:00 PM
haha... well... it would work out for them, because if I learn C#, then I think I can program a functionality into our machines that will provide a dump of debugging information... right now, if a machine acts weird, the only means of troubleshooting is having the customer load the machine program on their computer... which is someplace they shouldn't be, since they really like to screw things up
@EBrown We are a world leader in industrial secondary packaging machines. We put all kinds of everyday items into cases for shipping.
 
Ah, I worked for one of those.
Well, two, actually.
 
@EBrown hmm... what state?
 
@shadowofsilicon Ohio, Systems Packaging and SecurePack, IIRC.
 
Hmm... I think I've heard of SecurePack, but I think they do more primary packaging, don't they?
 
@shadowofsilicon No, but they're owned by a large company (Glassline Corporation), they have like six different companies. I worked for all of them.
Systems Packaing does primary packaging, SecurePak did something else.
 
4:07 PM
Googles "glassline corp"
Ah, our machines are down the line from those... we would take the bottles of whatever and put them on a cardboard tray and shrinkwrap them, etc.
every buy a 36pack of Nestle bottled water? Our machines did that shrinkwrap
 
Look like fun.
 
4:28 PM
Yeah. I travel across the United States and Canada... Been to Mexico once.
If the machine we have in R&D is a success, I'll be traveling to Europe quite frequently in the next few years :)
 
 
1 hour later…
5:38 PM
@shadowofsilicon oooo-ooo-ooohhh... :D
@Mat'sMug 3M used to have that policy in their R&D department - Do what you're told Mon-Thurs, do what you're interested in on Fri. That's how we got Post-it™ Notes and lots of other fantastic things!
"used to" as in I don't know if they still do...
 
nice
I could use a RD department ;-)
 
6:06 PM
Isn't that us you?
 
us
 
@shadowofsilicon Lucky.
 
I just learned the hard way that Dictionaries point to copies of themselves, and that if you have a dictionary of dictionaries...and you want to create a copy of the top level dictionary...well have fun.
3
 
0
Q: Search a Workbook, Then paste results on Search Page.

Caleb SuttonI posted this earlier this week, but I am finally done with it, and I am submitting it tomorrow. I wanted to get a final opinion/review from anyone on anything that could be refined. This code searches a 8 page workbook. The first page of the workbook is the search page. It is where all of the ...

 
6:31 PM
> VBA is just as object-oriented a language as any other "real" language you could use with Visual Studio. The above solution is fairly similar to how I would have implemented it in C#, or VB.NET. If your VBA class has a member for every single possible invoice line, your thinking is wrong - not the language you're using.

Stop hating VBA for the wrong reasons. The editor sucks, get over it.
0
A: VBA 7.1 Setting multiple class properties by looping through a collection

Mat's MugSeems you want an Invoice collection class that holds InvoiceLineItem objects and exposes a TotalAmount property. You can't edit module/member attributes directly in the VBE, but if you want to be able to iterate the line items of an invoice with a nice For Each loop, you'll have to find a way. ...

 
Kaz
in The 2nd Monitor, 18 secs ago, by Kaz
GUYS! I can open Excel in 1 second flat. This changes everything!
I wonder how fast it loads Rubberduck
Ooh. I should probably download it first.
 
@Kaz RD takes a little while to load (hence the splash screen), but only when you bring up the VBE. It doesn't impact Excel's startup time.
 
Kaz
About 4 seconds, if you're curious.
 
=)
 
@Mat'sMug If the splash is disabled will that speed up load times?
It's just a visual aide letting you know RD is loading, doesn't impact loading at all does it?
 
6:39 PM
How do I make a second dictionary that doesnt have a pointer to the first? I tried creating keys() and items() and then looping through, but for some reason it is still holding the pointer to the old dictionary.
 
Kaz
About 2 seconds to open the IDE, and another 2 for the parser to go to ready.
 
@IvenBach no, but you'll wonder wtf is taking so long for the VBE to show up :)
 
Kaz
@Mat'sMug I would like to suggest that the actual golden rule here is "Know as much as possible about compensation at the place you're applying to."
 
Nevermind, the copy works. Something else is happening then.
 
Kaz
Admittedly, difficult information to get a hold of, especially the detailed kind, but so, so, lucrative.
 
6:45 PM
@Mat'sMug Figured that's why the splash was there.
I did turn it off once. Got irritated it wasn't instantly responsive and turned it back on.
#1stWorldProblems I guess
 
TBH I find the startup delay annoying too, but when I think of all hundreds of thousands of instructions executing during that time I feel better about it.
gotta say that Ninject isn't the fastest IoC container out there, too
 
7:41 PM
ok... my eyes are working correctly. I don't have a Rubberduck menu when I right-click in the edit window
 
7:55 PM
Design/style question: I pulled these lines from @Mat'sMug answer (linked above), but it could be any Getter/Setter/Function, so I'm not picking on this one in particular. We have:
Public Property Get TotalAmount() As Double
    Dim result As Double
    Dim lineItem As InvoiceLineItem
    For Each lineItem In this.LineItems
        result = result + lineItem.Amount
    Next
    TotalAmount = result
End Property
Why do we Dim result, work with result, then only at the end do we set the return value TotalAmount = result? This seems somewhat cargo-cultishly slaved to language constructs that return values from a function with the Return keyword.
Is it, somehow bad practice and/or detrimental to do this instead:
Public Property Get TotalAmount() As Double
    Dim lineItem As InvoiceLineItem
    For Each lineItem In this.LineItems
        TotalAmount = TotalAmount + lineItem.Amount
    Next
End Property
 
I cringe at code that treats a function's return value as a local variable. It works, but not for me.
 
NB: I do it the way listed in the fist example all the time, but I'm wondering if I'm just wandering around waiting for the planes to arrive, too.
 
Especially here in a parameterless getter: is that a recursive call?
@FreeMan readability hurts
 
aiy! hadn't thought about the recurcivosity of it. Beyond that, it's simply not done™ because it's not done?
 
in my mind, there are two places a function's name can appear in the body of that function:
1. RHS of an assignment, i.e. a recursive call
2. LHS of the return assignment
 
8:02 PM
@Mat'sMug I just ran into this today
 
I'm not against declaring the extra local variable, I had just been thinking about it and wondered if there was a real reason, or because that's just the way we've always done it.
preventing accidental recursion does sound like a really good reason.
 
note that there's no "3. being read as part of an expression" - it's write-only.
 
I had to have () for it to become recursive. So in the above case, it would need to be TotalAmount().
 
faints
 
Function GetReportDate() As Date

    Dim strReportDate As String
    strReportDate = InputBox("What is the date of the new file? Please input date in mm/dd/yy format", "File date")
    If strReportDate = vbNullString Then Cancel
    If Not IsDate(strReportDate) Then
        MsgBox ("Please enter the date in mm/dd/yy format.")
        strReportDate = GetReportDate()
    End If

    GetReportDate = strReportDate

End Function
 
8:03 PM
fans @Mat'sMug and gets him a glass of water
 
@puzzlepiece87 hit the recursive path enough times and blow the call stack
 
@puzzlepiece87 oooooh... that looks like fun! :)
 
that's definitely better off as an iterative solution
 
In the above, if I had strReportDate = GetReportDate without parentheses, then it treated GetReportDate as 0:00:00.
 
recursion is powerful.. for the right things.
 
8:06 PM
@Mat'sMug It previously had a Goto in it. What does an iterative solution mean/look like?
I was trying to avoid Goto use.
 
any While loop would do
 
@Mat'sMug beat me to it
 
Fixing, thank you.
 
While strReportDate <> vbNullString and Not IsDate(strReportDate) then
  strReportDate = InputBox(...)
 
actually, the most cringeworthy part is InputBox ;-)
 
8:08 PM
:P
 
make a real form with real data validation, and you don't even need that loop
e.g. user can only click OK when they've entered a valid date
 
Function GetReportDate() As Date

    Dim strReportDate As String
    strReportDate = InputBox("What is the date of the new file? Please input date in mm/dd/yy format", "File date")
    If strReportDate = vbNullString Then Cancel
    Do While Not IsDate(strReportDate)
        MsgBox ("Please enter the date in mm/dd/yy format.")
        strReportDate = InputBox("What is the date of the new file? Please input date in mm/dd/yy format", "File date")
    Loop

    GetReportDate = strReportDate

End Function
Good point, I may do that.
@FreeMan Inescapable!
 
Why the hell would you have a 8K+ character inline SQL query in your VBA code??!! Ever heard of stored procedures? They do wonders! — Mat's Mug 15 secs ago
 
(Since hitting Cancel = vbnullstring)
@Mat'sMug Ha, save that comment for later. I'm still refactoring, but when I post the GUI SQL Injection thing on Code Review you're going to need it again, with light edits. :P
 
That said 8K characters makes sense, that's nvarchar(max). Probably driven by the server, not ADODB. — Mat's Mug 31 secs ago
@puzzlepiece87 oh my
 
8:13 PM
It doesn't have any queries built into the code, but the default query is very long.
 
that's nuts
 
You wouldn't like it because it's like 9 steps. You'd say to break it into a bunch of small stored procedures/subsets.
Which would be helpful if I had more permissions, but...
Oh, I take it back, you won't have to be subjected to the query because it's all on the worksheet and I'd only post the VBA.
 
8:26 PM
@puzzlepiece87 I wrote you a While loop. Didn't say it was a good one! :) Sorry, kinda sleepy and didn't think it through.
 
Mine was broken too :P
I forgot the exact same line you did - I spotted it and fixed it.
Function WhichWorkbook() As Workbook

    Dim LoopedWorkbook As Workbook
    For Each LoopedWorkbook In Workbooks
        If LoopedWorkbook.Name <> ThisWorkbook.Name Then
            If 6 = MsgBox("Is " & LoopedWorkbook.Name & " the report you want to add?", vbYesNo, "Rejects/Scrubs Report Name") Then
                Set WhichWorkbook = LoopedWorkbook
                Exit For
            End If
        End If
    Next LoopedWorkbook

    If WhichWorkbook Is Nothing Then MsgBox "Sorry, could not find any other open workbooks. If the Scrub/Reject Report that you want is already open, try clos
 
@puzzlepiece87 ooh, Yoda conditions!
 
Just adding this again to show that things probably won't accidentally recurse because you refer to them before the end of the function.
 
I know. The function's identifier is basically an implicit local variable. I like my variables explicit.
 
Can I get an example of your preferred method?
 
8:31 PM
36 mins ago, by FreeMan
Public Property Get TotalAmount() As Double
    Dim result As Double
    Dim lineItem As InvoiceLineItem
    For Each lineItem In this.LineItems
        result = result + lineItem.Amount
    Next
    TotalAmount = result
End Property
TotalAmount is never read inside the body of TotalAmount. It's written to - it's clearly the return value assignment
 
@Mat'sMug Condition checks, Yoda does.
 
@Mat'sMug Ah, there we go, thanks.
And I'm trying to use the only Yoda line I can remember (There is no try, only do) to figure out what a Yoda condition is.
 
@puzzlepiece87 that 6 has no reason not to be vbYes
 
@puzzlepiece87 You might also want to avoid the magic number 6. You're probably looking for vbYes.
 
> do or do not, there is no try
 
8:33 PM
@Mat'sMug beat me to it again!
 
@Mat'sMug Except that 6 is its natural form and I've come across the rare instance where it failed the implicit conversion, and now I always use its natural form to avoid it?
 
huh
 
CInt()
 
MsgBox returns a VbMsgBoxResult enum value
 
I literally always used to use str = vbyes
 
8:35 PM
assuming Hungarian Notation, why are you assigning an enum (by definition an Int) to a string?
 
as for Yoda conditions, that's basically If {constant} = {expression} instead of If {expression} = {constant}; i.e. the boolean expression terms are reversed.
@FreeMan a Long actually, I think
 
Actually, I think @puzzlepiece87 has the Yoda quote correct. I think we all just say it wrong.
 
@Mat'sMug Ah, I do the Yoda conditions for readability.
Desired result on the left, blah blah blah on the right.
 
Beat me to it again! That's it, I'm going home. >:(
 
8:38 PM
@FreeMan I might not be answering your question correctly, but I've gone from strWhatever = vbYes to lngWhatever = 6 to If 6 = Msgbox("",vbyes,"")
 
@puzzlepiece87 the real reason for them is something that's irrelevant in VB, given the assignment and comparison operators are one and the same
20
Q: Why do some experienced programmers write expressions this way?

Kristian D'Amato Possible Duplicates: How to check for equals? (0 == i) or (i == 0) Why does one often see “null != variable” instead of “variable != null” in C#? I've been having a look at an odd tutorial here and there as well as some DirectX code and noticed that many experienced C++ programmers w...

 
That's an improvement, but what the heck does 6 mean??? If you use vbYes it is very clear what you mean.
 
@Mat'sMug I tried to google search the history of this room to find out what code I had that didn't convert it correctly, but I am doing it wrong: site:chat.stackexchange.com/rooms/14929/vba-rubberducking vbyes
@FreeMan Like I was trying to say, I was happily using vbYes before running into a rare conversion error.
 
@puzzlepiece87 there is no conversion occurring between the value returned by MsgBox and the comparison to vbYes. vbYes is a VbMsgBoxResult enum member, and MsgBox returns a VbMsgBoxResult enum value. That 6 is forcing a conversion to Integer without a reason.
i.e. your princess is in another castle, you fixed the wrong problem.
3
 
Is there a good way to search the history of this chat room?
 
8:42 PM
@Mat'sMug LOL!!!
no, really, TTGH...
 
@puzzlepiece87 the search box in the top-right corner. sucks, but pretty much all there is
 
@Mat'sMug I guess I misinterpreted you long ago.
 
May 5 at 21:05, by Mat's Mug
should be a Long, or better, a VbMsgBoxResult
 
May 5 at 21:05, by Mat's Mug
should be a Long, or better, a VbMsgBoxResult
Yup exactly. So I converted them all to Longs.
Looking up what a VbMsgBoxResult is.
 
it's what MsgBox returns
have RD parse your code, then select any MsgBox call
 
8:48 PM
Oh wow
I didn't realize that was a type
And now I'll be retyping all of those again.
 
lol
 
Okay, so my problem wasn't the literal use of vbYes, it was me trying to set the Msgbox result as a string and then it (in a rare occurrence) didn't convert correctly
But if I use vbYes = Msgbox("",vbYesNo,"") then no conversion will be necessary.
Cool, much more readable.
 
@GordonBell well technically it is a keyword. It's meant to work hand in hand with the anticated GoSub keyword though, to goto-jump to a sub-routine and then jump back to the instruction that follows. i.e. Return exists as part of VBA's secret spaghetti sauce recipe. — Mat's Mug 8 secs ago
 
Thank you.
 
yw
 
8:54 PM
So it doesn't do anything for people here, but I saved my coworker's 6 hour training class yesterday. Thanks for all the help - I'm paying it forward as best as I can.
He and the IT dept couldn't figure out the difference between OLEDB and ODBC, he got ODBC installed when he needed OLEDB, so I helped him get a working ODBC connection string.
(He was supposed to train a bunch of people in a tool, simultaneously was selected for the Windows 10 pilot, things broke)
@Mat'sMug, you win, I like your Don't read, only write logic for function implicit local variables.
 
yeah. write it in 20 places if you don't like single-returns, but don't read it.
 
Good habit that will pay off with other languages/tools/whatever.
Function WhichWorkbook() As Workbook

    Dim wbkLoop As Workbook
    For Each wbkLoop In Workbooks
        If wbkLoop.Name <> ThisWorkbook.Name Then
            If vbYes = MsgBox("Is " & wbkLoop.Name & " the report you want to add?", vbYesNo, "Rejects/Scrubs Report Name") Then
                Dim wbkSelectedReport As Workbook
                Set wbkSelectedReport = wbkLoop
                Exit For
            End If
        End If
    Next wbkLoop

    If wbkSelectedReport Is Nothing Then MsgBox "Sorry, could not find any other open workbooks. If the Scrub/Reject Report that you want is al
 
you see, since Nothing Is foo isn't legal, I only view VBA Yoda conditions as an annoying inconsistency. If I maintained that code, I'd revert all these inversed conditions.
 
You're right, but I'm going to leave it since not being able to read a condition without scrolling right is more annoying to me.
 
    Public Function Prompt(ByVal message As String, Optional ByVal title As String = "MyApp") As VbMsgBoxResult
        Prompt = MsgBox(message, vbYesNo, title)
    End Function

And then with proper locals, your condition becomes:

    If Prompt(message, title) = vbYes Then
it only needs scrolling because you're inlining the message string allocation
 
9:10 PM
No in the example you're putting, but I get what you're saying.
The only way you'd avoid the same issue is if you had:
message = ""
title = ""
If Prompt(message, title) = vbYes Then
But yes, abstraction is good to help make things more readable.
 
and debuggable. now you can break on the If statement and inspect your locals to see what the concatenated message is
whatever
 
It's good practice, I'll keep picking it up.
 
9:44 PM
@puzzlepiece87 It's correcting the small things that makes the bigger ones easier to see. Don't make your Future-Self frown at your Current-Self for having to save diming a variable or 2 when debugging comes back.
 
10:02 PM
Gosh, come on Excel!
What is this crap
Select B1:C150, no duplicates found. Select B145:C146 where obvious duplicates are, 1 duplicate removed.
Probably need to restart, and TTGH anyway.
 
11:01 PM
Hello all!
Where is ComIntern?
Disappeared !
 
@A.S.H He's flown the coop and not been visiting our pond.
 
disappeared from SO as well. "last seen june 26" though
Is it the RD stress? lol
I hope you guys wont do the same! DONT DO IT :p
We count on you :)
 
11:16 PM
I gain too much benefit from this group to stop coming. I've too much to learn still, I can't afford not to be here.
 
@IvenBach hasn't replied to my email asking for a life sign either..
 
I greatly hope this isn't going to be a test of the bus factor.
 
Me too. But we'll have to treat it as such until he shows up again :-/
Huh, did I skip 2-3 days?
> Rubberduck.Setup.2.0.13.0.exe (5.83 MiB) - Downloaded 2275 times.
Last updated on 2017-03-12
> Total Downloads 12,609
was 2220 last I checked
Yup, that was Tuesday
 
11:57 PM
@Mat'sMug So don't use recursion to probe how much room there is on the stack?
 
00:00 - 15:0015:00 - 00:00

« first day (1119 days earlier)      last day (2061 days later) »