CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: CreateObject

  1. #1
    Join Date
    Jun 2000
    Posts
    4

    CreateObject

    Hi All

    Dim aa As Object
    Set aa = CreateObject("excel.application", "Tiger")
    debug.print aa.version

    I am trying to run excel on the server (Tiger). But I am getting an error by running from the workstation (Cougar).

    Any help appreciated








  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: CreateObject

    leave out the "Tiger" parameter - that's used for something else. It has nothing to do with the actual server. Just

    Set objExcel = CreateObject("Excel.Application")

    should be sufficient.

    john

    John Pirkey
    MCSD
    http://www.ShallowWaterSystems.com
    http://www.stlvbug.org
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Join Date
    Jun 2000
    Posts
    4

    Re: CreateObject

    Thanks for your reply

    Yes it works locally but the reason why I need is I want to run the Excel etcc from my machine(Pearl) to any machine(Tiger).

    Unfortunately I am getting an error message all the time as below:

    Can't create Active X component

    If any help would be apprecited



  4. #4
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: CreateObject

    You'd have to call some process on the target machine to create a process on that machine. For example, an ASP page on Tiger, even when called from Pearl, will create Excel on Tiger. You could also have an ActiveX EXE running on Tiger that is referenced in an app on Pearl and when Pearl calls a method of that activex EXE on Tiger Excel will be created on Tiger, granted the method calls excel.

    that's about the only way i can think of, sorry.

    john

    John Pirkey
    MCSD
    http://www.ShallowWaterSystems.com
    http://www.stlvbug.org
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  5. #5
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: CreateObject

    If i'm not mistaken, you must have excel installed on target machine and also the current user must have access to run application on the target PC.

    -Cool Bizs

    Good Luck,
    -Cool Bizs

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

Featured