Solved

Getting compile error in VBA

Posted on 2013-11-14
3
436 Views
Last Modified: 2013-11-14
I have created an Excel dashboard for my users.  When I log into my client's server and run the Excel 2007 application, it runs without a problem.  

When one of the users open the Excel application he gets the error:

Compile Error:  Can't find project or library.

In the Debugger the following is highlighted:

ApplicationDisplayAlerts = False

The Option Button has the following VBA code attached to it:

If Range ("A1") = "Exit without Saving Changes" then
     ApplicationDisplayAlerts = False
     ActiveWorkbook.Close False
     Application.Quit
End If

How can I fix the problem when the users run this application from their desktops?

thanks

glen
0
Comment
Question by:GPSPOW
  • 2
3 Comments
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 39648353
It should be   Application.DisplayAlerts = False

Note the period.
0
 

Author Closing Comment

by:GPSPOW
ID: 39648383
Thank you
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 39648449
You're welcome and I'm glad I was able to help.

Marty - MVP 2009 to 2013
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
New Criteria Prototype 3 19
locking multiple column ranges 10 25
Clear Filter 8 40
Excel VBA Find Lowest Row number in any selection 8 25
Lync meeting or Lync conferencing is what many organizations would like to deploy to allow them save money. But companies are now giving up for various reasons, one of which is that they cannot join external meetings (non-federated company meetings)…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

777 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