Search results

  1. riktek

    Programmatically construct a constant's name and return its value

    Thanks for that. I've read it before and actually do exactly what it describes for a slightly different purpose. Mike uses a predeclared class module as the primary container but I've found a standard module will perform identically and is a bit more robust. I also actually had a close look...
  2. riktek

    Programmatically construct a constant's name and return its value

    Thanks. That's quite helpful and explains or confirms much. I actually have parsed the VBAL on a number of occasions over the years and so am familiar with it. In fact, I believe I have several editions of it in my reference directory. It's minimally descriptive and can't hold a candle to...
  3. riktek

    Programmatically construct a constant's name and return its value

    In Bash, this is called expansion. What you describe explains the failure. Eval() jumps the gun by expanding its argument before it executes. Wow. To me, this reveals a profound and fundamental design flaw of Eval() in that its very purpose would seem to depend on deferring expansion of the...
  4. riktek

    Programmatically construct a constant's name and return its value

    Quite helpful, this and your other comments, and thanks. Coincidentally, I've actually been diving deeper into VB.NET lately and had overlooked this. This reveals, among other things, that I don't understand expressions as well as I might. I have tried to get a handle on evaluation otherwise...
  5. riktek

    Programmatically construct a constant's name and return its value

    Pete, thanks for asking. The context is a standard module with the necessaries for getting code into a project, including modules, references, unregistered DLLs, etc., which I'm refactoring. For the time being, the module has among other things a number of module-level string constants...
  6. riktek

    Programmatically construct a constant's name and return its value

    No, the module has a number of library GUID strings as constants, used to add, test, or remove project references.
  7. riktek

    Programmatically construct a constant's name and return its value

    Thanks for both replies. Your code is illegible in my browser (I think there may be site settings for this) and it's late, but I'll work on getting something readable and revert.
  8. riktek

    Programmatically construct a constant's name and return its value

    Having read that documentation just now, I wouldn't necessarily say "misleading." "Silent" might be more descriptive. "False," "wrong," and "incorrect" also would work nicely. Regardless, any might well be amplified with the adverbs "woefully" or "profoundly." To the point, it's good to know...
  9. riktek

    Programmatically construct a constant's name and return its value

    They're string constants, actually, GUIDs.
  10. riktek

    Programmatically construct a constant's name and return its value

    I hadn't thought of it that way. Probably because this doesn't seem to require more than the thinnest and least removed degree of indirection to accomplish, or even qualify as such. I'm surprised at some level that this might be so because of how the function is defined and described - give it...
  11. riktek

    Programmatically construct a constant's name and return its value

    I would like to programmatically construct a constant's name and return its value, but am stuck. Eval() seems the most logical approach but it chokes, as follows. At the top of a standard module, I do, e.g.: Public Const conFooBar As String = "conFooBarValue" Then, in the same module a...
  12. riktek

    Class_Terminate() on project reset?

    That could be it, too. No telling how the organization allocates tasks and responsibilities. Access class modules are a class in the Access library, however, not just generic VBIDE.VBComponent objects. Access.Class is hidden but it's what exposes the Initialize and Terminate events. No VBA...
  13. riktek

    Class_Terminate() on project reset?

    I just confirmed @sonic8 's observation that the code in Form_Unload() and Form_Close() event procedures will run after a project reset even though code in Class_Terminate() does not. For the test, I simply revised the containing variable's type declaration from Access.Class to Access.Form and...
  14. riktek

    Class_Terminate() on project reset?

    Yes, of course, and I do so in a standard way practically everywhere. This actually has more to do with fundamentals bearing on some framework extensions I'm evolving concerning events. Access.Class.Terminate is just a piece of a larger puzzle. @sonic8 's observation about Form.Unload and...
  15. riktek

    Class_Terminate() on project reset?

    Yes, of course, but the question really is, then, what? Destroying a variable containing a class instance will destroy the instance. So far, so good but do this manually and Class_Terminate() executes, do it with a reset and it doesn't. The consensus seems to be that a reset (or an End...
  16. riktek

    Class_Terminate() on project reset?

    I'm mostly seeking to confirm my understanding but the question is whether Class_Terminate() runs on or immediately after a project reset. I don't think so. Some sources (including LLMs) state otherwise, however, equating a reset with clearing the sole variable containing an instance of a...
  17. riktek

    VBE custom code colors (syntax highlighting)

    I just ran across this, so sorry to be late to the party. Colors in Windows are a shit show™ although, to be fair, GTK also qualifies. Happily, not so much with the VBE, I learned. We can tinker with these settings in some (but not full) detail via the GUI (Tools > Options > Editor Format)...
  18. riktek

    Solved Ampersand in Page.Caption Right-Justifies Its Text

    You can still love it, and use the present tense, because it continues to exist in the new/current WordPerfect.😁
  19. riktek

    Solved Ampersand in Page.Caption Right-Justifies Its Text

    I've had other fish to fry, development-wise, since proving the concept but WordPerfect actually is brilliant as a report writer for Access. One simply does a merge into what is essentially a template document. I don't know that I'd necessarily draft documents programmatically with either...
  20. riktek

    Solved Ampersand in Page.Caption Right-Justifies Its Text

    We discussed briefly my idiosyncratic automation of WordPerfect from Access at the AE session a couple months ago. I simply don't automate Word. It never has been stable enough for documents more complex than simple memoranda. As I got more into programming, I realized its object model is...
Back
Top Bottom