• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't get name of Window 1 in Excel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get name of Window 1 in Excel


  • Subject: Re: Can't get name of Window 1 in Excel
  • From: Larry McMunn <email@hidden>
  • Date: Sun, 2 Oct 2005 08:06:27 -0400

Title: Re: Can't get name of Window 1 in Excel
Robert Poland <email@hidden>  wrote:

The following script fails with MS Excel version X, "Can't get name
of Window 1.".

tell application "Microsoft Excel"
      Activate
        delay 1
set fileName to Name of Window 1
        display dialog "fileName = " & fileName
end tell

Robert,
This works for me:

tell application "Excel_2004"
        activate
        set sName to name of active sheet
        set bName to name of active workbook
        display dialog sName & return & bName
end tell

While we see it in a window, Excel refers to it as the active sheet.
--

Happy Automation!  :-)

Larry McMunn
President

McMunn Associates, Inc.
Collingswood, NJ
Seminole, FL

Main Office:  (856) 858-3440
Mobile:     (856) 261-7018
FAX:        (856) 869-5936
---------------------------------------------------------------
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Find and replace space by the Terminal equivalent
  • Next by Date: Re: Find and replace space by the Terminal equivalent
  • Previous by thread: Re: Can't get name of Window 1 in Excel
  • Next by thread: Creating an alias with a folder action script.
  • Index(es):
    • Date
    • Thread