Consulting

Results 1 to 3 of 3

Thread: can we refer word and excel library in VB at the same time

  1. #1
    VBAX Newbie
    Joined
    Mar 2006
    Posts
    5
    Location

    can we refer word and excel library in VB at the same time

    Hi,
    I have set reference to word library as well as excel library in VB. But methods and objects of both the library do not work in the same program. Whichever library have higher priority (as we can set priority), there objects and methods are identified. Is there anyway by which we can access methods and objects of both the excel and worl library in the same code.

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    I've never had a problem referring to both - can you post a sample of your code?

  3. #3
    VBAX Expert
    Joined
    Jul 2004
    Location
    Wilmington, DE
    Posts
    600
    Location
    Like geekgirlau, I frequently use objects from more than one library in VBA, and if I set up the code properly it's a non-issue.
    Regards,

    Patrick

    I wept for myself because I had no PivotTable.

    Then I met a man who had no AutoFilter.

    Microsoft MVP for Excel, 2007 & 2008

Posting Permissions

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