Skip to main content
10 events
when toggle format what by license comment
Aug 17, 2019 at 11:53 comment added RubberDuck You always add some number to the vbObjectError constant, but there’s no real meaning to what that number is other than what we assign to it. You want it to be unique so that it’s easy to find the error code. When I was regularly developing VBA, my dept kept a spreadsheet full of the custom error codes we had created so we didn’t duplicate and they were easy to look up.
Aug 17, 2019 at 11:49 comment added QHarr @RubberDuck Thanks. I was guessing something like that. And is there a reason for the number being 9001 ? As opposed to say 901 ?
Aug 17, 2019 at 10:00 comment added RubberDuck @QHarr the rest of them increment by 1 automatically. Omitting the +2, +3, etc just makes for easier maintenance.
Aug 17, 2019 at 6:48 comment added QHarr in the Enum why does only the first have the + \d{4} please?
Jun 6, 2016 at 14:40 comment added Mark Hurd @RubberDuck You've caused me to go back and quickly review my VB6 code: I used Or mostly, but sometimes I did something like Const ErrBase = vbObjectError Or 1000 : Err.Raise ErrBase + 19. Anyway, the other facility codes mostly aren't relevant to VB6 code, although we should probably now use &hA0000000 instead anyway.
Jun 6, 2016 at 13:32 comment added RubberDuck How is the Or correct @MarkHurd? Sure, it works and is completely equivalent in this scenario, but your average VB dev is going to stare at the screen uttering "WTF". In my mind, the correct way is the way that's easy to understand.
Jun 6, 2016 at 13:23 comment added Mark Hurd "Because bitwise Or is 'correct'." I agree with the Enum though.
Aug 15, 2014 at 20:10 comment added RubberDuck Wasting time on Stack Overflow.
Aug 15, 2014 at 20:08 comment added Mathieu Guindon Dude, where have you been all this time!
Aug 15, 2014 at 20:06 history answered RubberDuck CC BY-SA 3.0