Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Perth, Western Australia, Australia
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OLE Syntax (2002/XPSP3)

    Hi all,

    I am using JavaScript to run excel throught OLE.

    I ma having a problem with the syntax required fro the command

    MsExcel.Workbooks(WorkBookName).Close

    What I would like to do is append SaveChanges:=False to the command but I cannot make it work.

    In short how can I get the command below to be accepted in JavaScript?

    MsExcel.Workbooks(WorkBookName).Close SaveChanges:=False


    Thanks in advance for any advice

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OLE Syntax (2002/XPSP3)

    Try

    MsExcel.Workbooks(WorkBookName).Close(False);

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Perth, Western Australia, Australia
    Posts
    190
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OLE Syntax (2002/XPSP3)

    Hans,

    That worked fine. Once I figured out that JScript likes 'false' not 'False'...

    The solution is pretty obvious when you are given it.

    Thanks for thehelp.

Posting Permissions

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