Macro failing to activate workbook in Mac Excel 2011

Pat Victor

New Member
Joined
Jun 24, 2013
Messages
2
I have a set of VBA macros used to book gigs for bands. The operator opens a venue database spreadsheet, clicks on the row for the desired venue, then clicks on an Add Gig button. The macro then creates a booking form spreadsheet, activates it and then exits leaving the booking form active for the operator to continue working on it.

This works perfectly on the PC, however recently I had to transfer the code to a Mac running Excel Mac 2011. Here what happens on exit from the macro is weird.

The visible spreadsheet is the venue database, not the booking form. The standard and formatting toolbars are greyed out. In the Window menu the venue database has the tick for the active window. The booking form I want is in the list but clicking on it produces no effect.

At this point I can activate the booking form in two ways. I can select another window in the list first; this works, then I can choose the booking form and it activates. Or, I can click anywhere in the venue database window (either on a cell or on the ribbon). The greying out disappears and selecting the booking form in the Window menu now works.

It reminded me of an early VB problem with buttons where you had to get the focus off the button before stuff would work, so I tried it as a menu command rather than a button – no difference. The code is not in This Workbook, where I know you can’t activate another workbook. I tried to mimic solution 2 above in the code by activating the venue database and selecting a cell before activating the booking form – didn’t work. I tried fiddling around directly with windows rather than workbooks, no difference. I thought it looked as if the macro hadn’t quite exited properly, a bit like needing to use Reset when debugging, so I tried using Stop, and End, neither worked.

By the way, this is not a general problem with activation – the macro activates several workbooks in the course of its processing and this works fine.
This is going to drive my PC operators mad, so please, any help would be gratefully received as after several days I am at my wits end……
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Standard and formatting toolbars being grayed out hints that you have turned protection on the activesheet. Not every aspect of worksheet protection in Excel 2010 and 2013 is supported in 2011. On a new worksheet go to Tools > Protection > Protect Sheet and notice which options are offered. If you have others from the PC, you'll have to clear them out of the workbook on a PC before opening it on the Mac.
 
Upvote 0
Standard and formatting toolbars being grayed out hints that you have turned protection on the activesheet. Not every aspect of worksheet protection in Excel 2010 and 2013 is supported in 2011. On a new worksheet go to Tools > Protection > Protect Sheet and notice which options are offered. If you have others from the PC, you'll have to clear them out of the workbook on a PC before opening it on the Mac.
Thanks Jim. I had a look at this but the venue spreadsheet is not protected and anyway the greying out disappears as soon as I click anywhere so I don't think it can be this. Also I noticed that the whole of the toolbars are greyed out, even the save and print icons and so on. The only protected sheets I have in the whole system are ones with selecting locked cells prohibited, and these would leave the main icons available.

I am thinking of moving the whole of the code out of the venue database and into an independent workbook to see if that helps.
 
Upvote 0

Forum statistics

Threads
1,215,079
Messages
6,123,005
Members
449,092
Latest member
masterms

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