• 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: Re: Excel 2011: Select noncontiguous columns
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re: Excel 2011: Select noncontiguous columns


  • Subject: RE: Re: Excel 2011: Select noncontiguous columns
  • From: email@hidden
  • Date: Thu, 20 Oct 2011 12:04:22 +0200

hi Olivier,


try this: (so use ; instead of ,)

tell application "Microsoft Excel"

tell active workbook

tell active sheet

set myRange to column ("F:G;I:J")

set column width of myRange to 5

end tell

end tell

end tell


best regards,

\\Jan




2011/10/20 Barry Wainwright <email@hidden>:
> Replying from my iPad, so I can't check this at the moment,
>
> Ranges in excel can be difficult to grok at first. There are places that require a 'range' argument, but the range supplied needs to be a column.
>
> Try setting myRange to columns ("F:F,H:H,K:K,N:N,Q:Q")

OK.
If I try a few contiguous columns, it works:
tell application "Microsoft Excel"
tell active workbook
tell active sheet
set myRange to column ("F:J")
set column width of myRange to 5
end tell
end tell
end tell

If I try a few non-contiguous columns, it does not work.
tell application "Microsoft Excel"
tell active workbook
tell active sheet
set myRange to column ("F:G,I:J")
set column width of myRange to 5
end tell
end tell
end tell

I really don’t understand what is happening.

Oli.

-- 
Mac OS 10.6.7
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Excel 2011: Select noncontiguous columns
  • Next by Date: Re: Excel 2011: Select noncontiguous columns
  • Previous by thread: Re: Excel 2011: Select noncontiguous columns
  • Next by thread: Assistance for UI scripting text entry
  • Index(es):
    • Date
    • Thread