Consulting

Results 1 to 5 of 5

Thread: Active Sheet Save As???

  1. #1
    VBAX Regular
    Joined
    Jan 2005
    Posts
    38
    Location

    Active Sheet Save As???

    I did do the search, actually twice... . But couldnt find the answer...
    I want a command button click to save te sheet in C:Siirrettavat\Verot.xls

    What is the exact code and does it still ask if you want to owerwrite an existing file?

    Easy question, but new for me..

    Thanks

    -erin-

  2. #2
    Knowledge Base Approver
    The King of Overkill!
    VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Hi Erin,

    To save just the activesheet, you could use code like:


    Application.ScreenUpdating = False
    ActiveSheet.Copy
    'Application.DisplayAlerts = False
    ActiveWorkbook.SaveAs "C:\Siirrettavat\Verot.xls"
    'Application.DisplayAlerts = True
    ActiveWorkbook.Close
    Application.ScreenUpdating = True

    What it is doing is copying the activesheet to its own workbook, then saving that. It will prompt you to overwrite an existing file; if you want that prompt gone then un-comment the "Application.DisplayAlerts" lines

    Matt

  3. #3
    VBAX Regular
    Joined
    Jan 2005
    Posts
    38
    Location
    Thanks for helping me, did just what I wanted

  4. #4
    Knowledge Base Approver
    The King of Overkill! VBAX Master
    Joined
    Jul 2004
    Location
    Rochester, NY
    Posts
    1,727
    Location
    Glad to hear
    Just so you know, you can help cleanup this site by marking this thread as Solved (it will also prevent other people from coming into this question to see if you still need help). Go to Thread Tools at the top of the page, and choose Mark Solved.
    Let me know if you need any more help!

  5. #5
    VBAX Regular
    Joined
    Jan 2005
    Posts
    38
    Location


    Thanks again.. You are the man in my life...
    I'm turning grey over this woorkbook...

    Goodnight

    -e-

Posting Permissions

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