Consulting

Results 1 to 7 of 7

Thread: How to Declare Object Variable with Direct Memory Access?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    How to Declare Object Variable with Direct Memory Access?

    I want to declare a variable by directly writing the declaration directly to memory. i assume we need to create in memory:

    • Variable name and type info. Eg, "MyWorkbook"

    I assume the variable can be created using commonly available methods such as StrPtr, VarPtr, ObjPtr, CopyMemory, etc.

    Once created, then the variable could be instantiated with normal VBA (not direct memory access), using the variable-name as normal. Eg:
    Set MyWorkbook = Workbooks(2)

    Assume 64-bit (PtrSafe declarations etc)
    Office 2016
    Last edited by johnywhy; 07-22-2021 at 03:58 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •