+ Reply to Thread
Results 1 to 4 of 4

Save as vba

  1. #1
    Registered User
    Join Date
    06-11-2013
    Location
    Panamá
    MS-Off Ver
    Excel 2007
    Posts
    8

    Save as vba

    Hi,

    I have a vba that copies one of the sheets of my workbook and makes a new workbook with that and then saves it with a specific name on a specific address.

    Since my users insist on renaming the folder where the macro saves or deleting the folder, I would like for the macro to save in the same address where the original file is.

    bello the code:

    Sheets("DATA").Select
    Sheets("DATA").Copy
    ChDir "C:\PIPELINE"
    ActiveWorkbook.SaveAs Filename:="C:\PIPELINE\PIPELINE-DATA.xlsx", FileFormat _
    :=xlOpenXMLWorkbook, CreateBackup:=False
    Windows("FORMULARIO PIPELINE CONSOLIDADO.xlsm").Activate
    Sheets("MENU").Select
    Windows("PIPELINE-DATA.xlsx").Activate
    ActiveWindow.Close
    ActiveWorkbook.Save
    ActiveWorkbook.Close

    thanks for any help you can provide

    regards

    CV

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Save as vba

    Please Login or Register  to view this content.
    Instead of:
    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Registered User
    Join Date
    06-11-2013
    Location
    Panamá
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Save as vba

    Thank you solus

  4. #4
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: Save as vba

    Glad I could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Templates - Forcing Save as rather than Save on first save
    By Spitinyari in forum Excel General
    Replies: 4
    Last Post: 04-26-2012, 11:32 AM
  2. Disable Save As and Save - enable Save via button
    By LampCommandr in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-07-2011, 05:42 PM
  3. disable save and saveas but have submit button to save file as work
    By briant97 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-04-2010, 12:32 PM
  4. How to diasble save and save as menu but allow a save button
    By hon123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2006, 04:55 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1