excel - select column and hide

Hey all,

Any help would be appreciated. I’m trying to do the following:

Objective:

  1. Select a Column
  2. Hide Column (Format > Column > Hide)

Code so far:


tell application "Microsoft Excel"
	activate
	select column 2
end tell

Issue:

  1. How do we use column letters instead of numbers?
  2. How do we use the column hide option through GUI if that is possible?

TIA

This hides/reveals the column selected by the user.

tell application "Microsoft Excel"
	set selectedColumn to entire column of cell 1 of selection
	set hidden of selectedColumn to not (hidden of selectedColumn)
end tell

I’m pretty sure Excel2008 allows you to create a button for its hide command. (Earlier versions DO have that capability.)
That would be the most convenient GUI for (un)hiding columns selected by the user.