Solved

VBA code error when running on Apple Mac

Posted on 2014-09-23
5
135 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I need add rows to specific range of rows 9 43
autofill formulas using macro 8 51
Pull first name out of cell 2 28
Aggregate data in an EXCEL file. 12 38
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

734 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