Solved

Excel macro - Remote data not accessible:

Posted on 2010-08-19
10
2,000 Views
Last Modified: 2012-05-10
I have a macro (in ThisWorkbook that uses application.onTime) that opens a macro in module1 at a certain time. This macro should open two other excel workbooks but I get this message:

Remote data not accessible:
To access this data Excel needs to start another application. Some legitimate applications on your computer could be used maliciously to spread viruses or damage your computer. Only click Yes if you trust the source of theis workbook and you want to let the workbook start the application. Start application 'IT.EXE'?  YES NO

Is there a way to automatically say "YES"

The macro works fine without the autotimer.

Thanks,
CC
0
Comment
Question by:CC10
  • 5
  • 4
10 Comments
 
LVL 19

Expert Comment

by:Bardobrave
ID: 33473443
Sadly there's no way to bypass this security check from code. If it could be so, viruses will use it to bypass the protection, making it totally useless.

Maybe there's a way to include your macro in a "trusted programs" list inside windows?
0
 

Author Comment

by:CC10
ID: 33473525
Does this mean that you cannot set macros to open workbooks at specific times anymore? The other two workbooks are in the same folder on the hard drive. As said, the macro works fine if you manually run it.
0
 
LVL 13

Expert Comment

by:MWGainesJR
ID: 33474484
can you post your code?
0
 

Author Comment

by:CC10
ID: 33475058
Here we go:
This is in the ThisWorkbook section

Private Sub Workbook_Open()

Application.OnTime TimeValue("11:24:00"), "CopyRowsByDateRun_ALL"

End Sub

This is in Module2:

Sub CopyRowsByDateRun_ALL()
   
         Workbooks.Open Filename:= _
        "C:\CiceroTradingSystem_2010\datacollection\Cicerocollect.xlsm", UpdateLinks:=xlUpdateLinksAlways

    Workbooks.Open Filename:= _
        "C:\CiceroTradingSystem_2010\datacollection\Cicerocollect2.xlsm", UpdateLinks:=xlUpdateLinksAlways
End Sub
0
 
LVL 13

Accepted Solution

by:
MWGainesJR earned 250 total points
ID: 33475160
try this and see if works.....if it does, your problem is the updatelinks......
Workbooks.Open("C:\CiceroTradingSystem_2010\datacollection\Cicerocollect.xlsm")
Workbooks.Open("C:\CiceroTradingSystem_2010\datacollection\Cicerocollect2.xlsm")

0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:CC10
ID: 33475343
Yes that works. Thanks.

The two workbooks are connected to a datasource via a DDE link. It was many years ago but I think sometimes the link did not update. So that was why we inserted the Updatelinks code.  Is that code out of date now?
0
 
LVL 13

Expert Comment

by:MWGainesJR
ID: 33475408
I'm not sure......I usually toggle external links options....
0
 

Author Comment

by:CC10
ID: 33475479
I don't know what that means.
Basically my structure consists of a downloading data into some Excel workbooks that create a trading system. The signals are automatically sent via e-mail. It all works fine manually and used to work automatically but that was a few years ago. I am now trying to get it to work again. It is clear that the links must update efficiently.
Do you want me to close this question as solved and ask a new one about the updates?
0
 
LVL 13

Expert Comment

by:MWGainesJR
ID: 33475510
Go into Excel options and look for the external links options....if that doesn't answer your question, then sure, start another one.
0
 

Author Closing Comment

by:CC10
ID: 33475537
Thanks for you help.CC
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now