Solved

Excel macro - Remote data not accessible:

Posted on 2010-08-19
10
1,896 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
Comment Utility
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
Comment Utility
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
Comment Utility
can you post your code?
0
 

Author Comment

by:CC10
Comment Utility
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
Comment Utility
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

by:CC10
Comment Utility
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
Comment Utility
I'm not sure......I usually toggle external links options....
0
 

Author Comment

by:CC10
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks for you help.CC
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
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 …
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

763 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

12 Experts available now in Live!

Get 1:1 Help Now