Save As Macro With Location Prompt But Fixed File Name ?
Dec 29, 2008
For a sheet that many non-expert users will use on different systems I need a macro that let's them save, print and send the results of their work. So I made a macro that makes a copy of only 1 sheet of the workbook and saves it with a given name to a given location. The problem is that I want a location prompt to ask the user where they want the file saved, while giving/suggesting them a fixed filename. A lot of different users will make and use their sheets so I need a certain naming policy to manage all the files. (date, location, etc)
View 4 Replies
ADVERTISEMENT
Feb 22, 2014
In a workbook, I use a macro to extract a sheet and save it as xls.
What code should I use to prompt the user to define the location and name of the new file to be saved?
View 1 Replies
View Related
Jun 12, 2008
I'm trying take a reference from some workbooks (e.g. WB1.xls,WB2.xls,WB3.xls,...etc)
They are all placed in one folder but there filename is subject to change,
I need to get the result of Cells A1 from WB1.xls+A1 from WB2.xls + A1 from WB3...etc
to shown on AA1 in another workbook(e.g. Collected.XLS)
Is this possible knowing that workbooks filenames are changeable?
Moreover Can the value of A1 from any new workbook added to the same folder be added automatically?...
Can the formula typed in AA1 from Collected.xls be draged down?(So as to show the sum of Cells B1 and C1.....etc) from each workbook?
View 9 Replies
View Related
May 24, 2013
How to save a file onto the computer using VBA. The code template below that I found on another forum seems promising, except when I go to the desktop to access it, the .csv file has what looks like the page's source code instead of the actual file I want. This may be because when I go to the url, it doesn't automatically download the file; rather, I am asked to save the file to a certain location (since I don't know the path name of the uploaded file on the site).
Is there any way to alter this code to accommodate this, or will I have to use a different code entirely?
VB:
Sub Test()
Dim FileNum As Long
Dim FileData() As Byte
Dim MyFile As String
Dim WHTTP As Object
[Code] .....
View 9 Replies
View Related
Apr 21, 2006
I've been searching all morning through various posts on this subject, but I can't find anything that I can adapt to my needs. Here is the code I have:
ChDir "C:Documents and SettingsmynameDesktop"
ActiveWorkbook. SaveAs Filename:= _
"C:Documents and SettingsmynameDesktopBook1.txt", FileFormat:=xlText, _
CreateBackup:=False
This file will be used accross multiple computers and therefore the directory will always change. What I need to hapen, is for this code to save the workbook in the same directory as the origional file. I also want the file name to refer to a cells value, as I will be having the user define the name through a userform.
View 4 Replies
View Related
May 4, 2006
I get an xl file sent to me every day which I upload into a database. I then save the file keeping its name and save it into a selected folder. Is it possible to add a macro at the beginning of my current macro that saves the file using its name to a selected folder?
View 4 Replies
View Related
Jan 8, 2014
I've created a spreadsheet of clients and info; I want each client name to link to their specific folder on my computer for easy referencing. I entered in all the links and they work just fine; however, when i tried to save the file to another location on my computer so it could be used by another employee (same terminal, etc, just in another folder) the hyperlinks stopped working.
View 5 Replies
View Related
Nov 26, 2012
I just got a new computer and upgraded to Excel 2010 and Windows 7. When I try to open a workbook in Excel 2010, my saved file paths on the left side of the screen are gone. I want to put them back in there.
In Excel 2007 running Windows XP, I would just right click in the left side menu and click "add" and now that's no longer an option.
View 1 Replies
View Related
Jun 10, 2009
I am trying to prompt the user for the directory to be saved in and file name to be saved as; then save the workbook in the input directory with the inputted file name.
View 3 Replies
View Related
Jul 7, 2008
I am setting up a "save as" macro that saves a file by replacing another file in a folder. Even though the macro has been recorded by approving the replacement (the prompt appears "the file --- already exists. Do you want to replace the existing file?"), when I run the macro, I am again prompted about replacing the file. Is it possible to avoid the prompt so the file is automatically saved by replacing the named file?
View 9 Replies
View Related
Feb 23, 2014
I have a requirement to download a lot of historical data files from the archieve of an website. The url goes something like this: [URL]....
This downloads file for 21022014 ie. 21-Feb-2014. I need to be able to have a facility to have a selection criteria on my user form (in excel) where I specify a date range and the macro automatically downloads all the valid excel files available within that date range (files for Saturday, Sunday and some holiday dates will not be available in the website archive database) one after the other (like at single clcik of button) into a specific location (predefined viz.. c:/Users/EOD files/) on my laptop. Best would be if I am able to select the save location run time by using a 'Browse' like feature where I go and choose my local laptop folder...same type when we try uploading a file from our laptop to the web..
View 1 Replies
View Related
Aug 28, 2009
I have looked in books and online and can't seem to locate how to create a macro that opens a browse function. From Excel I would like to click a button to start a macro and have that macro prompt me where to browse for the file. There is a lot of other code that will go after this step (which I already have), so once I click to "open" a file I want the macro to continue.
View 6 Replies
View Related
Aug 4, 2014
I want to grab the value used to sort and put it in a different field.
example
Sort by City
cell location
A1-B1 "Inventory lists for "(CITY)
A3 - A15 San Jose
A16 - A30 Phoenix
A31 - A35 Portland
A36 - A37 New York
I want to take the chosen sort value and put that in the title but can't figure it out because the cell location changes when a different sort value is chosen.
View 1 Replies
View Related
Feb 8, 2013
I do routine tasks every day which involves opening 3 different files and pasting data into my main file. The data is always in the same format, and the 3 files are saved in the same location (3 different folders through). The 3 files are saved each day and the naming convention is constant, with only the date changing. For example, the files are always saved in C:My Documents and the files are called test_05.02.2013.xls. Tomorrow the file will be called test_06.02.2013.xls and so on.
So each day I will be rolling a file forward and I want to bring in the info from each of these files based on the new day.
How to do 1, and I will do the others (because the concept will be the same).
View 1 Replies
View Related
Nov 19, 2009
I have a excel sheet which is completely formula driven and no macros in that.
I want to macro which can save that excel sheet to a specific location.
View 9 Replies
View Related
Jan 16, 2010
I am attempting to write an Excel macro that will be stored in a file called MacroFile. The purpose of the macro is to
1. Follow a hyperlink to an Excel file saved in a SharePoint type enviroment
2. Save the file to my laptop directory My Documents.
Below is the code I have written. The code is following the hyperlink and saving a file but is the focus file is incorrect.
Here is what happens:
1. Open up MacroFile and run macro
2. Hyperlinked file LinkedFile_1.xls is opened
3. File NewFile_1 is saved but contains the info from MacroFile
4. Hyperlinked file LinkedFile_2.xls is opened
5. File NewFile_2 is saved but contains the info from LinkedFile_1
6. Hyperlinked file LinkedFile_3.xls is opened
7. File NewFile_3 is saved but contains the info from LinkedFile_2
The files created are named correctly but have the wrong data in them. I need to know how to control which file is considered ActiveWorkbook.
Sub LinkAndCopy()
Application. ScreenUpdating = False
Application.DisplayAlerts = False
'**** Copy LinkedFile_1..................
View 2 Replies
View Related
May 30, 2008
I have a workbook with approximately 30 worksheets. This workbook already has a massive macro that I've written. I'd like to write a code that will take a designated worksheet, check to see if there is data in cell A2, if so, save it as a new workbook.
The name of the workbook should be predetermined, for example "SIA April(Previous Month) 2008(Current Year) P-Card Import Template.xls"
The months and years will need to change.
The file to save it in will also change monthly- for example- G:PCard DirectoryCloses2008 ClosesApril(previous month) 2008(current year)
View 9 Replies
View Related
Sep 9, 2013
Its been a while since I did this on 2003 and needing a pointer on 2007.
Just needing a simple macro that opens the relevant folder from a hardcoded path to allow the user to manually select the file to be used.
This file will then be used to copy from and paste to another file.
View 8 Replies
View Related
Jan 17, 2010
I have a macro that copy one sheet of the Active workbook and sends it via email.
I need to add a code in this sheet so when one opens it from the email, with a command button to be able to save the file to specific, fixed folder on the local network with it’s original file name.
View 10 Replies
View Related
Sep 28, 2008
I use an image analysis program ImagePro which can call Excel within it's macro language (which seems to be visual basic). I looked up on this site how the change the drive (ChDrive command). But still when the Excel section (after With oExcel) executes the default file location in the browser is in My Documents on the C: drive.
Prior to this code Excel has been launched by this ImagePro macro, and a file Cumberland Template has been opened from the C: drive. Now I would like to do a Save As, but have Excel start at the I: drive location.
View 7 Replies
View Related
Aug 14, 2014
I am looking for a way to show the character location number of a text file, possibly in the first row or a macro that I can run at any given location that will give me the location # I am currently viewing.
Currently, when I open the file I can see the character # at the opening screen (see attached file) but they disappear when it actually converts. I would like to be able to keep the character location ruler once the file is opened in Excel so I don't have to manually count.
View 1 Replies
View Related
Mar 14, 2014
I have a macro which successully saves a worksheet as new file to another file path....(below)...but I can't figure out how to close this new file and return to the original file...
Dim myPath As String, fName As String
myPath = Sheets("Date").Range("C8").Text
fName = Sheets("Date").Range("C9").Text
Sheets("Sage CSV File").Copy
With ActiveWorkbook
.SaveAs Filename:=myPath & fName
End With'
View 2 Replies
View Related
Jan 10, 2007
Currently I have information that includes numerous distributors information on one sheet. The code below separates each distributors information into a new tab and a new workbook, names the workbook and saves it in the specified file path.
I am trying to figure out a way to use an InputBox to popup and ask the user where all the new workbooks will be saved at. Thus, avoiding the need to change the code each time you want the new workbooks saved in a different folder .....
View 9 Replies
View Related
Mar 6, 2012
I want to create a macro that will select all the worksheets (names and quantity will vary) and saves the file as the current file's name but in PDF. Since I only know how to record a macro it specifies the worksheet names but I need it for various workbooks. The name will vary plus the number of tabs can go anywhere from 3 to 40.
View 9 Replies
View Related
Oct 11, 2006
I presently have a macro that, when run, takes to conents of C4 and C6 and saves a new version of the file being worked on into a folder on my desktop. I love the macro with the exception of one part: I don't want to be prompted to overwrite the file if it already exists. How can I change this macro so that, when pressed, it overwrites the file without prompting the user and waiting for their answer?
Here is the current
Sub SaveIt() ...
View 3 Replies
View Related
Dec 10, 2004
I have an excel spreadsheet that when opened and closed prompts to save changes, even when no changes have been made.
The spreadsheet is a copy of another spreadsheet which has then been modified. The original spreadsheet doesn't have this quirk.
There are no 'links' in the spreadsheets. Which was my first thought.
View 9 Replies
View Related
Feb 11, 2005
I have a spreadsheet that has hyperlinks in it and is mostly protected to prevent changes. Is there a way to prevent the "save changes" dialog box from appearing when this file is closed as I have to make this file available to others and don't want them to get this message or make save any changes.
View 7 Replies
View Related
Oct 6, 2011
I'd like a macro that will:
Save my workbook
Then
Open the SaveAs box with the path already pointing to a specific directory and with the Name and file format already entered (.xls)
This is basically to save time navigating through our folder structure (which is a real mess). I don't want to automatically saveas the file as the target folder will change each month and the last part of the file name will chance (month). So I'd like a bit of flexibility rather than total automation.
View 3 Replies
View Related
Nov 14, 2006
Is there a code I can use, through a private command button, that will exit the Excel program (not just the current workbook) without asking to save?
View 3 Replies
View Related
Jun 4, 2008
Is it possible to open a template, prompt the user to enter data and have the template save itself as the user defined data?
View 5 Replies
View Related