Solved

Excel macro - Remote data not accessible:

Posted on 2010-08-19
10
2,340 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

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
 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

688 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