• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 496
  • Last Modified:

Excel Marco

I am using Excel 2007 and have a workbook with several tabs.  I have written a macro and tied it to a button on the first sheet that allows the user to type in a name and find it in an org. chart in the workbook.  The file is saved to a folder on a server that several other people are allowed access to.  My problem is when someone else clicks on the button to run the macro they get this error message:  Cannot run macro (macro name).  The macro may not be available in this workbook or all macros may be disabled.  What do i have to do to allow other users to be able to use the macro?
0
barnescs
Asked:
barnescs
  • 2
1 Solution
 
zorvek (Kevin Jones)ConsultantCommented:
How are the users opening the workbook? Are they enabling macros? Are the macros actually contained in the workbook?

Kevin
0
 
barnescsAuthor Commented:
They are opening the workbook with Excel.  Would they be promted to enable the macros and if not, what do they do to enable them?  Yes, when i created the macro i clicked on Developer, and then Macros and then entered my macro as a VBA project.
0
 
zorvek (Kevin Jones)ConsultantCommented:
Macros in a workbook will only run if they are allowed to run. Starting with Excel 2000, Excel provides macro security controlling how macros run. In Excel versions 2000 and 2002 (XP) there are three levels of security:

Low - Macros are always allowed to run.

Medium - Macros run if allowed by clicking "Enable Macros" when prompted when opening workbooks.

High - Macros will not be allowed to run unless the workbook contains an accepted digitial certificate. Each time a workbook with a digital certificate is opened the Security Warning dialog is displayed asking if the digital certificate is to be installed. Once installed the workbook can be opened and macros enabled without any warnings.

In Excel 2003 a new security level was introduced:

Very High - Only macros installed in trusted locations will be allowed to run. All other signed (with a digitial certificate) and unsigned macros will not be allowed to run. A trusted location is either of the XLStart folders.

The security level is set at the application level and affects all workbooks opened on a specific user account. It is set by choosing the menu command Tools->Macro->Security and navigating to the "Security Level" tab.

In Excel 2007 the options are basically the same as with 2003 but have been renamed:

Low is now "Enable all macros"
Medium is now "Disable all macros with notification
High is now "Disable all macros except digitally signed macros"
Very High is now "Disable all macros without notification"

To change the setting in Excel 2007, click the Microsoft Office Button, click Excel Options, click Trust Center, click Trust Center Settings, and click Macro Settings. In Excel 2010 and later, navigate to the File tab, click Options, click Trust Center, click Trust Center Settings, and click Macro Settings.

In Excel 2007 and later, the ability to specify trusted folders was added. Any workbook with macros stored in a trusted folder is opened with macros enabled and no warnings. To add a trusted folder in Excel 2007, click the Microsoft Office Button, click Excel Options, click Trust Center, click Trust Center Settings, click Trusted Locations, and click "Add new location". In Excel 2010 and later, navigate to the File tab, click Options, click Trust Center, click Trust Center Settings, click Trusted Locations, and click "Add new location".

There are two quick ways to determine if macros are enabled or disabled.

Technique 1: Right-click in the menu area and check on Visual Basic. Click the button with the tiangle/pencil/ruler. If no dialog is displayed then macros are enabled. If a dialog is displayed then macros are disabled.

Technique 2: Press ALT+F11, CTRL+G, type a question mark, pressing ENTER. If no dialog is displayed then macros are enabled. If a dialog is displayed then macros are disabled.

Kevin
0
 
EdmoroCommented:
they must to change security to run this macro in the macro security menu located in the developer tab.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now