How to permanently allow macro for a trusted worksheet? - excel

I've created a worksheet which is shared amongst my colleagues with a real simply macro to show/hide rows but everytime either I or one of my colleagues opens it they get prompted to Allow marco - is there anyway for them to permantly allow this macro?

You'll want to digitally sign the project. Microsoft's information about how to do that is here: http://office.microsoft.com/en-us/excel-help/digitally-sign-a-macro-project-HA001231781.aspx

You need to change a setting in Macro Security within Excel so that your colleagues don't have to respond to a dialog box every time. Be advised, though, that when you allow macro code to run automatically, this can unsuspectingly open you up to malicious code in other Excel workbooks.
The location of the settings for Macro Security is different from versions 2003 and 2007 of Excel. In 2003 and previous, I believe the setting is visible in Tools > Macros > Macro Security. From there, you would change the security level to low. In Excel 2007 (and probably 2010), the setting is visible in the Developer tab on the ribbon (which you might have to make visible by toggling a checkbox in Excel Options). From the Developer tab, click Macro Security and chose Enable All Macros.
The above is the simplest way for your colleagues to make a change to their system, but a better way, as others suggest, would be to digitaly sign your own work so that your colleagues don't have to open a potential security hole on their own system.

Related

Disallow workbook editing unless Enable Content is clicked

I'm setting up a shared Excel spreadsheet with macros, but I don't want to let anyone edit the document at all until they've clicked the "Enable Content" in the SECURITY WARNING bar at the top.
How can I "protect" the workbook like that?
Set up the workbook to run a macro before the file is saved (workbook.beforesave). In that routine, set all sheets to xlVeryHidden, except for one sheet where you explain that the user needs to enable macros. You could even have a screenshot showing what they need to click.
When macros are enabled, the workbook_open event can unhide all sheets you want to show.
Protect the VBA project with a password.
Someone with very malicious intent and advanced coding skills will probably be able to find a way to circumvent this setup, but it should work well in a business environment where people just want to get their work done.

Need to disable copy/paste command on excel 2007 across different users

I need to disable the copy/paste in excel 2007. The excel file will be sent to different users so i need a solution where copy/paste is disabled for all users.
I have searched the web but everyone has asked to enable the macros but the problem with that is i will have to enable the macros for every user first before restricting them from copy/pasting.
So looking for a solution where i can write some vba code on sheet to restrict all users from copy/pasting without enabling macros.
Thanks.
Lock the Cells with the Protection Option of Excel manually or lock them programmatically.
Example:
'Range Lock
Worksheets("Sheet1").Range("A1:G37").Locked = True
'Sheet Lock
Worksheets("Sheet1").Protect
EDIT:
Just saw ur new comment, there is no option to use VBA code to block ONLY copy/pasting without allowing Macros in ur Workbook.
You don't need VBA for this.
Go to the review tab
Select protect sheet
Protect with password and take away the ✓ (there should only be one)

QTP Code for permanently enabling MACROS

I have a QTP script which opens an excel sheet and update some of my results in the excel work book, but the excel has macros, so everytime when i runs, the alert box asking whether to enable macros pops up.
So i need a QTP script which will premanently enable macros.
Kindly help.
You can't use QTP script to enable macros permanently. Another work around for this is to go for trust center settings in Excel. Here you have option to enable or macros or you can disable macros without notification. Once this is done excel won't show any notification to enable macros. You may need to check the "Trust access to VBA project object model"
Assuming that you are using Excel 2007: To access the trust center settings click the office button >> Excel Options >> Trust Center >> Trust Center Settings >> Macro Settings
Note: Its not recommended to enable macros permanently as it may compromise your security.
In addition you can open excel files in background using QTP. Try doing that and check whether the enable macro pop up create problems.

Quick Access Toolbar Customization: Selecting Macros causes Excel to crash

Running Office '10 on Win7
Experience: Some VBA experience, no XML experience
Hi,
I have two issues and an answer to the first may render the second mute.
Q1) Is there a way to get macros in locked add-ins to show up in the QAT macros drop-down? For example, I am running Hyperion and the essexleqd.xla and essexcln.xll add-ins are running. At least some of the macros for these add-ins are visible in the QAT macros drop-down, even though the add-in itself is locked.
Q2) Situation: Excel application is open, but there is no active/visible sheet open. When I go to customize QAT and then select macros from the drop-down, I get an error message and Excel crashes then restarts. Has anyone else encountered this, or know why this happens and has a fix?
Background:
I have a simple add-in that I want to distribute. I have locked it for viewing, but this means that I cannot create a QAT button that references the macro because the macro from the add-in is not visible in the QAT macros drop-down. I have read here (http://www.fontstuff.com/vba/vbatut03.htm) that this happens, but that I should be able to write in the name of the macro somewhere and the button will work.
Q1)
This article should help you.
How to: Create a Custom Menu That Calls a Macro
Q2)
I would guess that they crash because they can't handle that there is no active worksheet open. You probably have to start Excel by opening an empty file in order to workaround the issue.

Is it possible to use macros created on system's ms-office into another system?

I'm wondering, if its possible to use macros (PERSONAL.XLSB) file created on one system on other system by just coping the same on XLSTART Folder. I have created macros in office 2007 and wanna run these macros on my users system. For security stuff i have changed the security settings on my users ms-office to "low"/"allow all macros" options depending upon the respective office version.
Waiting for excel experts valuable comments and suggestions.
Any help will highly be appreciated.
mrana....
Basically its simple, just copy & paste your macros file in the above mentioned folder and then those will be available at your excel sheets.
One more method you guys could use just record a macro and select save in as "This workbook" as a option and then save that sheet as "macros enabled spread sheet" and share that where you want to.
Let me if i'm not clear to you guys..
mrana....

Resources