?
Solved

Blocking the use of Excel

Posted on 1998-11-11
2
Medium Priority
?
196 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
pmteixeira earned 280 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
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…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 19 hours left to enroll

777 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