Hi i have a macro currently that when i hit the button it saves the worksheet to a folder as the name of a certain cell. what i would like to do is alter the macro to save and replace the old file every time the workbook is updated with new info.
Hi i have a macro currently that when i hit the button it saves the worksheet to a folder as the name of a certain cell. what i would like to do is alter the macro to save and replace the old file every time the workbook is updated with new info.
This is my current save code
Dim sFile As String
sFile = Sheets("picking log with colons").Range("D1").Value & ".xlsm"
ActiveWorkbook.SaveAs Filename:="D:\picking logs\" & sFile, FileFormat:=52
Hello superchew,
Use this code in ThisWorkook:
Please Login or Register to view this content.
Please consider:
Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .
Winon,
I am a newbie where to I put where i want it to save to and the cell i want it saved as.
and will this save it everytime the sheet is updated and overwrite the last save without asking everytime if i want to.
Hello superchew,
Please could you upload a sample Workbook, with your existing Code, for us to have a look at for you.
here you go. currently the save function is in module 5 I believe.
Test 6.xlsm
Test 7.xlsm
Hello superchew,
There you go, try the attached Workbooks now.
okay... how do i make it save to spefic file path and save as specific cell data? in not how do i add that.
Hello superchew,
In your first post you state the following;
Which is exactly what the WorkBooks I have uploaded are doing. It replaces the old files with new Data. Now you say,Hi i have a macro currently that when i hit the button it saves the worksheet to a folder as the name of a certain cell. what i would like to do is alter the macro to save and replace the old file every time the workbook is updated with new info.If you want to replace the "Old File" and save it as specific cell data, it either has to be the correct File which you have opened, otherwise, if it is not, a new file will be created in whatever Path you have entered in your Code.okay... how do i make it save to spefic file path and save as specific cell data?
If that is what you want, then just stick with your Code that you have, as mentioned in your first Post.
Sorry for the confusion. I guess what I am looking for is to keep my save funtion as is so when i hit start new batch it saves file to the specific batch and as a specific cell data, also i want it to save as I go.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks