Solved

Excel macro - Remote data not accessible:

Posted on 2010-08-19
10
2,082 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
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 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 on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

773 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