VBA To Save As In Specific Path With Prompt

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


ADVERTISEMENT

Prompt Users To Enter Information In Specific Range Of Cells Before Save

Mar 11, 2014

Is there a way to prompt users to enter information in a specific range of cells before they save?

View 1 Replies View Related

Save Hyperlink Path For File With Absolute Path And Non-Relative?

Mar 4, 2013

is it possible to configure Excel in order to save the Hyperlink path for a file with absolute path and non relative?

I notice that the hyperlink is ....pdf ry.pdf

if I change the position of the file excel there is a problem!

I would like to save es. d:invoichepdf ry.pdf

View 1 Replies View Related

Prompt To Select File/path And Store As Variable

Jan 29, 2009

I am looking for macro that when run, will open a file explorer window and prompt the user to select a folder and file where they have data stored. Then I need it to be stored as a variable and used as a part of a "Workbook.Open Filename" command.

The reason for this is that, I have a huge formatting marco stored within a workbook. When a user extracts a report from SAP, I want the workbook to grab the file that is extracted, open it and import all of the data in order to be formatted.

View 6 Replies View Related

Prompt Where To Save

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

Prompt For Save When No Changes Made

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

Stop Save Prompt

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

Close Application Without Save Prompt

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

VBA - Go To Website And Download File From Save Prompt

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

Macro To Prompt For Save Location And Filename

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

Automatically Prompt To Save Template When Opened

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

How To Call Save As Prompt If Directory Doesn't Exist

Apr 1, 2014

I am using this code to generate a text to a directory, but I would like to know how to call a save as prompt if the directory doesn't exist?

[Code] ..........

If the folder macro does not exist, then it will prompt a message saying that the folder macro cannot be found, and the save as prompt will appear.

View 3 Replies View Related

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 View Related

Clone Active Worksheet And Prompt User For Where To Save CSV

May 29, 2013

I've recorded this code and am looking to include it in a button. I would like for when a user clicks the button assinged macro that the active sheet is cloned and saved as a CSV file. The user should be prompted before saving on where (file location) they'd like to save the file.

Sub CloneWorksheet()
'
' CloneWorksheet Macro
'
'
Sheets("SDW&Customer Workshop scheduled").Select
Sheets("SDW&Customer Workshop scheduled").Copy
ActiveWorkbook.SaveAs Filename:= _
"C:Documents and Settings1167916My DocumentsTestBook1.csv", FileFormat:= _
xlCSV, CreateBackup:=False
End Sub

View 9 Replies View Related

Save Path Is Incorrect

May 27, 2009

I have the following code, taken from an example off the web. But I would like to change the save path to just C/: rather than copy the save path of the original file...I would also like to not close the active workbook that I am working in....how can i achieve this?

Sub TwoSheetsAndYourOut()
Dim NewName As String
Dim nm As Name
Dim ws As Worksheet

If MsgBox("Copy specific sheets to a new workbook" & vbCr & _
"New sheets will be pasted as values, named ranges removed" _
, vbYesNo, "NewCopy") = vbNo Then Exit Sub

With Application
.ScreenUpdating = False

On Error GoTo ErrCatcher
Sheets(Array("Copy Me", "Copy Me2")).Copy
On Error GoTo 0
For Each ws In ActiveWorkbook.Worksheets
ws.Cells.Copy
ws.[A1].PasteSpecial Paste:=xlValues....................

View 2 Replies View Related

Save .txt To .xls Using Existing Name And Path

Apr 18, 2007

how do i save a text file to xls in code. i want the new .xls file to appear alongside the original .txt file.

View 9 Replies View Related

Take Save Path From Cell

Dec 15, 2009

I am creating a training records matrix which will be used by 30 or so locations. each one may want to save in a different location. I would like to save the chosen location as an entry in a cell so this can be accessed by other macros.

View 9 Replies View Related

Save Copy As Same Path And Name

Jul 1, 2008

I want a Macro which will copy my workbook and paste it into a new workbook. Then it will automatically save it under the SAME name as the original and the SaveAs Box must show up (for cosmetic fixes). It is important it asks if it wants to save it under the same name. Example: My file is called "Summary_2008" and when I hit the Macro it will do those things and it will ask me if I want to save it in the SAME directory under the name "Summary_2008" (I will only add a number then).

(The macro must know how to read the original name since I have 7 possible filenames - it depends on which company I choose, that is why it is important it is saved under the same name)

Sub Zamenjaj()
Worksheets.Copy
Dim WS As Worksheet
For Each WS In Worksheets
Zadnja_vrstica = WS.UsedRange.Rows.Count
Zadnji_stolpec = WS.UsedRange.Columns.Count
For rwIndex = 1 To Zadnja_vrstica
For colIndex = 1 To Zadnji_stolpec
With WS.Cells(rwIndex, colIndex)
If WS.Cells(rwIndex, colIndex).HasFormula Then..........................

View 3 Replies View Related

Possible To Choose Path Of Save As Window?

Apr 1, 2012

I am currently using the following code to lauch the "save as" window.

Application.Dialogs(xlDialogSaveAs).Show

But I would like it to default to a poticular folder not the one of the current file location i.e. C:my documentswork

View 3 Replies View Related

Macro To Save As Using Path In Worksheet

Apr 2, 2012

The macro is working fine but what I want to change is the path for saving the file. The path that I would like it saved to is in the worksheet "NEW ORDER_" cell "N2"

Sub RENAME2()
Dim strWbKill As String
Dim myName As String
myName = ThisWorkbook.Path & Application.PathSeparator 'copy to same folder that file is in
myName = myName & Application.Cells(3, 7) & "_" 'cell G3 Style

[Code]...

View 5 Replies View Related

Macro To Save Xls To PDF With Path & Naming Convention

Mar 31, 2014

I am using the below macro to save my workbook with in the correct path and naming convention.

In fact, as I also need a pdf file from that excel file, I tried to change the below macro and replace ".xlsm" by ".pdf"... However acrobat does not like it..

HTML Code: 

Sub PDF()
'created by Gregory Charbonnel
'ActiveWorkbook.SaveAs Filename:="Z:FOLDER & FILE MANAGEMENTREview (ETF)PDF ETFETF_" & Format(Now(), "dd_mm_yyyy") & ".pdf", _
' FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
End Sub

I guess that I should use the print option which gives me that when I record the macro. how to implement my naming convention + path in that macro.

HTML Code: 

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False

View 2 Replies View Related

Save Sheet With Same Path As Source Workbook

Dec 28, 2006

I've go a shared Workbook, which will be distributed among several users and stored in different places. The workbook uses the following

Sub savemeas()
Worksheets("data").Visible = True
Sheets("data").Copy
Application.DisplayAlerts = False
ActiveWorkbook. SaveAs Filename:="d:" & Range("a1").Value, _
FileFormat:=xlText, CreateBackup:=False
Application.DisplayAlerts = True
ActiveWorkbook.Close SaveChanges:=True
End Sub

to save the sheet "data" as a text file with a name based on the value of cell a1. All I need is to modify the code so that the target path would not be

ActiveWorkbook.SaveAs Filename:="d:" & Range("a1").Value

but be the same as the source Workbook's - so that I wouldn't have to modify the code for each user separatly, because the sheet would alwayas be saved in the same folder as the current path of the source workbook.

View 4 Replies View Related

Save Workbook Copy To Same Path As Original

Aug 27, 2007

I'm trying to save a copy an excel file in the same directory of the original file. The code is pretty standard but it does not work if the file is stored in C: (only c: ) Is that a bug or am I doing something wrong? Anyways here is the code in case someone is interested in trying it out:

Sub CreateCopy()
ChDrive ThisWorkbook.Path
ChDir ThisWorkbook.Path
fileSaveName = Application.GetSaveAsFilename( _
fileFilter:="Excel Files (*.xls), *.xls", _
InitialFileName:="CMS_" & Format(Now(), "mm-dd-yyyy"))
If fileSaveName <> False Then
MsgBox "Backup copy saved as: " & fileSaveName
End If
End Sub

View 5 Replies View Related

Default Save As To Workbook Drive & Path

Jan 5, 2008

Excel 2002 SP3

When a file is currently open, and the user selects "Save as", it takes them to the files native directory. (Where it was last saved).

If the user has that same file open, opens another file from a different directory, goes back to the first file and selects "Save as", it takes them to the location where the last file was opened from.

View 9 Replies View Related

Allow User To Pick Save As File Path

Feb 6, 2008

i try to write a code to pop up input box with browse button to select the file path
the code without browse button is workin corectly

Private Sub CommandButton3_Click()
Dim N As Integer
Dim Fname As String
Fname = InputBox("Please enter the file name and path to save the output", "enter file name")
Sheets( Array(Sheet2.Name, Sheet3.Name)).Copy
ActiveWorkbook.SaveAs Filename:=Fname
ActiveWorkbook.Close
End Sub

Need to add browse button to make it easier than writting the file path

View 4 Replies View Related

Can Use Asterisk Wildcard To Save File In Multiple PATH?

May 30, 2014

Can I use the asterisk (*) wildcard to save the file in multiple PATH as long as it the file is in the master drive C:

Ex: the file now is in "C:Public" then can I use "C:Public*" so user can save file at their desire sub-folder such as "C:PublicHenry" as long as it has to be in drive C

View 6 Replies View Related

Create & Save Workbook To Same Path As Macro File

Aug 21, 2008

I have code to create a new workbook, and when I try to rename it I get "Compile error: Can't assign to read-only property."

Dim objXlApp As Object
Dim wkb As Workbook
Dim wks As Worksheet
Set objXlApp = CreateObject("Excel.Application")
' Create a workbook
Set wkb = objXlApp.Workbooks.Add
' Delete all worksheets bar the first one.
For Each wks In wkb.Worksheets
If Not wks.Index = 1 Then
wks.Delete

End If
Next wks
'Create some worksheets and names
With wkb
.Worksheets(1).Name = "myWorksheet1"
.Worksheets.Add.Name = "myWorksheet2"
.Worksheets.Add.Name = "myWorksheet3"
.Worksheets.Add.Name = "myWorksheet4"
End With...................................

View 5 Replies View Related

Save File Using Cells For Path & Name Macro Code

Mar 19, 2008

I want to create a macro that saves my file this way:

in a folder named after B2
and
as a file named after B4n.

View 4 Replies View Related

Macro To Save As File To Current Daily Folder, Path Changes

Aug 6, 2008

I have a report send to me daily. And I want to have a macro to save this report in the daily folder, such as “c:

eports8052008”, so tomorrow 's folder would be “c:eports8062008”.

All the daily folders already exist. Just need to change the file path. I tried some codes including sPath and format(now(), “mmddyyyy”), get error message.

View 9 Replies View Related

Macro To Save XLSM In Defined Path With Year Day And Month Changed

Jan 31, 2014

I need to save a document in the following path: [URL] .......

Only the year month and day sould change when I hit the save button/macro: 2014_01_29

How to build a macro that would save my file as per my above explanation??

If I would run the macro today the excel file should be saved in the path: [URL] .......

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved