Results 1 to 9 of 9

Thread: How can you use a variable to reference a worksheet object?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    So on the activate event

    Set LastWS = ActiveSheet

    works fine but then once you deactivate the worksheet the value seems to be lost switching back to Sheet1 from any sheet in between 2 and 5 (5 total)

    Because I get an object with error unless I use Set LastWS in Sheet1 which is where the code above will compile
    Last edited by xmp1; 04-20-2018 at 03:08 PM.

Posting Permissions

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