@ThunderFrame I am thinking you might be right about the word object model. Today, I found out that macro recorder lies completely about what is being done on the UI. I knew macro recorder was crapatastic with its reliance on ActiveAnything and Selection and implicit references but I never thought it'd come up with random code that doesn't even correspond to what I did via UI.
The short answer is no, not out of the box. You can install 3rd party tools to do this, like this open source tool http://rubberduckvba.com/
If you have a lengthy procedure you may what to ask yourself if it does more than one thing. Generally a procedure should only do one thing as a rule. Then...
Apparently RD has code folding!
@this I think it's because lots of stuff still uses WordBasic function calls behind the scenes, and the Macro Recorder doesn't "see" those steps.
@ThunderFrame Hmm. Interesting. FWIW, that was the first time I saw recorder lie so blatantly to me. Is that even the case with basic stuff? In my case, I was simply doing a ApplyListTemplate -- recorder says I should take one from the gallery but in actuality all I needed was ApplyDefaultNumbering . Netiher feel like a leftover from WordBasic.
> This PR refactors the functions within ParserRuleContextHelper.cs (PRCHelpr) to ParserRuleContextExtensions.cs (PRCExtensions). The PR is a follow-on to the suggestion made in comment(s) for #3684 where I had made use of PRCHelper. In addition to porting the functions, I am proposing some modifications and renaming. 1. In the existing PRCExtensions, there were several overloaded versions of GetProcedureSelection(...). These overloaded functions may have been solving a problem that no...
longer exists. None of the functions are referenced by the code base (except one that is referenced by a test). I have removed these un-used functions as part of this PR. I am also proposing some new method names. The terms "Parent" and "Child" are used in a few methods names where "Ancestor" and "Descendent" would be more precise/descriptive given the method's current behavior. 1. The overloaded methods HasParent are changed to IsDescendentOf(...). 2. Method FindChildren did not stop...
at the context's "children" list but rather walked the entire parse tree. I have changed this method name to GetDescendents(...). 3. Method GetParent - which would imply (to me) a function that simply returns context.Parent, returned the the context itself (if it is the correct Type), or the first ancestor of the correct Type. I've modified this function to only return the first qualifying Ancestor (IOW, a context cannot be it's own Ancestor/Parent). I have changed the name of this...
method to GetAncestor. The DeclarationFinder referenced HasParent and GetParent. It has been updated to use equivalent logic: e.g., context is T || context.IsDescendentOf<T>()
I'm all nostalgic for VBA's Variant. I was hoping to make a properties collection in .NET, where I could retrieve the value as a String, Number, Boolean or Object. How do I go about that in C#?
Oh boy! need to remember that DAX means DAta Anaylsis Expression. Feels like a mouthful. I’m leaning power pivot which I need now and reading from power pivot / power bi ebook to get my head around it.
@this well, for built-in controls, I know the property names and types, so I can create explicit properties for their concrete implementations, but for 3rd party controls, I can't know the property types/names, so ideally I'd add them to a properties collection. Then any IControl can refer to a property by index, just like MSForms....
I have a worksheet which is filled with data from Column A to G. Each row is a unique entity and Column G contains a value that shows how many quarters each data is reported late by from today. If the returned value is more 4 (that means the reported date was more than 4 quarters from today), the...
I have a sub which should only continue running if 4 specific worksheets are present. From online reading, such as @Tim Williams's comment in Test or check if sheet exists, I know that using an error thrown, to determine a course of action, can be frowned upon, but I found similar usage to mine i...
@Duga You know, maybe the only way to get rid of that Schrödinger's resx file is to actually hunker down and actually rename RetailCoder.VBE to Rudderduck.VBE
@WaynePhillipsEA FWIW - there is a Serialize button on the Rubberduck which writes out to a folder in %appdata%\Rubberduck, creating a folder for declarations. Maybe you can borrow that code to serialize the IType*** info in similar manner.
Was hoping for a re-usable dialog form or similar for simplicity, so I might just output to a file in the end anyway, and maybe launch notepad to view it.
@ThunderFrame would you agree that the macro recorder has became much less useful since they introduced ribbon, at least for Word? Because I'm sure thinking that.
Coming to a rubberduck near you soon... live ITypeLib support from the VBE, including reading and writing the conditional compilation arguments plus determine the types of objects (workbook/worksheet/form/report etc), and controls.
The ITypeInfo::AddressOf member is implemented though, for static members, but what it returns is not a valid function pointer. I need to look at that.
@WaynePhillipsEA You probably already thought of it but just in case - it might help to run a AddressOf on such member and send it to the C++ function you define. That might give clue as to whether the something is a pointer offset, a handle or maybe just simple obfuscation of the pointer.
hey @this, sure. don't worry, I would spot exe code a mile off :) I'll re visit that perhaps tomorrow, but I'll certainly work out what it is and whether we can make use of it.
> Removed the ghost file "Retailcoder.VBE/UI/RubberduckUI.resx" using Git on my local repo. Seems to have done the right thing. Since the file deletion shows up in the diff here, I would think it means the ghost file is still in the master GitHub repository. Maybe this PR when merged, will remove it.
Yeah. it's fun. TBH, I'm not sure how git decides which file it applies to from Windows. Randomly? Whatever sorts the first? IDK. But I think it wasn't consistent every time so it keeps coming back with new conflicts.
I have way to much going on in my life right now. Don't ask me why I started with learning Japanese...
2
@Mat'sMug You do you do it Sensei mug... Teach me your ways for I must learn to code better, play the Ukulele better, speak Japanese, ride the unicycle with grace, achieve a 7 ball cascade and 5 ball back-cross. All while not dropping from fatigue. What is your secret?
@IvenBach there's no secret. something takes a beating. there's a reason I feel like shit when I see a ton of PRs from all of you, while I struggle to find the time to push a single commit to my own fork! And when I was more productive, daywork would suffer, or family, or something else. Haven't touched my guitar in months...
TBH I find it impressive that one can commit so many different characters to memory. I'm not exactly sure how one'd manage to select the correct character, much less type it on only 100-odd keyboard.
ichi, ni, san, shi, go, roku, ?, hachi, queue (i used phonetics on that one), ju, juichi, juni, ... up to 19 I can do. 2D6 don't ever let me make it to 20.
I'll be in that last category before I'm done tonight, probably.
No show-stopper bugs found since this morning.
A few tweaks need to be made, but only on systems that we either can't or aren't using currently.
The changes made it so we can use a few long-running edge-cases in our system without making our servers unresponsive because we can now run them out of process.