Consulting

Results 1 to 6 of 6

Thread: New to this Board....looking for some macro help

  1. #1
    VBAX Regular cmefly's Avatar
    Joined
    Jan 2005
    Location
    Toronto, Canada
    Posts
    18
    Location

    Unhappy New to this Board....looking for some macro help

    Hi

    After running the following Macro twice, I get the message: "do you want to replace the file?"...

    how do i alter the following so that it just saves without asking questions of replacing....?

    sub saving () 
    ThisWorkbook.SaveAs ("c:\Datafetcher.xls") 
    end sub

    cmefly

  2. #2
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Hi,

    Try this:

    sub saving () 
        application.displayalerts = false
       ThisWorkbook.SaveAs ("c:\Datafetcher.xls") 
     application.displayalerts = true
    end sub
    HTH,
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  3. #3
    VBAX Regular cmefly's Avatar
    Joined
    Jan 2005
    Location
    Toronto, Canada
    Posts
    18
    Location
    Thanks Ken....works like a charm!

  4. #4
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    Oh, and Cmefly,

    Welcome to VBAX!

    I've edited your post above to use the VBA tags designed by our very own Mark007. See how they make your code look? You can try it out when your posting your next question. (Just click the green & white VBA box in the posting screen.)

    Cheers!
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  5. #5
    VBAX Regular cmefly's Avatar
    Joined
    Jan 2005
    Location
    Toronto, Canada
    Posts
    18
    Location
    very nice...i'll give a shot on my next question...

  6. #6
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Welcome cmefly! And congrats on getting married soon!

Posting Permissions

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