Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
force macros enabled

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Force macros to be enabled

Force macros to be enabled

ResolvedVersion 2016

Dimitri has attended:
Excel VBA Advanced course

Force macros to be enabled

Good evening,

I have two VBA related questions:

1- I am looking to force macros to be enabled when opening a workbook. Is it possible ? (I know where to write the piece of code but I don't know what the code is)

2- One of my macros opens a workbook automatically to extract some data, and then closes the workbook. However the following message is displayed every time the workbook is opened:
"We cannot update some of the links in your workbook right now
You can continue without updating their values, or edit the links you think are wrong" (Two buttons: "Continue" or "Edit Links...")
I have tried to put Application.UpdateLinks = False in my code but it does not seem to remove this message.
Any idea ?

Thank you very much for your feedback.

Best regards,

Dimitri

RE: Force macros to be enabled

Hi Dimitri,

Thank you for the forum question.

I am sorry but that is not possible. The whole idea by have to enable macros is to protect you from virus created in VBA. You can set your Security level to "Enable all macros", but I wouldn't do this. This will put you in risk of executing dangerous code.

2. Type Application.DisplayAlerts=false at the top of your code
and Application.displayAlerts=True at the bottom.


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

RE: Force macros to be enabled

Thank you Jens.

Best regards,
Dimitri

Excel tip:

Fill formulae across a sheet

To copy a formula down a spreadsheet where there is data underneath, to the left or to the right of the formula, double-click on the fill handle. The fill handle is the little black cross that appears in the bottom right-hand corner of the formula cell. Unfortunately, no similar facility exists to copy formulae across the sheet.

One reasonably quick way to copy an existing formula across a sheet is to select the formula and the cells on the right to which you want to copy it. Then press Ctrl+R to copy the formula across the selected range, or, if you are menu-minded, use the Edit|Fill|Right command.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.1 secs.