+ Reply to Thread
Results 1 to 7 of 7

want VB6 to edits Excel in background and not become visible when I open another excel file

  1. #1
    Zee
    Guest

    want VB6 to edits Excel in background and not become visible when I open another excel file

    I currently load an excel file using VB6 as below:


    Set oExcel = CreateObject("excel.application")
    Set oBook = oExcel.Workbooks.Open(sMyFile)
    Set oSheet = oBook.Sheets(1)

    oSheet.cells(1,1)=...

    I then proceed to manipulate the worksheet for a while.

    The Excel file doesn't show in Windows while it is doing its processing
    but obviously the process shows in the task manager under processes.

    If I know open another Excel file from Windows for general use (nothing
    connected to my VB6 application), The file above becomes visible and it
    is possible to edit the file. What is more if you then close the file
    above the VB6 loses the link to the file.

    Is it possible to open up my VB6 Excel file in a separate process so
    that if the user then wants to open another Excel file meanwhile the
    VB6 Excel file will not become visible?

    Any help really appreciated

    David


  2. #2
    Tom Ogilvy
    Guest

    Re: want VB6 to edits Excel in background and not become visible when I open another excel file

    In the instance of excel controlled by VB6, do

    oExcel.IgnoreRemoteRequests = True

    This should cause user initiated workbooks to open in a separate instance.


    --
    Regards,
    Tom Ogilvy



    "Zee" <zeidman@hotmail.com> wrote in message
    news:1132325637.869181.81730@g47g2000cwa.googlegroups.com...
    > I currently load an excel file using VB6 as below:
    >
    >
    > Set oExcel = CreateObject("excel.application")
    > Set oBook = oExcel.Workbooks.Open(sMyFile)
    > Set oSheet = oBook.Sheets(1)
    >
    > oSheet.cells(1,1)=...
    >
    > I then proceed to manipulate the worksheet for a while.
    >
    > The Excel file doesn't show in Windows while it is doing its processing
    > but obviously the process shows in the task manager under processes.
    >
    > If I know open another Excel file from Windows for general use (nothing
    > connected to my VB6 application), The file above becomes visible and it
    > is possible to edit the file. What is more if you then close the file
    > above the VB6 loses the link to the file.
    >
    > Is it possible to open up my VB6 Excel file in a separate process so
    > that if the user then wants to open another Excel file meanwhile the
    > VB6 Excel file will not become visible?
    >
    > Any help really appreciated
    >
    > David
    >




  3. #3
    Zee
    Guest

    Re: want VB6 to edits Excel in background and not become visible when I open another excel file

    Works great! Thanks a lot


  4. #4
    Michael D. Ober
    Guest

    Re: want VB6 to edits Excel in background and not become visible when I open another excel file

    Unfortunately this also causes excel to ignore ShellOpen requests when you
    double-click on an excel file.

    Mike Ober.

    "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    news:OAXmAOF7FHA.3544@TK2MSFTNGP09.phx.gbl...
    > In the instance of excel controlled by VB6, do
    >
    > oExcel.IgnoreRemoteRequests = True
    >
    > This should cause user initiated workbooks to open in a separate instance.
    >
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    >
    >
    > "Zee" <zeidman@hotmail.com> wrote in message
    > news:1132325637.869181.81730@g47g2000cwa.googlegroups.com...
    > > I currently load an excel file using VB6 as below:
    > >
    > >
    > > Set oExcel = CreateObject("excel.application")
    > > Set oBook = oExcel.Workbooks.Open(sMyFile)
    > > Set oSheet = oBook.Sheets(1)
    > >
    > > oSheet.cells(1,1)=...
    > >
    > > I then proceed to manipulate the worksheet for a while.
    > >
    > > The Excel file doesn't show in Windows while it is doing its processing
    > > but obviously the process shows in the task manager under processes.
    > >
    > > If I know open another Excel file from Windows for general use (nothing
    > > connected to my VB6 application), The file above becomes visible and it
    > > is possible to edit the file. What is more if you then close the file
    > > above the VB6 loses the link to the file.
    > >
    > > Is it possible to open up my VB6 Excel file in a separate process so
    > > that if the user then wants to open another Excel file meanwhile the
    > > VB6 Excel file will not become visible?
    > >
    > > Any help really appreciated
    > >
    > > David
    > >

    >
    >
    >





  5. #5
    Tom Ogilvy
    Guest

    Re: want VB6 to edits Excel in background and not become visible when I open another excel file

    I thought that was the point.

    --
    Regards,
    Tom Ogilvy

    "Michael D. Ober" <obermd.@.alum.mit.edu.nospam> wrote in message
    news:OULJNVH7FHA.640@TK2MSFTNGP10.phx.gbl...
    > Unfortunately this also causes excel to ignore ShellOpen requests when you
    > double-click on an excel file.
    >
    > Mike Ober.
    >
    > "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    > news:OAXmAOF7FHA.3544@TK2MSFTNGP09.phx.gbl...
    > > In the instance of excel controlled by VB6, do
    > >
    > > oExcel.IgnoreRemoteRequests = True
    > >
    > > This should cause user initiated workbooks to open in a separate

    instance.
    > >
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > >
    > >
    > > "Zee" <zeidman@hotmail.com> wrote in message
    > > news:1132325637.869181.81730@g47g2000cwa.googlegroups.com...
    > > > I currently load an excel file using VB6 as below:
    > > >
    > > >
    > > > Set oExcel = CreateObject("excel.application")
    > > > Set oBook = oExcel.Workbooks.Open(sMyFile)
    > > > Set oSheet = oBook.Sheets(1)
    > > >
    > > > oSheet.cells(1,1)=...
    > > >
    > > > I then proceed to manipulate the worksheet for a while.
    > > >
    > > > The Excel file doesn't show in Windows while it is doing its

    processing
    > > > but obviously the process shows in the task manager under processes.
    > > >
    > > > If I know open another Excel file from Windows for general use

    (nothing
    > > > connected to my VB6 application), The file above becomes visible and

    it
    > > > is possible to edit the file. What is more if you then close the file
    > > > above the VB6 loses the link to the file.
    > > >
    > > > Is it possible to open up my VB6 Excel file in a separate process so
    > > > that if the user then wants to open another Excel file meanwhile the
    > > > VB6 Excel file will not become visible?
    > > >
    > > > Any help really appreciated
    > > >
    > > > David
    > > >

    > >
    > >
    > >

    >
    >
    >




  6. #6
    Michael D. Ober
    Guest

    Re: want VB6 to edits Excel in background and not become visible when I open another excel file

    You need to remember to put in the line oExcel.IgnoreRemoteRequests = False
    before you issue oExcel.Quit. If you don't, you won't be able to
    double-click on an excel spreadsheet on your desktop and have excel open it.

    Mike Ober.

    "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    news:%23vNcOCI7FHA.3544@TK2MSFTNGP09.phx.gbl...
    > I thought that was the point.
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Michael D. Ober" <obermd.@.alum.mit.edu.nospam> wrote in message
    > news:OULJNVH7FHA.640@TK2MSFTNGP10.phx.gbl...
    > > Unfortunately this also causes excel to ignore ShellOpen requests when

    you
    > > double-click on an excel file.
    > >
    > > Mike Ober.
    > >
    > > "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    > > news:OAXmAOF7FHA.3544@TK2MSFTNGP09.phx.gbl...
    > > > In the instance of excel controlled by VB6, do
    > > >
    > > > oExcel.IgnoreRemoteRequests = True
    > > >
    > > > This should cause user initiated workbooks to open in a separate

    > instance.
    > > >
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > >
    > > >
    > > > "Zee" <zeidman@hotmail.com> wrote in message
    > > > news:1132325637.869181.81730@g47g2000cwa.googlegroups.com...
    > > > > I currently load an excel file using VB6 as below:
    > > > >
    > > > >
    > > > > Set oExcel = CreateObject("excel.application")
    > > > > Set oBook = oExcel.Workbooks.Open(sMyFile)
    > > > > Set oSheet = oBook.Sheets(1)
    > > > >
    > > > > oSheet.cells(1,1)=...
    > > > >
    > > > > I then proceed to manipulate the worksheet for a while.
    > > > >
    > > > > The Excel file doesn't show in Windows while it is doing its

    > processing
    > > > > but obviously the process shows in the task manager under processes.
    > > > >
    > > > > If I know open another Excel file from Windows for general use

    > (nothing
    > > > > connected to my VB6 application), The file above becomes visible and

    > it
    > > > > is possible to edit the file. What is more if you then close the

    file
    > > > > above the VB6 loses the link to the file.
    > > > >
    > > > > Is it possible to open up my VB6 Excel file in a separate process so
    > > > > that if the user then wants to open another Excel file meanwhile the
    > > > > VB6 Excel file will not become visible?
    > > > >
    > > > > Any help really appreciated
    > > > >
    > > > > David
    > > > >
    > > >
    > > >
    > > >

    > >
    > >
    > >

    >
    >
    >





  7. #7
    Bob Butler
    Guest

    Re: want VB6 to edits Excel in background and not become visible when I open another excel file

    "Michael D. Ober" <obermd.@.alum.mit.edu.nospam> wrote in message
    news:OULJNVH7FHA.640@TK2MSFTNGP10.phx.gbl
    > Unfortunately this also causes excel to ignore ShellOpen requests
    > when you double-click on an excel file.
    >
    > Mike Ober.
    >
    > "Tom Ogilvy" <twogilvy@msn.com> wrote in message
    > news:OAXmAOF7FHA.3544@TK2MSFTNGP09.phx.gbl...
    >> In the instance of excel controlled by VB6, do
    >>
    >> oExcel.IgnoreRemoteRequests = True
    >>
    >> This should cause user initiated workbooks to open in a separate
    >> instance.


    I knew it was too good to be true. It' a royal pain when an app that has
    been running for several minutes building a report is killed by a user
    opening an unrelated excel document and then closing it.

    --
    Reply to the group so all can participate
    VB.Net: "Fool me once..."


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1