« first day (1509 days earlier)      last day (1671 days later) » 
00:00 - 21:0021:00 - 00:00

12:25 AM
@ThunderFrame MichKa was on Access team and sometimes adter that, worked on internationalization for Microsoft so I would not be surprised that he figured it out or had inside help
@Comintern pretty sure they are legal, just like in C
@IvenBach ok note so in response to my comments and I will stop whining. ;) just me, my belts, and my suspenders talking.
@MathieuGuindon so, we have been making lot more mistakes than Terrence and Sam? :p
 
@this lol, quite likely :)
 
@this Well crap. COM Reflection is strongly resisting alias resolution...
I think I need an overload of ComParameter specifically for return types.
 
12:56 AM
@Comintern just to make sure i am not making it up --- docs.microsoft.com/en-us/windows/desktop/midl/typedef
sez very similar to C typedef, then goes to say it's augmented to allow for attribute decoration in IDL. Since we're dealing with IDL, the remarks regarding ACF can be ignored, I thinnk. I hope.
 
@this Yeah, that's kind of what I thought. With the current structure I'm playing with that means I have to recurse them.
I wonder if it would be easier to process the typelib in a specific order.
Aliases first, Interfaces second, then everything else.
Actually enumerations would need to come before interfaces.
 
That might not work
BTW, you might find this interesting: msdn.microsoft.com/en-us/library/cc237557.aspx
RE: why it mihgt not ork -- because not all typedefs are discovered via enumeration. You might need to first enumerate the members/parameters to find all typeinfos
 
@this Yep, because they can be public...
 
then resolve the typeinfos.
 
Oh, that's the easy part. I can just enumerate the index an build a map of index -> TYPEKIND. That's a ton of duplicated function calls though.
I wonder if it would be better to make an AliasDeclaration and kick it down to the resolver.
 
1:07 AM
How will you relocate the typeinfo?
I worry that the cost of re-instanitating the typeinfo in resolver pass may be too high
 
I wouldn't re-instance it - the current collector already gets the non-typedef'd names, so it would basically just be string replacements at that point.
That might cause a bunch of unrelated issues though.
 
I think you are on the right track, though -- need to do multiple passes in certain sequences
 
There are basically 2 flavors of typerefs - with and without Guids. For example:
typedef [public]
FormShowConstants _FormShowConstants;
That one is simply a name replacement for UI.
 
Like, enumerate all referenced libraries, then resolve all members
 
stdole2 does a bunch of those to "hide" the fact that you're really using an interface instead of an object.
 
1:14 AM
once you have all libraries enumerated, you have all the types you need, right?
 
Maybe. I still haven't found a good library to check against the VBA object browser for the other case.
 
?
you mean the renaming like in stole2?
 
Project references library A. Library A references library B. Project does not reference library B. Is the alias used?
...if it's declared in B.
 
by library A yes
consider, if it references the lib B, then it. Has to have a method that uses it
so it benefits RD to know about them, even if the project doens't actually use it
BTW, I'm sure you can find an example of this w/ Access object library
it will return CurrentDb, which is a DAO.Database.. A different library
Ditto w/ CurrnetProject.Connection -> ADODB
it's more stark when doing interop - when you reference an Access object library, VS automatically adds DAO and ADODB reference whether you like it or not
 
Right, but lets say B has typedef Foo Bar. A has _stdcall Member([in] Bar Param);. Does the object browser call it a Foo or a Bar?
 
1:19 AM
OK, instead of wondering why not write a pair of IDL files?
compile it then load it up in OB
see what it does
 
That might not be a bad idea. I'll have to see if I need to install more toolchain.
 
you definitely need c++ build tools
 
There isn't a stand-alone tlb compiler?
 
and u gonna use the vs command prompt or MIDL whines about cant find resource compiler or whatever
i really wished there was....
but no it's all entangled n all other c++ tools
 
Meh, I'm used to compilers complaining. I used to code golf.
 
1:21 AM
that's why i made it optional for development purposes.
btw, when working on olewoo, i noticed that the COM? OB? was very particular about how you should name enums
screw it up and you get a fugly alias
 
I did find a pretty substantial bug that I'm shocked nobody caught.
 
which is what happened w/ constnats in scrrun like ForReading
what would be that bug?
 
@this Ahhh, yes. They're both typedefs.
 
yeah, as far as i can see, you must use syntax like typedef foo {....} foo if you want your enum to be foo inside VBA
 
@this Some ComMembers that are really subs get flagged as Functions.
        else if ((VarEnum)funcDesc.elemdescFunc.tdesc.vt == VarEnum.VT_VOID)
        {
            Type = DeclarationType.Procedure;
        }
That test is wrong.
Because... they can return an HRESULT.
 
1:25 AM
lol
 
:facepalm:
 
i bet you nobody wanted to look at the code in the interim.
i mean, look at that abbreviated/acronyms method calls
 
I'm pretty sure it's just a UI issue, although we're probably doing some extra work around that in the resolver.
@this Are you implying that funcDesc.elemdescFunc.tdesc.vt might need better naming? :-P
 
ok, here's a deal -- if we find a new resolver bug, the author of that workaround needs a slap on the head. :p
@Comintern could be slightly better....
 
Should resolve fine - my guess is no impact because the compiler will prevent assigning the "return value". The :facepalm: was strictly voluntary.
 
1:30 AM
@SimonForsberg I think @Duga is either a) laying down on the job, b) is dead, c) has ragequited once again. Can you please look into her?
 
I think it should be something more like this:
    else if ((VarEnum)funcDesc.elemdescFunc.tdesc.vt == VarEnum.VT_VOID ||
             _parameters.All(param => !param.IsReturnValue))
    {
        Type = DeclarationType.Procedure;
    }
 
i believe R# will suggest that you do !_parameters.Any(param => param.IsReturnValue) but looks OK
 
Huh. R# apparently doesn't care, but yours is better - I forgot about the short circuit.
 
Hey what about that? I outsmarted R# for a change!
(in past when i thought I was smorter than R#, I got grief for it as R# usually turns out to be right or nudging toward a right solution)
 
IKR?
 
 
1 hour later…
2:47 AM
But in the end @this @Comintern Ducksense (work in progress, right?) or was it Quacksense takes upon R# suggestions and makes RD suggestions smarter down the track regards snippets...
 
@PeterMTaylor What do you mean by that?
How does swimming help any more than walking/biking?
 
Wow, this is why I try to stay away from the VBA tag...
That's because you still have FileFormat:=xls. It has to be an XlFileFormat. If you have xls declared somewhere and it isn't a member of that enumeration, it's wrong. I think you mean FileFormat:=xlExcel8, but it's hard to tell which one you need. You have to pick one from the list. — Comintern 29 secs ago
@PeterMTaylor I'm partial to Ducksense personally. ;-)
Woot!
Note the green hand-drawn circle as my compromise with @Phrancis.
 
3:24 AM
> Walking is an accessible activity: most everyone can do it.
The most word is what kills me...
 
4:00 AM
@Comintern loved the user's response to you.
@Comintern curious, are you resolving it or special casing this one?
 
@this IKR? 56?
@this A little of both. On that one, it's resolving as an alias, but is being renamed to LongPtr because it's an intrinsic VBA type. From the ComAlias ctor:
        if (Name.Equals("LONG_PTR"))
        {
            TypeName = "LongPtr";
            return;
        }
...and in retrospect it should probably be TypeName = Tokens.LongPtr;
 
Yeah was just curious if you found the actual typedef for the LongPtr
sounds like there isnt. Which also implies they added yet another hack to the hack that is VBE
 
There isn't one AFAICT. It's probably just mapped similarly to int = "Long"
Which still manages to screw me up.
 
Yeah it's really annoying that VBA type system is still stuck in 16-bit-era
 
Proabably would have had slower adoption if it was Dim foo as Word or Dim bar as DWord.
Not to mention the obvious naming conflict with Office.
 
4:09 AM
@this I'm looking at your suggestion to use IEnumerable<CodeInspectionSeverity> but I'm not groking the use on it.
 
Ok- your method has several boolean parameters
one to indicate which should be enabled for filering, right?
 
Yes. After reading your suggestion I thought of
public void FilterResults(CodeInspectionSeverity inspection)
{
    switch (inspection)
    {
        case CodeInspectionSeverity.Hint:
            _filterInspectionsByHint = true;
            break;
        case CodeInspectionSeverity.Suggestion:
            _filterInspectionsBySuggestion = true;
            break;
        case CodeInspectionSeverity.Warning:
            _filterInspectionsByWarning = true;
            break;
        case CodeInspectionSeverity.Error:
            _filterInspectionsByError = true;
That eliminates 3 arguments and makes it simpler.
I'm interested in IEnumerable<T> and its use.
 
You're almost there
 
Yet still so far.
 
so the parametere would be IEnumerable<CodeInspectionSeverity> inspections
 
4:15 AM
But I don't comprehenderize what extra benefit that adds.
 
Then your linq becomes: Where(o => o.Inspection.Severity.Any(inspections)
and you don't need all those extra _filter*** variables
at least i don't think you should need them
 
hrm... Trying to understand this. Back to struggling.
 
when the user toggles a option, you add/remove the element accordingly
 
I don't understand how to add or remove it. That's where my disconnect is.
 
@IvenBach You do not need to understand me. You only need to understand code. ;)
 
4:18 AM
You understand my #Words.
 
@IvenBach lets show your code for handling the toggle
 
Wouldn't a HashSet<CodeInspectionSeverity> be a lot more efficient than multiple enumerations over and IEnumerable<CodeInspectionSeverity> in the lambda?
 
#TIL. Never really used a hashset before
 
O_O
 
.Any doesn't exist.
 
4:20 AM
.Where(o => someHashSet.Contains(o)) will slay the other in performance.
 
@Comintern hey, hey, i'm merely a imposer wannabe who does good enough job of faking knowledge
 
LOL
That makes everyone. ;-)
 
> HashSet<T> Class: Represents a set of values.
I'm more confused than before I looked up what it was... #NotAGoodSign
 
It has super fast lookups because it puts all the members in a hashtable.
 
What is a hash table?
 
4:23 AM
Think of it as a List<T> with distinct members optimized for item lookup.
 
Wait.... Do we need hash table if we already know all possible members?
 
Hashtable Class Represents a collection of key/value pairs that are organized based on the hash code of the key.
 
@IvenBach The best way to think of it is like a List<T> with an database-style unique index on each item's .GetHashCode()
^^^ That's why I thought it would appeal to @this and his SQL leanings.
 
I kinda-sorta understand that. But what is a hash, that's where I get confused.
 
you know what md5 and sha2 are?
 
4:25 AM
It's basically just a number that represents everything that makes an object unique.
 
I have heard those terms, but again don't know what they actually mean.
 
They are.2 diffenent implementation of hash functions
but really a hash function cna be anything
it only needs to be able to create an unique value given an input
@Comintern do we still benefit from a hashet even if we know all possible members? I always assumed that hash table is needed when you don't know all possible members in advance.
 
@this Yes. It doesn't need to iterate the members to evaluate a Contains call. It just looks it up in the hash table.
 
Ok, makes sense. Keep it at O(1)
 
I actually abuse Scripting.Dictionary in VBA to do the same thing: foo.Add item, item
 
4:30 AM
oh so it is a hashtable internally?
that would explain the speed difference b/t the Scripting.Dictionary vs. VBA.Collection, I suppose.
 
Yep. Same with Dictionary<TKey, TValue> in .NET.
@this VBA.Collection is dead to me.
 
IINM, VBA.Collection is a linked list.
I'll admit that I use it here adn there just becuase I'm too lazy to be bothered with yet another reference. :p
but usually I end up with Recordset whenever I find I need to do some local filtering/sorting
 
Scripting.Dictionary.Items works well enough as a proxy.
 
@IvenBach anyway so. The point is that on your command for toggling -- you should add/remove the member from a hashset
then run that hashset to discover items to be listed.
 
You can pass an IEnumerable<T> to the ctor too. That's the easiest way to fill one.
Or, it's a convenient shorthand for a multiple condition if statement. I.e. in ComField.cs:
        private static readonly HashSet<TYPEKIND> ReferenceTypeKinds = new HashSet<TYPEKIND>
        {
            TYPEKIND.TKIND_DISPATCH,
            TYPEKIND.TKIND_COCLASS,
            TYPEKIND.TKIND_INTERFACE
        };

		//...

		IsReferenceType = ReferenceTypeKinds.Contains(attribs.typekind);
 
4:42 AM
Do you use Excel @IvenBach. In particular the function VLookup that can match the supplied call to VLookup and return a property back to the caller. So I am able to find a matching pair elsewhere. Hashtable is similar in behaviour
 
@this I'll try and finish understanding this. Duckling needs attention.
@PeterMTaylor Yep. Using Excel to teach me will greatly lower the barrier to entry for me.
 
So vba.collection is a linked list so recordset is a linked list yes?
 
@this I wish them luck with that. Permissive typing combined with regional settings and innumerable decisions on how to handle strings like "1E10". This will be a punishment for someone.
@PeterMTaylor Depends on the recordset implementation, mainly if you're using a cursor and the cursor type IIR.
OK, time to get my git-fu on and unf*ck my fork.
 
5:40 AM
@PeterMTaylor for a local recordset (e.g. adOpenStatic + adUseClient), I expect it to be a linked list. However, it's much more heavyweight than VBA.Collection because it provide simple sorting and filtering.
With a server-side recordset, I usually expect you to get a sorted list of keys to walk
 
6:38 AM
@comintern @this - see my CodeReview class for a mashup of a dictionary and a collection:
10
Q: Enumerable Custom Collections in VBA with Dictionary features like Exists

ThunderFrameTo Collect or Hash The VBA.Collection has a number of limitations, but it is enumerable and you can refer to items by index or key. But the VBA implementation of a Collection is 1-based, and they don't have any way of confirming membership, and the Item method returns a Variant, so they're loose...

 
6:57 AM
@this First I was thinking it was because of this, but that shouldn't happen until tomorrow...
181
Q: Support for OpenID ends on July 25, 2018

Joe Friend NOTE: We are changing the date for ending OpenID support from August 15, 2018 to July 25, 2018. Notifications to the affected users are going out today and we will follow up with another round in two weeks. Stack Overflow was an early and strong supporter of OpenID. We built our sign up/log ...

Unfortunately I am not finished with the work on that yet ^^
 
Howdy @SimonForsberg. A question for you if your checking on Duga tonight. If an issue contains a picture or png format on the first line. Could Duga be able post images into chat or I’m may be missing chat’s limitation regard images?
 
That's what she could post potentially ^^
It seems like images are oneboxed
But she can't post both an image and some text
 
Oneboxed? Clarify what you meant.
 
and as all github messages are prepended by > it wouldn't work.
@PeterMTaylor I mean that it's showed as an image instead of as a link
Anyway, now she should be up again.
 
Nice picture of Stephen Hawkins diary. :) @SimonForsberg
 
7:04 AM
@PeterMTaylor I just googled for "an image"
 
Thanks for that. Did we have issues with markdowns shame not being able to change colours when different bolds could be offered.
Just had an idea in mind that would I post a report (via a Github Issue) and different colours could pop up...
 
8:01 AM
@IvenBach A hash function is just a function sending things to a defined range of values, e.g. x -> x mod N for fixed N is a hash function on integers, but not a very good one. A good hash function does this with next to no collisions, provided the target range is sufficiently large compared to range of inputs.
One example you have seen in action already is the one generating the git tags, which are just a hashes of your commits.
The idea of a hash table/set is that you use a hash function to dump your data into a large array indexed by the hashes of the data.
Since there are next to no collisions for a good hash function, when you try to add a value, the spot is next to never occupied already. So, you get inserts that are O(1) on average. Moreover, since the items you want to retrieve are almost always immediately at the hash, you also get O(1) average access time.
You actually also need a strategy for the rather unproblematisch case of a collision. There are basically two:
The first is to store linked lists of vales and just add to the list.
The other is to push the value to another spot determined the current insert position that is occupied already, e.g. by hashing that position with another hash function.
On lookup, you look at the value at the hash and then do an actual equality check. If it fails, you look at the next value according to your insert strategy.
 
8:31 AM
 
9:04 AM
Btw, if you only have a very small number of possible values, using a list is probably faster. Hash functions usually cost more than a few comparisons.
 
 
4 hours later…
1:07 PM
Realizing that I wrote some silly code:
  Dim counter As Long
  For counter = 0 To dropDown.ListCount - 1
    dropDown.RemoveItem (0)
  Next
I went to fix it and typed:
      While dropDown.ListCount > 0

      Dim counter As Long
      For counter = 0 To dropDown.ListCount - 1
        dropDown.RemoveItem (0)
      Next
Note the blank line after the While without a Wend. AC didn't seem to complete the block even though I have AC set to do so.
Other than the fact that I can't properly post some fixed-font code without taking about 4 tries, what am I doing wrong.
 
I always find it annoying that after clicking fixed font that button is selected and hitting enter just toggles the fixed font off and on instead of sending the message.
 
@M.Doerner :+1:
 
Btw, you know that While...Wend is deprecated, right?
 
NB: I also have AC set to complete on {tab} and on {enter}
Is it While...End While now?
nope. No, @M.Doerner I didn't know that...
 
No, Do While...Loop
 
1:16 PM
that seems like some silly sugar to add on...
  Do While theList.ListCount > 0

  While theList.ListCount > 0
    theList.RemoveItem (0)
  Wend
Still no AC funtiontion...
 
It is kind of consistent with Do...While <condition> Loop.
 
Typos á´™ Us this morning
@M.Doerner I guess...
More new things to get used to... grumble, grumble, grumble...
Imma gonna go get some coffee. neither the brain nor the fingers are working yet this morning...
 
It is not as if they would remove While...Wend in a new version of VBA.
3
 
I find Loop much more readable than Wend.
 
@M.Doerner "new version of VBA" - that's the most funny thing anyone's said around here in... a loong time! :D
 
1:31 PM
FWIW, Do While is more consistent with Do Until and the Loop is a word, while Wend is what? A knoockdown version of wand?
BTW, I also find it more readable to say Do Until theList.ListCount = 0 but that's just me.
 
@this It's the complement to If ... Whiff.
 
OK, Ok, ok... no need to pile on! I never said it was wrong, that's just the way I learned it, and The Way I've Always Done Itâ„¢, and now I need to get used to something different...
It's not like my code now resembles, in any way shape or form, the code I wrote before I discovered RD, this is just one more thing to change...
@this Wend is how you get your way through the foot traffic at the concert, BTW
 
2:01 PM
0
Q: Pasting from another workbook

RobbyI have a macro comprised of this and similar Subs. They work, but I feel like it's slowing it down. Two workbooks are open, and various ranges are copied from one that is hidden (wbSource) and pasted into the other (mainWB), which is not hidden. Is there a way to do this better? Sub CopyData() D...

 
Carp! the AC issues were most likely related to the fact that the code pane was open when the VBE was launched. Gotta remember that!
 
Anyone have recommendations for a batch file IDE?
 
@Comintern Notepad++ suits me
 
@Comintern What he said ^
 
Yeah, that's what I usually use, but the beast I'm working on now is making me want to jump to labels and variable definitions.
 
2:15 PM
@FreeMan normally, you'd loop backwards through a list to remove each item. Particularly if Remove 0, actually removes 0 and moves 1 into the 0 position.
@Comintern there was a commerical product I used to use. Let me see if I can remember it
 
After looking at this thing, I'd bet my boss would spring for it.
 
U could use powershell...
 
Google turned up a couple, but they look a little sketchy.
@this I wish. The server this runs on doesn't have it installed.
 
@Comintern I think it was PrimalScript
 
OK, thanks. Checking it out now.
 
2:18 PM
Doesnt because it cant or wont?
 
@this Won't.
 
Sucks. But wld vbscript be better
 
It might, but I'm guessing it would take days to untangle all this stuff. It's also part of our nightly build process, so...eggshells.
Looks like it's been part of that process since about 1984.
 
#HaveFun. :/
 
#LivingTheDream
 
2:21 PM
@ThunderFrame That's frequently the case, and I always do so when removing rows in Excel. Is there any particular reason for doing so in this case? I suppose it might be a smidge faster removing the last item instead of moving them all up the list by 1...
 
1984 seems apropos
 
@Comintern There was a pretty good Mac commercial from Apple back then...
 
I wonder if there's still any remnants of the old CP/M build in here...
 
I finally reinstalled Visual Studio 6, whittling it down to mandatory components, VB components and ActiveX controls. Installation froze, and killing it caused an error that said the installation had been unsuccessful, but VB6 starts, so I guess that's good enough, for now.
 
@ThunderFrame AFAICT that's normal post WinXP.
 
2:32 PM
yep, I suspect it's one or more of the ActiveX controls
 
My god, it's batch files all the way down...
 
@Comintern iirc, we used PrimalScript because, at the time, it was the editor that supported WSF files
 
I'm liking that it supports vbscript and bash.
 
@mansellan My laptop has a 4K screen, but I run it at 200% scaling, so it looks like 1080p. When I load VB6 without Rubberduck enabled, the scaling is correct, but when I load VB6 with Rubberduck enabled (or I enable Rubberduck once VB6 is started), then the scaling adjusts as if it was 100%. That is, everything becomes really small.
I suspect it's got something to do with Rubberduck's use of WPF.
 
Wasn't there an issue for that? I seem to remember somebody opening something re 4K displays.
Although I'm not exactly sure what we could do about it.
 
2:45 PM
I'll see if I can find it. I suspect it has more to dop with scaling than absolute resolution.
 
@ThunderFrame sounds like it could be tricky to fix :-(
 
would [assembly: DisableDpiAwareness] work in a not-a-WPF-application DLL's AssemblyInfo.cs?
 
@MathieuGuindon I don't think so. DisableDpiAwarenessAttribute is a member of System.Windows.Media.
 
it's like WPF UI in a DLL was never a use case for WPF
 
4:23 PM
0
Q: Checks for duplicate school enrollments and keeps more recent enrollment

ms_queenI have over 260k lines of data. This code is likely to take more than 30hrs to run. Would like help to speed this up. Or is there a way to use something else like PowerQuery to accomplish this? I am very new so please break it down clearly. Some students may have multiple lines with the same sc...

 
5:08 PM
@QuackExchange Is it acceptable to edit on CR for copy-paste formatting errors? I'm assuming that the line-wrapping of the comments without line continuations is not how it was coded.
 
@Comintern looks like the comments were added for descriptive purposes, just for the CR post. I doubt they're in the actual code. should be fine to edit, but I'd leave a comment about it to the OP, e.g. "I've edited the in-code comments so that the code can be copy-pasted into compilable code, but if these notes aren't in your actual code then it's best to just remove them and describe your code in actual text" or something
that said, it looks like the OP has posted-and-vanished
 
Expect @Duga to fall apart tomorrow. I haven't been able to remove her Open ID login code in favor for the new login system.
 
5:24 PM
Speaking of @Duga, are the GitHub notifications down on their site in general? I haven't been getting emails either.
 
5:38 PM
I guess the scaling issue with RD might be due to our Winforms containers. Usually, in WPF the style of a window/control should be inherited from the parent control unless overwritten, all the way down from the windows style.
 
in Duga's Neighborhood, 1 min ago, by Duga
Monking! (Duga is now listening for commands)
Have no fear, @Duga is saved!
I made sure that @Duga had an account at meta.stackexchange.com, which is where she logs in now, but during testing I was using my other bot - Greger - who, of course, did not have an account at meta.stackexchange.com
So then I thought that it didn't work while actually, it did work all the time.
 
While googling for the scaling issue, I found this: Troubleshooting Hybrid Applications which discusses WinForms/WPF issues including scaling, keyboard input, message loops and other issues.
@MathieuGuindon I think you could be right, as per these
 
5:55 PM
hmm, so this strongly hints at an implicit WPF Application object being created somewhere
right?
 
That has a ring of familiarity to it. I'd always imagined it as more of a rendering or compositing service, but I'm not entirely sure how it's implemented.
 
@skiwi might know something about this.
 
he'll pull out the information as soon as he finds that browser tab
2
 
@SimonForsberg poor little @Duga... she's such a sensitive gal
 
@Hosch250 Beep boop
What's your problem, sir?
 
6:06 PM
@SimonForsberg never mind about @Duga... late to the party. Again.
 
@MathieuGuindon Which one of these 500?
 
just 500?! you've been quiet!
 
What happened to the other tabs?
 
@M.Doerner I killed them!
insert evil laugther
 
6:44 PM
Shit, I accidentally hit close all tabs on my phone
Luckily I was in time to undo the action :)
 
LOL
As far as I can tell, there is no way to sort existing data in an unbound listbox in Access without storing off all the entries, manually sorting them, clearing the listbox, then adding all the entries back in the newly desired sort order.
I'd be thrilled for someone to prove me wrong.
 
Why all the extra code? Just bind a table or query, done
You also can bind to a recordset object as well.
 
7:08 PM
I'm creating a report definition form. I have a table of available pages and a table that contains reports with a selection of pages and the order in which the pages are to be generated. I want to be able to add, rearrange & delete pages in the defined report, sort by page name, page description or page order, then save or cancel when I'm done.
 
So use a local temp table
 
I was thinking of that while grabbing a cup of coffee.
reasonably performant?
 
Our default approach, so yes.
 
sounds reasonable.
create the table on the fly or build a "TempSortTable-don'tdeleteme" up front?
 
Not all problems are meant to be solved bt slinging code. ;-)
 
7:11 PM
select the existing records into the temp table, bind the listbox to the temp table, work with the bound table, then save the temp table to the permanent one or toss the contents as appropriate when you're done?
Or just use the temp table for sorting purposes...
(Except for the sorting issue, the code has done been slung...)
 
Use sql, luke
3
 
hi @RobertColumbia
 
@MathieuGuindon hello
 
looking for a challenging OSS project? :)
 
Obi-won, what does that... crap Darth got him before I could get all my answers...
 
7:35 PM
@FreeMan Obi-won? I thought he lost.
 
Yeah, Vader got him before I could get all my questions answered...
 
I think it's Obi-Wan
 
This is the Chinese version - he goes in soup
@Hosch250 oh, yeah, never mind.
Huge going away lunch for the boss. Stomach is full, brain is on extra slow mode...
I'll just crawl back under my desk for a nap now
 
does ThisWorkbook even have a CodeName if there's no VBA project?
0
Q: How do you change the codename of a macro-free xlsx file?

John GiglioEvery week I create two different reports from templates. From week to week the names of those reports change to include the week ending date. I have some VBA code to copy and paste values from one to the other. Rather than changing the file names in my code, I tried to utilize the workbook coden...

 
8:12 PM
@MathieuGuindon I seem to be able to save a workbook with an altered codename for the sheet, an altered project name, and a reference to a macro-enabled workbook
 
@ThunderFrame O_o? I just tried it and the name didn't survive the round-trip to the hard drive.
 
yes but OP is asking about ThisWorkbook
 
the names survive a reopen, but the reference doesn't survive a reopen
 
I don't understand what use the workbook's CodeName is from an external workbook's perspective
 
Binary file formats or XML file formats??
 
8:14 PM
and when I asked the OP they responded with "read more carefully"
so...
@Comintern xlsx
 
That's what I tried it on. I'm not sure what the point is either. What's the OP going to do, run a macro from it?
That would be some real @ThunderFrame level stuff there.
 
no idea. read more carefully.
 
Ahhhh... I read it more carefully. He's trying to utilize it.
 
can't do that without referencing the VBA project, no?
 
you can't refer to another workbook by its codename, macro-enabled or not, right?
 
8:18 PM
trying to find out..
(been assuming "nope" forever)
 
I think what he wants is Set myCodeName = Workbooks.Open("Report.xlsx")
 
"Utilize" the codename how? I've read this carefully three times now and can't figure out how you're intending to use it. Can you edit the question to include your code? — Comintern 16 secs ago
 
f*ck it, I reread it, it's a VTC from me.
 
My best guess is that he's trying to strip out the macros that came from the template.
 
I renamed the project Something, the workbook SomeBook, referenced the macro-less workbook, and this compiles:
Sub test()
    Debug.Print somebook.ActiveSheet.Name
End Sub
^ in the macro-enabled Book2
 
8:21 PM
sure, but how do you add a reference to it programmatically, if you don't know what the filename is?
 
Has somebook been closed and reopened? I can't get mine to do that.
 
@Comintern ooh, not yet
lol, "The workbook is currently referenced by another workbook and cannot be closed"
 
LOL
 
XY problem, unless the user edits their question
 
^
Set book = Workbooks.Open(path)
^ likely actual solution
 
8:25 PM
^ likely beyond user's comprehension
 
well then I can just say "read more carefully"
5
 
@this I loaded up an Office 97 VM. I'd forgotten that Access didn't have a VBE in 97, it just opens a module window, and rejigs the menus and toolbars.
And yet Excel 97 did have a VBE.
 
8:46 PM
@ThunderFrame O.o
 
8:59 PM
@ThunderFrame was picking my nose back then. But that strikes me as odd --- there's a lot of literature on Access 97 and VBA....
 
00:00 - 21:0021:00 - 00:00

« first day (1509 days earlier)      last day (1671 days later) »