VBA Rubberducking

This chat has moved to Discord: discord.gg/MYX9RECenJ
Jan 18, 2023 16:42
You could always use Mrs F's clear and inciteful terminology when asking me to do one of two things. Thingy and TheOtherThingy
Oct 5, 2022 09:52
@MathieuGuindon Thanks for the invite. I had to think a bit before accepting. I'm not a professional programmer, just dabble as a hobby. However I'm in the last stages of retiring so will have some free time and am willing to learn. Happy to be told to just sit on my hands.
Oct 3, 2022 08:46
@MathieuGuindon Apologies, I didn't realise access was limited. And yes, due to a glitch, I am also @FullValueRider.
Oct 2, 2022 19:52
404 here
Aug 12, 2022 14:07
```
Aug 12, 2022 14:06
```
Jul 22, 2022 16:06
@INOPIAE I think a good philosophy is that code that returns an error for testing should be avoided. Instead you would be wrapping the code that generates the error in a Try function so that you only test for true/false and in the case of True, the returned value. There is a rubberduck blog article on this issue.
Jun 22, 2022 16:19
Just recently Rubberduck boot time has sharply increased from around 5 seconds to more than 30 seconds. I'm on 6091.
Jun 3, 2022 09:06
Yes. That compiles and runs and gives the expected output. Using 'Next foo,bar' gives a compile time error.
Apr 21, 2022 16:42
I get 4 in Excel. If you try to assign to color you are told its a constant.
Apr 11, 2022 22:28
Refractured: The feeling you have when you add the last refactor for today and slowly realise that it allows you to delete 50% of the code you've painfully written over the past 3 months
4
Apr 1, 2022 20:57
Its a type character. It means the function return a Long Type.
Feb 22, 2022 17:48
You know you are on a loser when the poster starts with 'I am new to VBA"( especially if the add a 'lol') which is short for I've started messing about with VBA in excel but haven't bothered to work my way through a VBA tutorial or do any other reading which might help me. Please write my code for me/ I found this code which nearly works etc etc etc.
Feb 17, 2022 20:37
@Freman it also says that the cyclomatic complexity is dependent on the number of decisions so how do they get 2 as the minimum case when in the code shown there are no decisions?
Feb 15, 2022 16:55
Measuring means that performance will tend towards minimising the gap between performance and what is measured. So make sure that what you are measuring is related to perfomance and not making your spreadsheet look nice.....
Feb 11, 2022 10:58
This was an interesting read on the origins of VB/VBA bbs.vbstreets.ru/viewtopic.php?f=101&t=56551
Feb 8, 2022 22:55
@this Yes, the like most problems, once you know what is causing the problem its easy to solve. Elucidating the problem is the skill. It doesn't stop you the rolling of the eyes and prefixing Microsoft with a variety of Anglo Saxon crudities.
Feb 8, 2022 17:59
SO I'm sat here scratching my head during a debugging session only to find that vartype(<stack>) returns the value 8 (as string) and that if I debug.Print <stack> I get "System.Collections.Stack" and consequently the code to filter out objects with a default string property is failing (Case VarType(p.Input) = vbString And IsObject(p.Input)). I don't get this issue when I pass in an <arraylist> or <queue>.s
Feb 8, 2022 10:57
To get a learner permit to drive a car one of the qualifying tests should be that you have ridden a bicycle over a distance of 5000 miles in the past two years (on roads used by cars). Only then will you have a true understanding of the utterly abysmally low standard of driving prevailing (even here in the UK).
Jan 29, 2022 12:10
I've been round tripping a project between VBA and twinBasic. Rubberduck picks up an awful lot of fluff that is not yet flagged in twinBasic.
Jan 20, 2022 20:12
Will do, but likely tomorrow now.
Jan 20, 2022 20:10
Strict assert
Jan 20, 2022 19:13
Hi Guys. I have a test which is giving a pass in VBA but a fail in twinbasic (and I think twinbasic is correct). Rubberduck assert.sequenceequals says 10,20,30,40 is the same as 40,30,20,10. Is this down to a difference in how the ducky does the assessment.
Jan 13, 2022 18:44
@Freeman. That's what I meant.
Jan 13, 2022 17:46
From a medical perspective there is sufficient genetic diversity between groups originating from different parts of the planet that indicating your genotype origin can provide very useful input to a treatment plan. Race is a bad word for Genotype.
Jan 6, 2022 16:13
Noooooooo! Another one of those interesting bugs where code works fine when you step through but crashes when you run normally (I mean crash as in taking out the application).
Oct 25, 2021 15:48
@hackslash Thanks for confirming. I was wondering why I hadn't seen the 'Import" dialog in the comment above.
Oct 25, 2021 15:46
@Hackslash No. I know that route. I've just never seen a Rubberduck menu option explicitly named 'Import'
Oct 25, 2021 15:38
@HackSlash Thanks As I said in my post I'm aware of that route. Just never seen a ducky command called 'Import'
Oct 25, 2021 10:42
Where is this Rubberduck Import located. I've never seen it. I can see that in syncronise project I can update files and select which files I want to update.
Oct 12, 2021 21:19
32909 error. This error is persisting even after rubberduck exporting the active project, importing into twinbasic, correcting the visible compile errors, then exporting from twinbasic , and dragging and dropping the project into a new word template.then finally adding the needed references before debug.compile.
Oct 12, 2021 17:00
Hi All. Any ideas as to what might cause 'Unexpected Error (32909)'. No line of code is highlighted.
Oct 7, 2021 16:44
@MDIsmailHosen Based on the code example you provide you'd probably be better using a scripting.dictionary rather than a two column array. Then you'd have no issues converting to collections because you won't need them, and you can use the .Sequenceequals assertion on the .Keys and .Items properties of the dictionary.
Aug 20, 2021 16:20
As I'm getting older the incidence of me transposing two letters as I'm typing is increasing. Its worse with certain words. Guess who has spent the afternoon trying to work out why a class with a '@PredecalredId wan't being seen by intellisense.
Jun 22, 2021 19:56
@Freeman Averaging averages is the cornerstone of Statistical Process Control (Central Limit Theorem)
Jun 18, 2021 07:56
The unconditional exit sub probably represents the furthest extent of the previous refactoring attempt.
Jun 16, 2021 12:42
@Freeman Any drug submitted to the FDA is no longer experimental. Expedited review by the FDA means that the risks that they can deduce from the provided data are less than the risks associated with not allowing the vaccine, but that the review process is not complete. The expedited review will be under strict review in case there are pharmacovigilance signals that were not evident in the data that has been assessed to date.
May 17, 2021 21:01
A small issue. But the Rubberduck splash screen that comes up at the end of installation is still saying 2.5.1.0
May 7, 2021 12:39
You do know that the new units for the speed of light is furlongs per fortnight.
Apr 19, 2021 11:53
I'm playing with twinbasic. I converted a solution to Project Euler Question 14 from VBA to twinBasic (I just had to change debug.print statements to Msgbox due to preview restrictions). The VBA code takes 51 minutes to run to completion. twinBasic took just 3 seconds.!!!!!
3
Apr 18, 2021 17:47
Apr 16, 2021 16:16
@MathieuGuindon re s and p. I reserve (s) state for those things that are used internally to the object, or which arise as an intermediate state or support a property but which are not directly accessible as a property. There is no public access to s variables. all p variables are public properties. I find the distinction helpful, others may not.
Apr 16, 2021 15:25
Of course, in VBA, you can be more sophisticated than just using 'this' In my code I came to the conclusion that 'this' was perpetuating limitations in other languages and so spread my wings to use s and p type variables to encapsulate Private Type State and Private Type Properties
Apr 14, 2021 13:56
Am I a deluded fool in thinking that if you evolve VBA sufficiently you'll end up with typescript. Would I being cruel to Wayne to suggest that a fantastic opportunity for twin basic is not so much twin basic but as a front end of a translator to typescript?
Apr 10, 2021 13:00
If sharing makes the class 'global' then probably not at this time as this is likely linked to the PredecalredId thing. You could always ask Wayne directly. I got a pretty fast response to my PredeclaredId question yesterday.
Apr 10, 2021 12:56
I'm not sufficiently au fait with sharing to know if twinBasic does that.
Apr 10, 2021 12:53
No. I've paused evaluation as you can't yet declare constants or set the predeclared attribute. The former I can get around by converting to function but the second has me stumped for the trial project I was looking at. Wayne has said these two items should be along in a week or two.
Apr 10, 2021 12:50
The web site recommends copying hello world and then editing that, for now.
Apr 4, 2021 21:35
Hi guys. The explicit link to this room seems to have disappeared.
Mar 26, 2021 16:53
Ah, you press.......