Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Making a [semi] Dictator Application: Hiding Main Command Bar? | Excel Discussion (Misc queries) | |||
Hiding Column Also hiding text | Excel Programming | |||
hiding application | Excel Discussion (Misc queries) | |||
macro to close excel application other than application.quit | Excel Programming | |||
hiding / displaying the excel application window | Excel Programming |