Solved

VBA code error when running on Apple Mac

Posted on 2014-09-23
5
126 Views
Last Modified: 2014-09-26
The 2013 VBA code at some stages pops up a userform that is dismissed when the user clicks on another sheet's tab. This operation works fine on Excel in Windows.

But on Mac, clicking on another tab causes an error. The userform.hide must require something that's not being done perhaps?
0
Comment
Question by:krakatoa
  • 3
  • 2
5 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40338906
Care to share the code and what the error is?
0
 
LVL 16

Author Comment

by:krakatoa
ID: 40339376
Private Sub Worksheet_Activate()

    If UserForm1.Visible = False Then

        UserForm1.Show vbModeless
    
    End If

End Sub

Public Sub Worksheet_Deactivate()

    UserForm1.Hide

End Sub

Open in new window


I think the error is 1004.
0
 
LVL 16

Author Comment

by:krakatoa
ID: 40342946
Do you think that was not the relevant code? Would other routines intervene?
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 40343455
You can't have modeless forms on a Mac.
0
 
LVL 16

Author Comment

by:krakatoa
ID: 40343534
I see, thanks.

Then before I close this, would you know of any possible workaround to that?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now