Results 1 to 8 of 8

Thread: another excel prob!!!!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    I have managed to open excel through VB 6, managed to select cells. Now I need to save it!! When I try to do it, it comes up with the save changes box. Can I automatically set this to yes?

    Nick

  2. #2
    Lively Member xhomerx's Avatar
    Join Date
    Feb 2001
    Posts
    98
    Application.DisplayAlerts = False

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    application.saveworkbook come up with an error saying you can't save it under the same name as it was opened!!!!

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    can anyone help????

  5. #5
    Addicted Member
    Join Date
    Oct 2000
    Location
    Vienna/Austria
    Posts
    132
    Hi nswan !!!

    to save a already saved workbook use

    Code:
    objExcel.workbooks("myworkbook").save
    to save a new one

    Code:
    'avoid any still exist message and filesavas
    popups
    objexcel.displayalerts = false
    'save the workbook
    objExcel.workbooks("myworkbook").saveas "c:\temp\hugo.xls"
    -cu TheOnly

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    i'll love you forever. just when i had given up all hope as well!

    Thanks
    Nick

  7. #7
    Addicted Member atif's Avatar
    Join Date
    Jan 2001
    Location
    New Jersey, USA
    Posts
    149

    OR......

    Code:
    Application.SaveChanges = True

    OR IF YOU WANNA CLOSE IT AFTER SAVING IT THEN


    Code:
    ActiveWindow.Close savechanges:=True
    Atif AKA AK
    VB 5.0
    VB 6.0 Professional
    VBA, Macros, JAVA, C++

  8. #8
    Member
    Join Date
    Dec 2000
    Location
    Ottawa
    Posts
    49
    activewindow.close(1)
    hmmm... Me thinks me go home now... I've been working to hard...

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