force macros enabled
RH

TrustPilot

starstarstarstarstar Excellent

  • Home
  • Courses
  • Promotions
  • Schedule
  • Formats
  • Our Clients

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

Force macros to be enabled

resolvedResolved · High Priority · Version 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:

Convert a column into row quickly in Excel 2010

Occasionally 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.

First, select the column you want to convert into a row or a row into a column. Then right click and select Copy. Go to the sheet where you want to past this row as a column and select “Paste Special”. Remember to check the check-box “Transpose” and select “OK”.

View all Excel hints and tips


Server loaded in 0.05 secs.