VBA works on MS Excel 2013 but not working on MAC Excel 2011

nicholasyu

New Member
Joined
Jul 16, 2014
Messages
3
Hello Mr.Excel,

I wrote a hide rows VBA on Excel 2013 (see the code below), it is working fine. But when I opened in MAC Excel 2011 the button is not working (it become static buttons). I have the button as "form control"

Private Sub OptionButton_NA_No_Click()
Sheet1.Range("90:120").EntireRow.Hidden = True
Sheet5.Range("2:33").EntireRow.Hidden = True
End Sub
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Welcome to MrExcel.

Given your VBA code it looks like you have an ActiveX control rather than a Form Control.
 

nicholasyu

New Member
Joined
Jul 16, 2014
Messages
3
Welcome to MrExcel.

Given your VBA code it looks like you have an ActiveX control rather than a Form Control.


Thanks for the quick reply!
I am new to Excel VBA Code. The VBA code I have it is under Module. How I change it to "form Control" or Do you have an example vba quote for hidden rows for "form Control"?
 

nicholasyu

New Member
Joined
Jul 16, 2014
Messages
3
Thanks for the quick reply!
I am new to Excel VBA Code. The VBA code I have it is under Module. How I change it to "form Control" or Do you have an example vba quote for hidden rows for "form Control"?

Okay i fixed it.
The reason it was not working because I have Group Box (Form Control) on top of my option button, it was working fine in Excel but it doesn't work in Mac 2011. So i have to group my Group box with my option button together and it works!
 

Watch MrExcel Video

Forum statistics

Threads
1,109,004
Messages
5,526,225
Members
409,689
Latest member
martin_br

This Week's Hot Topics

Top