2 Mac Script(Apple script) for Excel 2008 Questions

Msadiqrajani

Board Regular
Joined
Jan 17, 2009
Messages
107
Hi,
I am beginner Mac scriptor and trying to convert my Excel application to Mac Excel 2008.

I am trying to unhide hidden rows but unable to do this.
I have tried these codes
Code:
set hidden of format of range "1:5" to false

Set hidden of range "1:5" to true
First code does nothing neither provides any error.
But second one throws this error.

Code:
cant set hidden of range "1:5" to true

Second question is that I want to attach Mac Script with buttons on Excel.

I was unable to figure out how to do within excel so I googled and found this script.

Code:
tell application "Microsoft Excel"
   
   set actionString to "run script \"Macintosh HD:Users:merickson:Desktop:Untitled 2.scpt\" as alias"

   set shape on action of shape "Button 2" of active sheet to actionString
end tell
I planed to attach my scripts to button on file open but I am surprised that this only works with 1 button.

Script will work with last button i attached script but for other buttons, Excel hangs up.

Thanks for reading my long details.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi,
By playing around, i found answer of my first question.

The code to Hide or Unhide row is

Code:
set hidden of row "1:5" to true
 
Upvote 0

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top