Solved

VBA code error when running on Apple Mac

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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
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.

706 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

22 Experts available now in Live!

Get 1:1 Help Now