Solved

Blocking the use of Excel

Posted on 1998-11-11
2
148 Views
Last Modified: 2010-04-30
My application uses CreateObject("Excel.Application") to create an Excel object with is then used to write data to a number of workbooks.  The problem is when someone double clicks on a .XLS workbook it is opened in my copy of excel.  I don't want this to happen.  My currect solution involves my application determining if there are more workbooks open than it expects and if there are the unwanted workbook is opened in its own copy.  This works for most cases, but if the user attempts to open the same workbook twice My copy of excel displays a dialog (as two copies of the workbook are open) forcing my copy to be visable.  Any ideas anybody.  Thanks.
0
Comment
Question by:wiffen
2 Comments
 
LVL 1

Accepted Solution

by:
pmteixeira earned 70 total points
ID: 1444339
Hi wiffen,

supposing you have:

   Dim e As Excel.Application

   Sub xxx()
      Set e = CreateObject("Excel.Application")
                      ' why don't you use Set e = new Excel.Application ????

                     ' try adding this line
      e.IgnoreRemoteRequests = False
End Sub


Hope this helps,

PMT
0
 

Author Comment

by:wiffen
ID: 1444340
Thank you ever so much that seems to work perfectly.  It was one of those annoying thing where you know there must be a simple solution but there is no easy way to find it out.  I'm very grateful for your help.  (I agree why do we use Set e = new Excel.Application?)
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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

861 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

25 Experts available now in Live!

Get 1:1 Help Now