Solved

Blocking the use of Excel

Posted on 1998-11-11
2
171 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

828 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