Solved

VBA code error when running on Apple Mac

Posted on 2014-09-23
5
129 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

770 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