Save a File to a Specific location Using a Macro in Excel

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ธ.ค. 2024

ความคิดเห็น • 220

  • @thres34
    @thres34 6 ปีที่แล้ว +4

    You deserve a place in heaven , many thanks for you video

  • @jonnyjbrown87
    @jonnyjbrown87 3 ปีที่แล้ว

    You've made my year. Thank you!

  • @salserokorsou
    @salserokorsou 4 ปีที่แล้ว

    Thank You lady!!!
    This is the one I've been looking for!

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว +1

      Glad it was helpful!

    • @salserokorsou
      @salserokorsou 4 ปีที่แล้ว

      @@BarbHendersonconsulting do you have a one click macro how to save as PDF somewhere laying around maybe? 👀😁

  • @cambaz1000
    @cambaz1000 4 ปีที่แล้ว

    Thanks a lot Barbara for this video. I used it. perfect lob.

  • @ashwind3966
    @ashwind3966 4 ปีที่แล้ว +1

    Hi Barb,
    I have used the same code as u mentioned, however the code / step for Saveas is getting debugged. Can you please advise why

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว +1

      did you include the "/" at the end of your path

    • @ashwind3966
      @ashwind3966 4 ปีที่แล้ว

      @@BarbHendersonconsulting Thanks Barb. I wasn't including that. This should work now... thanks again :)

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว

      no problem!

  • @ivanpap634
    @ivanpap634 5 ปีที่แล้ว +3

    Really helpful and interesting! Is it possible to save in 2 differents path according to a specific cell value (path1 or path2)?

  • @RicardoFlores_Senior
    @RicardoFlores_Senior 5 ปีที่แล้ว

    Excellent instructive video! I followed the steps and I got the Save button working in a matter of minutes. Thank you.

  • @brodyharrison6029
    @brodyharrison6029 3 ปีที่แล้ว

    Thank you! The key for me was adding the .txt after the file name.

  • @alanjmcgibbon
    @alanjmcgibbon 5 ปีที่แล้ว +1

    I really like how straightforward this is. So much so that I’ve subscribed for more. However I have a problem with the macro. When I run it I finish up with a line highlighted in yellow. The line in question starts “ActiveWorkbook.SaveAs” and the message on screen is “Run-time error ‘1004’ Method ‘SaveAs’ of object ‘_Workbook’ failed. I am using Excel 2016. Can I please have a solution as the macro is perfect for the sheet I’m preparing.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  5 ปีที่แล้ว

      on your path check that you have a closing "\" That is the normal cause of this error

    • @alanjmcgibbon
      @alanjmcgibbon 5 ปีที่แล้ว

      Thank you for the quick response. I placed the back slash at the end of the line after the expression “FileFormat:=xlOpenXMLWorkbook”and upon debugging I receive the message “Compile Error: Syntax error”. Have I put it in the wrong place?

    • @alanjmcgibbon
      @alanjmcgibbon 5 ปีที่แล้ว

      Sorry I misread your reply. I do have a back slash at the end of the line beginning path =

    • @kylegurney8610
      @kylegurney8610 ปีที่แล้ว

      @@alanjmcgibbon did you end up figureing this out? I have the same problem

  • @krishnajagadeesh6307
    @krishnajagadeesh6307 5 ปีที่แล้ว

    I am your subscriber I support your channel thank you

  • @9986915565
    @9986915565 4 ปีที่แล้ว

    I need your guidance here to copy the latest file in a folder and paste it in another path. Can you please help me on this..

  • @thairalazawy6835
    @thairalazawy6835 4 ปีที่แล้ว

    thank you for the efforts it was very clear example

  • @cajyfernandes6708
    @cajyfernandes6708 2 ปีที่แล้ว

    Beautiful Thank you 🔥🔥🔥😎

  • @mf-wg1qi
    @mf-wg1qi 4 ปีที่แล้ว +1

    Just noticed that the coding in description section is missing the term ".Text" from line "filename1 = Range("C4")" and two extra pasted in text "FileFormat:=xlOpenXMLWorkbook"

  • @knotdavewalker
    @knotdavewalker 2 ปีที่แล้ว

    The information I need for a file name is in 2 cells, name and invoice number, how do I put the 2 cell ranges together for a file name? Good video very clear. Thank you

  • @alisazahra9664
    @alisazahra9664 4 ปีที่แล้ว

    Hi mam. I have a question.. how to save as workbook from another workbook.

  • @mahmartins7602
    @mahmartins7602 4 ปีที่แล้ว

    What if the paths are from a list that you need to loop from? Different files names into different paths that will loop from a list?

  • @aasastephenson1538
    @aasastephenson1538 4 ปีที่แล้ว

    Awesome breakdown! You should be a teacher! Nice video!😀

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว

      I have taught software for many years. Check out my free webinar tomorrow. www.crowdcast.io/e/excel-beyond-the-basics

  • @arthurparas2911
    @arthurparas2911 2 ปีที่แล้ว

    Hey Barb great video thank you so much, is there any way to have the save as file name from two cells instead of one?

  • @firstgatebusinessservicequ6381
    @firstgatebusinessservicequ6381 3 ปีที่แล้ว

    Very useful thanks. When I use this code it's work properly. but my saved macro file macros is not working. what kind of changes need to that. Kindly replay as soon as possible.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  3 ปีที่แล้ว

      when you save a file with a macro in it, the file extension changes to .xlsm If you save it as a .xlsx the macro will be lost

  • @govindchoudhari8629
    @govindchoudhari8629 3 ปีที่แล้ว

    That's great...
    It works perfectly but the only thing is I also want to break all the links after save as the file. Is it possible ?

  • @mohammadtahir1217
    @mohammadtahir1217 6 ปีที่แล้ว

    Bundle of thanks. It turn my hour work to minutes. thanks again

  • @ashlenm3971
    @ashlenm3971 5 ปีที่แล้ว

    Hi Barb,
    I’m able to convert an excel sheet, save it & email it. But, my issue is I don’t know how to send it to someone else for someone to input information, use the macro to send it back. It has my C drive on it. Is there a way to put in a drive that converts when someone else opens it?

  • @doomandgooner
    @doomandgooner 2 ปีที่แล้ว

    Thankyou this is really helpful but what if I wanted the file format to be csv?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 ปีที่แล้ว

      I am not sure, have never tried CSV

    • @graywolfweb1361
      @graywolfweb1361 2 ปีที่แล้ว

      Hello. I believe you just replace
      ActiveWorkbook.SaveAs Filename:=path & filename1 & ".xlsx", FileFormat:=xlOpenXMLWorkbook
      with
      ActiveWorkbook.SaveAs Filename:=path & filename1 & ".csv", FileFormat:=xlCSV

  • @paulasamson3191
    @paulasamson3191 6 ปีที่แล้ว

    Excellent - very clear instructions given at a good pace.

  • @lukemartin7029
    @lukemartin7029 4 ปีที่แล้ว

    Are you able to export an Excel sheet to save as a XML file via macro?
    I have a macro for copying and pasting data from one sheet into another sheet where I have columns that are XML Sourced set up how an application I'm using will accept them. I currently run the macro to copy and paste one batch of records at a time into the sheet then have to hit Export and name the files (1, 2, 3 etc.). My macro removes the batch of entries and copies in the next set. If a macro could export and name the file the next number in sequence that would be great.

  • @pvaldeben01
    @pvaldeben01 6 ปีที่แล้ว

    Worked for me. I gt stuck on the difference between xlsm and xlsx. But i'm all good now. Than you for creating this video.

  • @cmlosaria
    @cmlosaria 4 ปีที่แล้ว

    you deserve more subs!

  • @amarkardile7185
    @amarkardile7185 5 ปีที่แล้ว

    Madam how to capy sheet2 in specific folder and path with cells name using userform..??

  • @AKaushal49
    @AKaushal49 4 ปีที่แล้ว

    Hello Barb
    Video is really helpful..thanks for sharing it.
    Can you please share the code if the file in the designated path is already there...how to display the option to save it again with different name???
    Pls help me with this.
    Thanks

  • @Laxmanmane007
    @Laxmanmane007 5 ปีที่แล้ว

    Hi Barb just joined to your channel please also make video on power bi eagerly waiting for power bi series video

  • @dhirendranathmandal6949
    @dhirendranathmandal6949 2 ปีที่แล้ว

    Please make a video for VBA to Save a specific Excel sheet using data from cells & single click

  • @Rollotollo100
    @Rollotollo100 5 ปีที่แล้ว

    Hi. What do I need to change in this code that the original excel stays active? Right now it automatically opens the saved excel and I dont want it to become active. I mean if I want to continue editing the original excel file.

  • @riteshmishra69
    @riteshmishra69 6 ปีที่แล้ว +1

    Love it!really very helpful👍thanx!

  • @aniruddharaje229
    @aniruddharaje229 6 ปีที่แล้ว +1

    Thank you so much for uploading this video.. It helped me a lot...

  • @Mattjd07
    @Mattjd07 6 ปีที่แล้ว

    does this work with a multiple worksheet workbook?
    do you have to define which worksheet your using or is it associated with the command button ?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว

      to be safe I would specify the worksheet.

    • @MT4LYF
      @MT4LYF 6 ปีที่แล้ว

      Mat - i did mine on 5 sheets of a workbook and it saved the whole workbook

    • @BaStriker
      @BaStriker 6 ปีที่แล้ว

      @@BarbHendersonconsulting Please advise how to select a particular worksheet to save. Currently it's saving the whole workbook which has 4 sheets. I want it to save only a particular sheet.

  • @markdeboer8696
    @markdeboer8696 ปีที่แล้ว

    I also can use this on a button?

  • @jeevab9273
    @jeevab9273 5 ปีที่แล้ว

    Great work barb your videos are awesome
    I have doubt in the code line active workbook saveas file name
    So here my doubts if its possible how we can save in PDF format or any other format
    Is there any changes in the code???

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  5 ปีที่แล้ว

      ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, filename:= _
      path + filename, _
      Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
      :=False, OpenAfterPublish:=False

  • @JohnRyanGarcia-m5q
    @JohnRyanGarcia-m5q 2 หลายเดือนก่อน

    can you save photo too?

  • @jerrymerritt1367
    @jerrymerritt1367 5 ปีที่แล้ว

    I am having a hard time writing a save button macro for the data in a worksheet and saving it to different files based on the value in one cell. If the value changes it saves the data into another file. I have 23 different files the data could be saved to based on the value of that one cell.

  • @kamrulzoha9223
    @kamrulzoha9223 6 ปีที่แล้ว +1

    From long time I want to find the way how to save as file with a cell reference
    I mean
    I copy and paste the path in Sheet 2, R1C1
    And I want to save my Sheet 1 content as PDF.
    How I can make this ?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว +2

      I have a video for that th-cam.com/video/SvtfY_LqCtM/w-d-xo.html

    • @salserokorsou
      @salserokorsou 4 ปีที่แล้ว

      @@BarbHendersonconsulting And just like that going through the comment I find the next one I need! :D

  • @djsameero
    @djsameero ปีที่แล้ว

    Can we save the worksheet to SharePoint using Macro. I have a macro which sends out an email with the content of the sheet but I also want it to save a copy on Sharepoint site. Is that possible?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  ปีที่แล้ว

      You will be able to send to SharePoint but you will not be able to run on SharePoint

  • @ianwillson2576
    @ianwillson2576 2 ปีที่แล้ว

    I tried copying this format, not on a new Invoice but a method statement. I got the XL sheet to save to a random file, but the file was called General and not the File name that I assigned to it. Any ideas what I have done wrong

  • @jaquelineassis2218
    @jaquelineassis2218 3 ปีที่แล้ว

    Hi Barb! I've played with your teachings but I couldn't figure out a way to combine them. I'd like to have a master PO file that increases the number by 1 when I open it, then, after I input the data, I'd like to have a button to save the workbook to a specific location, then clear the contents of the master PO and have it ready for next time. Any way to do it?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  3 ปีที่แล้ว +1

      The code to increase the number would be located on the worksheet.
      You would then have to write code to copy and save the worksheet to a specific location and once it is save you would have to clearcontents to the worksheet but the worksheet would have to closed and opened again to achieve a new number.

    • @jaquelineassis2218
      @jaquelineassis2218 3 ปีที่แล้ว

      @@BarbHendersonconsulting Thank you! Makes sense.

  • @joesmith5801
    @joesmith5801 6 ปีที่แล้ว

    AMAZING video. You earned a subscriber and a thumbs up.

  • @Fuzzball2410
    @Fuzzball2410 6 ปีที่แล้ว

    Great tutorial very helpful, I'm new to the world of Marcos in excel.
    I am trying to stream line my job by learning how to write amazing little programs like this and stop carry over mistakes.
    How would one write a code to do the same job essentially, but go one step further to populate information from the original document.
    Scenario, there is a "client registry" which has various bits of information regarding the client, and I need to execute a function to take those bits of information and populate them into a template sheet and save as a new file. let me know if you have any advice on this one or links to similar vids.

  • @mussatv7255
    @mussatv7255 4 ปีที่แล้ว

    Excellent
    I have some issues kindly help me to resolve
    1: how can i save the new file without micro without micro button

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว

      You can go to the developer tab, macros and select the macro and run

  • @mf-wg1qi
    @mf-wg1qi 6 ปีที่แล้ว

    Barb,
    Awesome videos. I tried using this information on a Trivia Night Score Sheet I created. Only issue I have is that a blank Excel window opens after the save and my original file closes. I'll send an email with more background information. Again, thanks for the very informative videos.

  • @mohammadyawar1901
    @mohammadyawar1901 4 ปีที่แล้ว

    Great. Thanks for making this video, very helpful. But I don't want to close the active workbook after saving the file. Can anyone please help me out?

  • @jdouangpanya
    @jdouangpanya 5 ปีที่แล้ว

    Loved the video, it worked for me. I’ve been trying to figure another thing out. Is it possible to add conditions to a cell that determine what the save path is? For example, when you click “save file” as in your video. If I wanted a condition that sets a different path based on the value of a cell. Is that possible? For instance, if I wanted to sort out dated forms. If cell “D5” contained the words “mar”(for March) the save path goes to a “March” folder. If cell “D5” contained word “Jan” (for January) then the save path goes to a “January” folder.

  • @Galu97
    @Galu97 2 ปีที่แล้ว

    Hello, how would you make a macro to request the user to attach an PDF document, and save that document with a different name in another folder for it's consult.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 ปีที่แล้ว

      that would be quite a bit different than this macro

    • @Galu97
      @Galu97 2 ปีที่แล้ว

      @@BarbHendersonconsulting do you think you can help me please? At the momento I have only achieve to attach the document as an object. But that doesn't really work.

  • @saurabhd8247
    @saurabhd8247 7 ปีที่แล้ว

    Hi Barb, is there a way to save a file without any name parameter to a particular directory. I already have the filename but different each time.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      I hope this is what you need, I have attached the video
      th-cam.com/video/GgTQRF7cf94/w-d-xo.html

  • @limitone9564
    @limitone9564 2 ปีที่แล้ว

    what if I'm using an EXCEL Userform and I want to drag/drop a Word doc on the same location/folder that the EXCEL is on and rename the WORD as the name on the header of the Word? The drag/drop is working but I just don't know how to code to save the WORD and rename it as the name on the header of the Word. I need help pls.

  • @adamhennessey1622
    @adamhennessey1622 7 ปีที่แล้ว

    i need your help!! the Save command macro works. that's the good part. the bad part is that each saved file overrides the other. we are going to use this to keep a daily report, and each report has to be looked at from time to time.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      Adam,
      Try this
      filename1 =Range ("C4").text & Date
      This should add the date to your filename before the xlsx. This should keep them separate unless you save the same file on the same day
      Barb

  • @NetworthPlus
    @NetworthPlus 5 ปีที่แล้ว

    Hello I Wana make that path name dynamic is that possible? For example I want to save that file in different folders based on the path I enter in excel

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  5 ปีที่แล้ว

      Have you seen this video, I think it might be the answer th-cam.com/video/VbYvSALwejE/w-d-xo.html

  • @mansoork123
    @mansoork123 7 ปีที่แล้ว

    Dear Barb,
    Thanks for the macro video. I have a doubt regarding with file save location. This file showing error other user system saving . Because the file location given as my PC. How to solve?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว +1

      If you click on the address bar and copy the file location it always works for me.

  • @RickyMendez5
    @RickyMendez5 4 ปีที่แล้ว

    Hi Barb, How can I make it save to an FTP location?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว

      I am not sure. Can you copy the path to the FTP location on your computer?

  • @nocode659
    @nocode659 7 ปีที่แล้ว +1

    Hi barb,
    I have a issue. I am automating a webpage to download a document from it using a vba script. I can click the download option but upon clicking i get a pop below the window like, { open, save as and close}. Alt + S works fine for saving the document. Can you provide me a solution for how to go about it! I have tried using send keys but in vain

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      The only thing that I would suggest is "Application.DisplayAlerts = False" at the beginning and "Application.DisplayAlerts = True " at the end of the code. Good luck

    • @nocode659
      @nocode659 7 ปีที่แล้ว

      Thanks Barb
      Application.Sendkeys"(% s)",true
      Is this correct for saving a file? I am searching it in many forum, but cant find a solution

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      I have used previously for saving a large number of files, so that you do not get the prompt to save for each one

    • @nocode659
      @nocode659 7 ปีที่แล้ว

      Can you please share the code as to save it? Because i enter some 10 values in excel and for each value it has to download the document! If you can share as to how to proceed further. It would be really helpful
      Regards,
      nelzy

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      Private Sub CommandButton1_Click()
      Dim path As String
      Dim filename1 As String
      path = "C:\Users\Barb\Documents\excel\test saving xlsm\"
      filename1 = Range("D3")
      Application.DisplayAlerts = False
      ActiveWorkbook.SaveAs Filename:=path & filename1 & ".xlsm", FileFormat:=52, CreateBackup:=False
      Application.DisplayAlerts = True
      ActiveWorkbook.Close
      End Sub

  • @tejaskadam4099
    @tejaskadam4099 2 ปีที่แล้ว

    Hi Barb,
    Its perfectly working on my PC
    however error is showing when other users of my company try to use the same. it might be because of username because all of them having different usernames.
    is there any way to fix this, so all users can save the file at assigned path.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 ปีที่แล้ว

      Where are you saving the file? If it is on your drive then it will not work for other users but if it is on a shared network, it should work

  • @blairmacpherson1989
    @blairmacpherson1989 2 ปีที่แล้ว

    Hi Barb, I’m having an issue with my macro and I’m getting the error “method ‘SaveAs’ of object’_workbook’ failed” when I debug it’s the ActiveWorkbook.SaveAs that is highlighted. Any ideas?

    • @blairmacpherson1989
      @blairmacpherson1989 2 ปีที่แล้ว

      ActiveWorkbook.SaveAs Filename:=path & filename 1 & “.xlxs”, FileFormat:=xlOpenXMLworkbook

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 ปีที่แล้ว

      did you place the final "/" on your path?

    • @blairmacpherson1989
      @blairmacpherson1989 2 ปีที่แล้ว

      Hi Barb,
      My path reads as:
      Path= “s:\public\FOLDER\FOLDER\”

  • @hrvojerozan8285
    @hrvojerozan8285 3 ปีที่แล้ว

    which is the code for the word document?

  • @mrinmoyhalder7293
    @mrinmoyhalder7293 7 ปีที่แล้ว

    I've made a folder in D drive & mentioned that folder's address in macro, but file is saving in C:\Document instead of this specified location.please help me

    • @rajeshmuthu9881
      @rajeshmuthu9881 5 ปีที่แล้ว

      Did u get solution for ts.. I m facing the same

  • @myawesomelife2023
    @myawesomelife2023 6 ปีที่แล้ว

    How can I change the naming convention. I don't want it to pickup from excel sheet. Please suggest

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว

      You could add a message box asking the user to enter a name

    • @myawesomelife2023
      @myawesomelife2023 6 ปีที่แล้ว

      Barb Henderson hey, this will not work for 2000 files which has different naming convention. Besides I am not good at macro. Do u have tutorial? I been to your website it was more of Excel. I really like the way I do. I want to learn to write VBA

  • @waseemlimbaliya6196
    @waseemlimbaliya6196 4 ปีที่แล้ว

    What if Madam !!!! if i want to save a file into sub folder of Active workbook path as pdf. I dont care where the file is being saved , the macro should save the file where the active workbook located and make subfolder. For example Macro Enabled Workbook is Saved into C:\My Folder\Vouchers.xlsm. Now i want to save a PDF file into C:\My Folder\Payment Voucher\Voucher_001.pdf without giving the address. just want to save where the activeworkbook is being saved. please madam guide me.

  • @paulcote4257
    @paulcote4257 2 ปีที่แล้ว

    Barb:
    Excellent video. I noticed the date submitted was 2017, so I was wondering if there are any changes for the newer Excel for Microsoft 365. he reason I ask is that I have a file that I use at work that is set up almost exactly as you played out, except it saves the file to the desktop. Since we migrated to 365 and all our computers are set up to save to a personal One Drive which then mirrors the files to the cloud one drive for that user. The problem now is the file still saves to the desktop in c:\desktop, so you don't see the files on your real desktop. The path for this newer one is C:\Users\Users Name\OneDrive - Government of Ontario\Desktop
    I can't for the life of me find the proper syntax to change it over. Can you offer any suggestions? Thanks

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 ปีที่แล้ว +1

      The only thing I can think of is to go into the folder where you would lik to save the file and select another file. Go to the home tab of the folder. In the clipboard section of the menu bar there is a "Copy Path" double click this and place it in the code. Replace the file name with the desired file name and do not forget the closing "\" Here is an example of the path I copied using this method "C:\Users\screa\Downloads\onlineStatement.pdf"

    • @paulcote4257
      @paulcote4257 2 ปีที่แล้ว

      Thanks!! @@BarbHendersonconsulting

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 ปีที่แล้ว

      @@paulcote4257 your welcome

  • @faizraut1516
    @faizraut1516 5 ปีที่แล้ว

    Thank you so much, it was easy to understand and implement

  • @nigelkheng
    @nigelkheng 6 ปีที่แล้ว

    When I hover over the button, it doesn’t turn over for me to click on it. It has the symbol that allows me to reshape

    • @sotirisvrassas7528
      @sotirisvrassas7528 5 ปีที่แล้ว

      You're still in "Design Mode", under "Developer" area. Press that button again to exit and you'll be fine. A lot of time since your comment, and I hope you've found the solution already. So perhaps useful to other viewers....

  • @brendoncafferkey3816
    @brendoncafferkey3816 3 ปีที่แล้ว

    How can I have the file revert to the original file after hitting the save button?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  3 ปีที่แล้ว

      If you have saved the original file as some other name then you can always go back to it. But there is no "undo"

    • @brendoncafferkey3816
      @brendoncafferkey3816 3 ปีที่แล้ว

      @@BarbHendersonconsulting I guess what I mean is after saving the file I would like the workbook to clear or reopen the original file

  • @jkhair1770
    @jkhair1770 7 ปีที่แล้ว

    Hi Barb,
    I am getting error in below line
    ActiveWorkbook.SaveAs Filename:"path & filename1 & ".xlsx",

  • @diyeimeno
    @diyeimeno 7 ปีที่แล้ว

    Barb hello!!
    I'm trying to use your macro but I have an error here:
    ActiveWorkbook.SaveAs Filename:=path & filename1 & ".xlsx", FileFormat:=xlOpenXMLWorkbook it's marker with yellow, can you please let me know what I'm doing wrong?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      Carlos, Same reply as below, I find if you click in the address bar and copy the file location it always works for me. If you email me at easyexcelanswers@gmail.com I will send you the file that I made the video with and you can work from that if you like.

  • @MT4LYF
    @MT4LYF 6 ปีที่แล้ว

    thanks Barb. at the end after pressing button a blank screen appears. i see it in your vid as well. how can that be deleted along with hitting save button ?
    recent subscriber
    Tom

    • @sotirisvrassas7528
      @sotirisvrassas7528 5 ปีที่แล้ว

      I suppose you can totally delete at the end of the code: "Application.DisplayAlerts = True
      ActiveWorkbook.Close"

  • @p2kc1
    @p2kc1 3 ปีที่แล้ว

    Hi Barb
    Thank you again for streamlining information
    I need to do something similar I'm not sure if it is possible to do
    Saving a .docx file instead with a specified name (file name=cell value)
    A trillion thanks

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  3 ปีที่แล้ว +1

      you should be able to but I have never tried it

    • @p2kc1
      @p2kc1 3 ปีที่แล้ว

      @@BarbHendersonconsulting I figured it out, thank you barb

  • @krishnajagadeesh6307
    @krishnajagadeesh6307 5 ปีที่แล้ว

    Super madam very nice bt I need agine one more question how to automatically open file my friend send one excel file to email me download then use hear save to pdf button have me click the button automatically open this workbook location one ( pdf folder) open then inside this pdf file have when I delete this pdf Fila not possible this he how to make please explain madam

  • @I3asher
    @I3asher 6 ปีที่แล้ว

    Say I have a value in A1 called Test and I want it to create a folder called Test where it saves itself as Test.xlsx in the defined path, is there a possibility to do this? I've been trying to look for a way to accomplish this for like 3 days.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว

      I have a video for that th-cam.com/video/uOEN5OipAsY/w-d-xo.html

    • @I3asher
      @I3asher 6 ปีที่แล้ว

      You're an absolute hero!
      My next step is to my sheet to save itself with a name from a cell inside the folder it just created. Currently it's save both the folder and the file in the same folder.

  • @pdkbuptcilegon2180
    @pdkbuptcilegon2180 4 ปีที่แล้ว

    how to save as file with format macro... please

  • @rayhanrana6773
    @rayhanrana6773 5 ปีที่แล้ว

    i write ".xlsx", and get a error message .Anyone have any idea how i can solve it.Thanks in advance.

  • @assadmk1095
    @assadmk1095 5 ปีที่แล้ว

    thank you so much,it helped me alot...

  • @tylercooper7975
    @tylercooper7975 6 ปีที่แล้ว

    Hi Barb,Thank you very much for your video! Could you help me trouble shoot?I have an Error called Run-time error '1004':Method 'SaveAs' of object '_Workbook' failI have gone over the code several times and have looked through other comments but couldn't find this. I included the "/" at the end of the file name.I appreciate your time,Tyler

  • @rizwanluckyn
    @rizwanluckyn 6 ปีที่แล้ว

    Hi Madam i am facing this error filename1 = Range("F4:AJ4").Text , where is fault? please help me

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว

      This code is used to save one file name not a range of file names

    • @rizwanluckyn
      @rizwanluckyn 6 ปีที่แล้ว

      Thank you for prompt reply, so which code i have o type???

  • @georgealoyce4849
    @georgealoyce4849 4 ปีที่แล้ว

    Nice video but to bad when i close my excel and reopen the button disappears, help me

  • @kamrulzoha9223
    @kamrulzoha9223 6 ปีที่แล้ว

    How to save as PDF file ??

  • @nowfalbeary7821
    @nowfalbeary7821 7 ปีที่แล้ว

    Hi,
    Can U pls Help me..?? 1.I have Many Sheets In One Work Book. So, I want to Save A Range Instead Of Entire WorkBook. 2.After Saving The New Saved File Opens And The Old One Closes. Pls Help me.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      Nowfal Beary
      I am away from my computer for a few days.
      I can look at your problem on Wednesday,
      Barb

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  7 ปีที่แล้ว

      What I would do is copy the range to a new file and save it and then delete the old file

  • @moodkn
    @moodkn ปีที่แล้ว

    Great Madam.. Thanks...!

  • @hasmawiah1927
    @hasmawiah1927 4 ปีที่แล้ว

    its amazing mam.. i have a question, how to save as the sheet that we want, for example i want to save sheet 1 and sheet 6.. thaks mam, i really need your help

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว

      The only way that you can save selected worksheets is to save them as a PDF

  • @lakilakisorong8204
    @lakilakisorong8204 5 ปีที่แล้ว

    what if I want to save it to onedrive?

  • @penulisbestari
    @penulisbestari 4 ปีที่แล้ว

    Thank you so much

  • @JaskC700
    @JaskC700 ปีที่แล้ว

    Could not get this code to work today.

  • @freshmuzik7515
    @freshmuzik7515 3 ปีที่แล้ว

    In a same way how to create a folder?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  3 ปีที่แล้ว +1

      No but I have a video for that th-cam.com/video/uOEN5OipAsY/w-d-xo.html

  • @yohannesabate3924
    @yohannesabate3924 7 ปีที่แล้ว

    Why saved As file lost all the Macro features?

  • @ValmisFilm
    @ValmisFilm 7 ปีที่แล้ว

    Guys - watch out! There is one bad thing with that - I made the script and when I tested it well - it closed the file I was maing the code and I lost the code, because the file it saves does not have the VBA codes... so yeah, watch out!

  • @kirankarthikeyan2694
    @kirankarthikeyan2694 4 ปีที่แล้ว

    Thank you .

  • @DiscoverTalent143
    @DiscoverTalent143 6 ปีที่แล้ว

    Can you pl share code

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  6 ปีที่แล้ว

      Private Sub CommandButton1_Click()
      Dim path As String
      Dim filename1 As String
      path = "C:\Users\Barb\Desktop\demo\"
      filename1 = Range("C4")
      Application.DisplayAlerts = False
      ActiveWorkbook.SaveAs Filename:=path & filename1 & ".xlsx", FileFormat:=xlOpenXMLWorkbook
      Application.DisplayAlerts = True
      Activeworkbook.close
      End Sub

  • @tisue
    @tisue 6 ปีที่แล้ว

    Thanks Barb!

  • @nitinrao7637
    @nitinrao7637 4 ปีที่แล้ว

    can you please copy paste this code

  • @BaudilioBarahonaTrochez
    @BaudilioBarahonaTrochez 2 ปีที่แล้ว

    dEJEN DE PONER TITULOS EN ESPAÑOL Y EL VIDEO ESTA GRAVADO EN INGLES.

  • @ValmisFilm
    @ValmisFilm 7 ปีที่แล้ว

    Thanks! Very nice!

  • @pritammokashe5466
    @pritammokashe5466 5 ปีที่แล้ว

    mere isme error aa raha hai

  • @arunkumarkm5295
    @arunkumarkm5295 6 ปีที่แล้ว

    Hi Barb,
    nice tutorial, and thanks for uploading this video, and i have a doubt for save invoice data to next sheet using macro, i.e i want to create invoice 10 invoices per day, i want to bake up the data to next sheet, below codes are am using but not working properly, i would like to request if you upload any video what am ask, kindly share the link to me
    Sub transfer()
    'Copy the data
    Sheets("Sheet2").Range("E22:M22").Copy
    'Activate the destination worksheet
    Sheets("SOA").Activate
    'Select the target range
    Range("E6").Select
    'Paste in the target destination
    ActiveSheet.Paste
    Application.CutCopyMode = False
    End Sub
    thanks,
    Arunkumar K.M

  • @neelammodgil9905
    @neelammodgil9905 4 ปีที่แล้ว

    this not work in win 10 64 bit

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 ปีที่แล้ว

      Try again, I just tested on my Windows 10 64 bit system and it worked fine!

  • @dipankarmanna5530
    @dipankarmanna5530 6 ปีที่แล้ว

    Can you help