Solved

Blocking the use of Excel

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

786 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