Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Lewes, East Sussex, Sussex, United Kingdom
    Posts
    232
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Excel Automation question

    <img src=/S/question.gif border=0 alt=question width=15 height=15> I'm sure this is a straightforward one, but here goes anyway. I'm using A97 to update an Excel 97 spreadsheet. I want the sheet to be hidden while the updating is done, and then saved. When the user opens the sheet I want the workbook to be visible...but it isn't. I have to Windows/Unhide... to make it visible. Any idea why this code does not work :

    Set objXLApp = New Excel.Application
    Set objXLBook = objXLApp.Workbooks.Open("k:crewharareoffice.xls")
    ...
    The updating bit of code
    ...
    objXLSheet.Visible = True
    objXLBook.Application.Visible = True
    objXLBook.Save
    objXLBook.Application.Quit

    Thanks for your help

    Nick

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Tennessee
    Posts
    194
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Excel Automation question

    you might could try this i'm using access 2000
    but it might work in 97 i don't really know but i thought it might help
    Set objXLBook = objXLApp.Workbooks.Open("k:crewharareoffice.xls", vbMaximizedFocus)
    HTH

  3. #3
    DAW
    Guest

    Re: Excel Automation question

    How about:-
    objXLApp.visible = True

    instead of:-
    objXLBook.Application.Visible = True

    .....that's the way I always do it anyway.

    Dave.

Posting Permissions

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