Formerly Best Training
© 2024 STL. All Rights Reserved.
All prices offered for business users and exclude VAT. E&OE
2nd Floor, CA House, 1 Northey Street, Limehouse Basin, London, E14 8BT. United Kingdom
Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Force macros to be enabled
Resolved · High Priority · Version 2016
Dimitri has attended:
Excel VBA Advanced course
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
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
|
Excel tip:Convert a column into row quickly in Excel 2010Occasionally you might enter data into Excel vertically and then when you finish realize that actually it would look more clearer if it was represented in a horizontal format. If you follow these simple steps below, you can quickly change the data from going vertically to horizontally and vice versa. |
We'll call during UK business hours
Server loaded in 0.08 secs.