Share via

Warning with VBA code in excel files

Anonymous
2017-11-07T01:40:41+00:00

Hi,

I received an excel file containing vba code from someone. After opening the file, I get the following Security Warning:

"Data connections have been disabled". 

Then there is a button to "Enable Content".

If I don't click the "Enable Content" button and I try to import a new data set by right-clicking and choosing "Refresh", I then get the following warning:

"You are connecting to an external data source. Do you want to continue? Connections to external data sources can be used to access confidential information, or to cause harm to your computer. If you do not fully trust the source of this file, click Cancel."

Can someone let me know what this external data source is?

When I looked in the VBA editor I see the information in the screenshot below. As you can see it contains a password. Can anyone let me know what this means? Am I actually connecting to an external database by using this VBA?

Really appreciate any help.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Vijay A. Verma 104.8K Reputation points Volunteer Moderator
2017-11-08T18:52:30+00:00

Glad to know that this solved your problem. Request you to mark it as answered so that the question no longer remains open and others can also benefit from the answer.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

11 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-11-07T02:28:45+00:00

    Ok great - thanks so much for your help. I really appreciate it.

    Sorry - why do I get the "Data connections have been disabled" warning when I open the file and can this be permanently removed?

    Was this answer helpful?

    0 comments No comments
  2. Vijay A. Verma 104.8K Reputation points Volunteer Moderator
    2017-11-07T02:22:33+00:00

    VBA code is not making a connection.

    If you go to data tab > Click on Queries and Connection > You will be displayed with the connection which you can double click and open > if you go under Definition tab, you will find the location of Connection File.

    If you go into Used In tab, you will see that it populates A1:AQ100 range.

    To Run this Query, you need to press Refresh All in Data tab. (But the definition file should be available on your computer)

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2017-11-07T02:15:44+00:00

    Thanks for the reply,

    Are you able to take a look at the file at the following link:

    https://drive.google.com/file/d/1V8UXKGc3o4FQZBXn481say1riVslfB8l/view?usp=sharing

    Was this answer helpful?

    0 comments No comments
  4. Vijay A. Verma 104.8K Reputation points Volunteer Moderator
    2017-11-07T01:55:09+00:00

    This requires the study of your VBA code to pinpoint the exact answer. Could you please upload a sample workbook sans confidential data to Onedrive / Googledrive / Box / Dropbox or any other file host and share the link? It will help us to give prompt and high quality solution.

    Was this answer helpful?

    0 comments No comments