RE: Re: Excel 2011: Select noncontiguous columns
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 dont 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