Results 1 to 15 of 15

Thread: [Resolved] favor needed - XL App wont become visible

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046

    [Resolved] favor needed - XL App wont become visible

    I have an app that isnt working on a client's box (he is using W98 and Excel 98). One part of the app opens an existing XL spreadsheet. It works fine on my XP system, but the spreadsheet never becomes visible on his W98/XL98 box.

    Can someone please test the following on a W/98/XP98 machine and tell me if the spreadsheet opens and becomes visible (I have no idea why it wouldnt). All you need is a ref to excel09.olb and an existing dummy spreadsheet to test.

    Thanks in advance.

    VB Code:
    1. Private Sub Command1_Click()
    2.     Dim objXL As New Excel.Application
    3.     Dim objWB As Excel.Workbook
    4.     Set objWB = objXL.Workbooks.Open("c:\tst.xls")
    5.     objXL.Visible = True
    6.     Set objXL = Nothing
    7.     Set objWB = Nothing
    8. End Sub
    Last edited by Muddy; May 13th, 2003 at 12:23 PM.

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    It might not be the code. There may be a hidden instance of Excel
    already running on the 98 system. Check the task manager for
    Excel and close it, or to be sure reboot the system. Then run your
    code again.

    I have come accross this issue when I am debugging and I stop.
    The Excel object does not close when you stop debugging. Then
    when I run again Excel does not appear. This is only when I have
    Excel set to Visible = False.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    Originally posted by RobDog888
    It might not be the code. There may be a hidden instance of Excel
    already running on the 98 system. Check the task manager for
    Excel and close it, or to be sure reboot the system. Then run your
    code again.

    I have come accross this issue when I am debugging and I stop.
    The Excel object does not close when you stop debugging. Then
    when I run again Excel does not appear. This is only when I have
    Excel set to Visible = False.
    Yes, that has happened to me before. This is on a client's box. I already had him shut down all instances of Excel and try it again .. no help .

    Thanks for the reply ...

  4. #4

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    Originally posted by Muddy
    Yes, that has happened to me before. This is on a client's box. I already had him shut down all instances of Excel and try it again .. no help .

    Thanks for the reply ...
    then again .. i didnt have him try on a fresh boot .. ill ask him to try that tomorrow ..t hanks

  5. #5
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Does the user have Excel visible at all? Does it open Excel, but
    not the workbook?

    You refer to Excel 98 but excel09.olb is for 2K isn't it?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  6. #6

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    Originally posted by RobDog888
    Does the user have Excel visible at all? Does it open Excel, but
    not the workbook?
    it does everything except make the app visible

    Originally posted by RobDog888

    You refer to Excel 98 but excel09.olb is for 2K isn't it?
    I dunno ... I got the olb off his box and he is running W98 ... honestly I cant remember which version of XL he has XL97 or XL98 (was there even an XL98?) ...

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    There was a Outlook 98, but Excel only had ??, 97, 2K, XP, and 2003.

    excel09.olb is a file that gets created when you create an installation package. This file is for Excel 2K.

    How do you know it does everything, but make the app visible.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    Originally posted by RobDog888
    There was a Outlook 98, but Excel only had ??, 97, 2K, XP, and 2003.

    excel09.olb is a file that gets created when you create an installation package. This file is for Excel 2K.

    How do you know it does everything, but make the app visible.
    Ill try it again with Excel08 if the reboot doesnt help. Hes been running this for quite awhile now with no problems up till now. I just added a new routine and cant seem to get the wb to be visible (for the new routine only).

    I believe it does everything except make th app visible, cause it runss withoiut error and leaves an instance of EXCEL.exe running.

    Thanks for all the help, btw ...

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    Try adding some logging to your code. Write it out to a text file to
    trace what is happening and what the variable values are at
    each point. This will definately help to se what is going on.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    Lively Member
    Join Date
    Mar 2003
    Posts
    68
    Would the DCOM settings have an effect in 98???

    I have seen this with a VBScript from a web page, where the app gets loaded under a different user account to the logged in user, and therefore doesn't appear. This was on Windows 2000, so I don't know how that will relate to 98. The solution for me was to run DCOMCNFG and to change the "Microsoft Excel Application" properties to "Identity / Interactive User".

  11. #11
    Fanatic Member Armbruster's Avatar
    Join Date
    Sep 2002
    Location
    Maryland Heights, MO
    Posts
    857
    Muddy,

    I don't have a Win98 box handy, but I will check it on a Win95 XL97 machine tomorrow. Excel 97 uses the Excel 8.0 Object Library. I don's see anything wrong with your code, but I will test it tomorrow.
    "Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!

    Resistance is futile, you will be compiled . . . Please!

  12. #12
    Frenzied Member ae_jester's Avatar
    Join Date
    Jun 2001
    Location
    Kitchener Ontario Canada Earth
    Posts
    1,545
    I'm afraid I can't help you out, but I have a wierd problem and wouldn't mind any of the Excel experts to try and solve this one.

    Whenever I open excel, from code or regularly, a worksheet opens up "Personal.xls" every single time (only on my computer). Personal.xls is the name of the default macro worksheet isn't it??? How do I stop this from happening?

  13. #13
    Fanatic Member Armbruster's Avatar
    Join Date
    Sep 2002
    Location
    Maryland Heights, MO
    Posts
    857
    If you have ever saved a macro in the personal workbook, personal.xls is created. Even if you delete the modules in personal.xls, it will be loaded whenever you start excel. The solution? Search for personal.xls and delete it!

    If you prefer, start excel first and verify that you don't have any codes saved in personal.xls before deleting. The workbook won't be created again until you save a macro there.
    "Look! Up in the sky! It's a bird! It's a plane! It's Diaper-Head Boy! (there by my name!) Yes, Diaper-Head Boy, who disguised as my son, Seth, fights a never-ending battle for truth, justice and terrorizing my house!

    Resistance is futile, you will be compiled . . . Please!

  14. #14

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    ok, i stuck in some msgboxes and found a problem with a sort statement (xl method). So no need to run the code i posted ... Thanks!

  15. #15

    Thread Starter
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    The problem was a sort statement. I wasnt explicity providing the sort Key to the call. XP was OK with this, but 97 barfed. I got the same behavior with both early and late binding.

    Apparently when XL barfs while being programatically manipulated, the instance of excel.exe stays active even after the object is set to Nothing (I saw this in another problem also). A hard error is NOT necessarily generated.

    Thanks for all the replies!
    Last edited by Muddy; May 13th, 2003 at 12:25 PM.

Posting Permissions

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



Click Here to Expand Forum to Full Width