Office Mac 2011 - Excel Command Buttons

ddnron

Board Regular
Joined
Oct 11, 2003
Messages
119
I have command buttons that work fine in windows environment. I load Office mac 2011, and it opens workbooks fine, and I enable macros. I cannot get any of the command buttons to activate. It always gives me the design mode selection, where i can cut the button. I do not get the hand to activate the code when I select the button. Any idea how to activate the command buttons.

Thanks in advance for your help.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
What is the file suffix? Excel 2011 won't run macros unless the file suffix is .xlsm.

If the suffix is not .xlsm, choose "Save As" and choose "Excel Macro Enabled Workbook (.xlsm)" from the Format drop down in the Save Dialog.

Hope this helps,

Craig
 
Upvote 0
Thanks for the quick reply craig49.

I checked to the file extension and it is xlsm. It allows me to assign a macro to it. So I created an empty macro, then copied the code to it. Then I assigned the new macro to the button and it enables the button. I really do not want to do this with the 15 buttons I have. Any other suggestions would be appreciated.

I also open the developer toolbar and disabled the design mode. This did not work either. thanks again.

I also have a code that works fine in windows but doesn't in Mac. It gives me a Compile Error - expected function or variable, and highlights "select" on second row from bottom. Like i mentioned this code works fine in windows environment.

Code:
Private Sub CommandButton3_Click()
l = ActiveCell.Row
strCells = "a" & ActiveCell.Row
Range(strCells).Select
  'ActiveCell.Value = 1
  'highlights b coulmn to e coulmn of active cell row
With ActiveCell.Range(Cells(1, 3), Cells(1, 7)).Select
Selection.Interior.ColorIndex = 4
m = ActiveCell.Row
strCells = "g" & ActiveCell.Row
Range(strCells).Select
ActiveCell.Select
Selection.Value = "Yes"
End With
End Sub
 
Upvote 0
Hello ddnron,

I did some snooping around trying to find an answer. But, there aren't many answers out there! I'm sure you are finding the same. Part of the problem is while Office 2011 does have VBA in the "feature set" the Mac version is like "VBA Lite." MS either chose not to include a full VBA feature set or chose one that works most of the time. ActiveX, for example is not supported in 2011. While it is documented, no mention is made that it is not supported.

The previous version of Office for Mac didn't have any VBA support and apparently there was no active development for years. When it was decided to include VBA in 2011, the development team was rushed to "catch up" with years of development on the Windows side. So, it is amazing that VBA 2011 works as well as it does.

The frustrating part is that MS just says, "It's got VBA," and forgot the part about "but, it isn't the fully functioning version." That's marketing. However, it helps lots of folks make good incomes writing books and consulting.

Sorry I couldn't have been more helpful.
 
Upvote 0
Thanks agian for your reply craig49. My snooping has lead me in the same direction as you, there is not much out there. I'll just create macros, without code, and copy my code into them, then assign. I can go to Mac VB and run the codes from there. All except the one I posted.

I'm by no means an expert at VB, but the Mac version just does not have all the functioning tools as windows. Good thing I have both operating systems in the house.

I think I'll send Microsoft a note about the codes working in windows, but not Office Mac. See what they say.

Thanks agian for you help and time Craig49.
 
Upvote 0
Yep that does appear to be very annoying.

I have a form that includes about 30 command buttons spread across 20+ pages.

It does seems that the only "fix" is to move all the code into Modules and link them as Macros instead of as Private Sub code linked to a specific page.
 
Upvote 0
Now I gotta figure out how to trigger code that runs when the workbook is opened or print is chosen etc.
 
Upvote 0
Apple views ActiveX as a security hole, hence it is not supported. Frankly, activex controls on worksheets cause more problems than they solve anyway, so I would always use Forms versions if possible, if you must put controls on sheets.
 
Upvote 0
In my case I inherited a doc - and used to have a Windows system for dev and provided the doc for all Windows users - I have since moved to Mac as my primary OS as have a number of my co-workers - but there are still a few hold outs - so I have to make something that works for both.

I very likely will have to rebuild the entire thing from the ground up - as I also have to integrate some new capabilities as well.
 
Upvote 0
What I did was copy over all of the buttons on the Mac Version and if you click on the button you can add a macro and edit the text on the form button.:cool:




Hello ddnron,

I did some snooping around trying to find an answer. But, there aren't many answers out there! I'm sure you are finding the same. Part of the problem is while Office 2011 does have VBA in the "feature set" the Mac version is like "VBA Lite." MS either chose not to include a full VBA feature set or chose one that works most of the time. ActiveX, for example is not supported in 2011. While it is documented, no mention is made that it is not supported.

The previous version of Office for Mac didn't have any VBA support and apparently there was no active development for years. When it was decided to include VBA in 2011, the development team was rushed to "catch up" with years of development on the Windows side. So, it is amazing that VBA 2011 works as well as it does.

The frustrating part is that MS just says, "It's got VBA," and forgot the part about "but, it isn't the fully functioning version." That's marketing. However, it helps lots of folks make good incomes writing books and consulting.

Sorry I couldn't have been more helpful.
 
Upvote 0

Forum statistics

Threads
1,224,609
Messages
6,179,879
Members
452,948
Latest member
Dupuhini

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