Results 1 to 3 of 3

Thread: Passing a worksheet object

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Seattle
    Posts
    954

    Passing a worksheet object

    (VBA) If I have a class with a function that takes a worksheet as an argument. And I am creating a worksheet dynamically right before i call that class function, how do I place that dynamically created worksheet name into the argument when I call that function?

  2. #2
    Addicted Member
    Join Date
    Aug 2002
    Location
    Luton, UK
    Posts
    178
    I am not an expert here, but can't you have a class member such as WorksheetName and use that ? eg.

    MyClass.WorksheetName = ActiveSheet.Name
    Regards
    BrianB
    -------------------------------

  3. #3
    Lively Member FantastichenEin's Avatar
    Join Date
    Mar 2000
    Location
    dairy
    Posts
    106
    There will be a collection of worksheets called Excel.Worksheets, just pass the worksheet that you created.
    ****

Posting Permissions

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



Click Here to Expand Forum to Full Width