ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   help hiding excel application (https://www.excelbanter.com/excel-programming/387640-help-hiding-excel-application.html)

[email protected]

help hiding excel application
 
I am using Visual Basics.NET to read data from an Excel file.
I am using the following code

Dim xlApp as Excel.Application
Dim xlBook as Excel._Worksheet

xlApp = CreateObject(Excel.Application)
xlBook = xlApp.WorkBooks.Open("path of Excel file")

------------------------------

This works fine but my problem is that if i open another Excel
document whilst my program is running the Excel document the program
has opened becomes visible to the user. If they then close Excel down
this closes down the document my program is using and causes errors.

Is there any way of stopping this?

Any help is much appreciated.

Kind Regards,

Tom Miller.


Jim Thomlinson

help hiding excel application
 
Give this a try...

xlApp.IgnoreRemoteRequests = True
--
HTH...

Jim Thomlinson


" wrote:

I am using Visual Basics.NET to read data from an Excel file.
I am using the following code

Dim xlApp as Excel.Application
Dim xlBook as Excel._Worksheet

xlApp = CreateObject(Excel.Application)
xlBook = xlApp.WorkBooks.Open("path of Excel file")

------------------------------

This works fine but my problem is that if i open another Excel
document whilst my program is running the Excel document the program
has opened becomes visible to the user. If they then close Excel down
this closes down the document my program is using and causes errors.

Is there any way of stopping this?

Any help is much appreciated.

Kind Regards,

Tom Miller.



[email protected]

help hiding excel application
 
On 18 Apr, 15:56, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
Give this a try...

xlApp.IgnoreRemoteRequests = True
--
HTH...

Jim Thomlinson



" wrote:
I am using Visual Basics.NET to read data from an Excel file.
I am using the following code


Dim xlApp as Excel.Application
Dim xlBook as Excel._Worksheet


xlApp = CreateObject(Excel.Application)
xlBook = xlApp.WorkBooks.Open("path of Excel file")


------------------------------


This works fine but my problem is that if i open another Excel
document whilst my program is running the Excel document the program
has opened becomes visible to the user. If they then close Excel down
this closes down the document my program is using and causes errors.


Is there any way of stopping this?


Any help is much appreciated.


Kind Regards,


Tom Miller.- Hide quoted text -


- Show quoted text -


That didn't work i'm afraid.


NickHK

help hiding excel application
 
What do you mean by "That didn't work" ?
If the user double-clicks on an Excel file, your instance of Excel will not
respond to the DDE request.
Assuming your instance is not visible, how is the user interacting with it ?

NickHK

wrote in message
oups.com...
On 18 Apr, 15:56, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
Give this a try...

xlApp.IgnoreRemoteRequests = True
--
HTH...

Jim Thomlinson



" wrote:
I am using Visual Basics.NET to read data from an Excel file.
I am using the following code


Dim xlApp as Excel.Application
Dim xlBook as Excel._Worksheet


xlApp = CreateObject(Excel.Application)
xlBook = xlApp.WorkBooks.Open("path of Excel file")


------------------------------


This works fine but my problem is that if i open another Excel
document whilst my program is running the Excel document the program
has opened becomes visible to the user. If they then close Excel down
this closes down the document my program is using and causes errors.


Is there any way of stopping this?


Any help is much appreciated.


Kind Regards,


Tom Miller.- Hide quoted text -


- Show quoted text -


That didn't work i'm afraid.




[email protected]

help hiding excel application
 
On 19 Apr, 05:17, "NickHK" wrote:
What do you mean by "That didn't work" ?
If the user double-clicks on an Excel file, your instance of Excel will not
respond to the DDE request.
Assuming your instance is not visible, how is the user interacting with it ?

NickHK

wrote in message

oups.com...



On 18 Apr, 15:56, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
Give this a try...


xlApp.IgnoreRemoteRequests = True
--
HTH...


Jim Thomlinson


" wrote:
I am using Visual Basics.NET to read data from an Excel file.
I am using the following code


Dim xlApp as Excel.Application
Dim xlBook as Excel._Worksheet


xlApp = CreateObject(Excel.Application)
xlBook = xlApp.WorkBooks.Open("path of Excel file")


------------------------------


This works fine but my problem is that if i open another Excel
document whilst my program is running the Excel document the program
has opened becomes visible to the user. If they then close Excel down
this closes down the document my program is using and causes errors.


Is there any way of stopping this?


Any help is much appreciated.


Kind Regards,


Tom Miller.- Hide quoted text -


- Show quoted text -


That didn't work i'm afraid.- Hide quoted text -


- Show quoted text -


When the app is loaded it populates textboxes on my main form with
data from the Excel file.
At this point the excel file is not visible
if a user then opens a different document in Excel by clicking on the
document in Explorer it loads the excel file and also displays the
file that is being used by my application.
I don't want the excel file that is being used by my application to be
visible to users.
They then have to keep excel open. If they close Excel the file is
closed down leaving my application unusable because the file has been
closed by the user which i don't want to be possible.

Hope this makes more sense.

Tom.


NickHK

help hiding excel application
 
Yes, that is what Jim's suggestion achieves.

NickHK

wrote in message
oups.com...
On 19 Apr, 05:17, "NickHK" wrote:
What do you mean by "That didn't work" ?
If the user double-clicks on an Excel file, your instance of Excel will

not
respond to the DDE request.
Assuming your instance is not visible, how is the user interacting with

it ?

NickHK

wrote in message

oups.com...



On 18 Apr, 15:56, Jim Thomlinson <James_Thomlin...@owfg-Re-Move-
This-.com wrote:
Give this a try...


xlApp.IgnoreRemoteRequests = True
--
HTH...


Jim Thomlinson


" wrote:
I am using Visual Basics.NET to read data from an Excel file.
I am using the following code


Dim xlApp as Excel.Application
Dim xlBook as Excel._Worksheet


xlApp = CreateObject(Excel.Application)
xlBook = xlApp.WorkBooks.Open("path of Excel file")


------------------------------


This works fine but my problem is that if i open another Excel
document whilst my program is running the Excel document the

program
has opened becomes visible to the user. If they then close Excel

down
this closes down the document my program is using and causes

errors.

Is there any way of stopping this?


Any help is much appreciated.


Kind Regards,


Tom Miller.- Hide quoted text -


- Show quoted text -


That didn't work i'm afraid.- Hide quoted text -


- Show quoted text -


When the app is loaded it populates textboxes on my main form with
data from the Excel file.
At this point the excel file is not visible
if a user then opens a different document in Excel by clicking on the
document in Explorer it loads the excel file and also displays the
file that is being used by my application.
I don't want the excel file that is being used by my application to be
visible to users.
They then have to keep excel open. If they close Excel the file is
closed down leaving my application unusable because the file has been
closed by the user which i don't want to be possible.

Hope this makes more sense.

Tom.





All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com