Macro Save Current Sheet

Jun 2, 2009

I have a form button I am currently using to save the workbook. However due to the workbook being so large is taking a little longer than I want to save. Is there a way to change the macro to save the current sheet only?

Sub Save()
'
'
'
ActiveWorkbook.Save
End Sub

View 9 Replies


ADVERTISEMENT

Macro To Save Current Sheet As Tab Delimited

May 30, 2012

I've been searching for code that will perform the following:

1. Save the current workbook then,

2. Save the current sheet as a tab delimited file to the desktop with the same name as the current workbook then,

3. Return to .xlsx file format

The file saved to the desktop can be overwritten each time the macro is run.

View 4 Replies View Related

Macro To Copy Current Sheet, Create, & Rename New Sheet From Current Open Sheet

Oct 27, 2008

EXAMPLE: Complete Sheet called "Day1". When day1 is complete you click on button and it then copies itself and creates and renames new sheet to "Day2", then when "Day2" is complete you click on button and it then copies itself and creates and renames new sheet to "Day3", and so on and so forth to "Day30".

View 9 Replies View Related

Copy Current (Selected) Sheet To New Workbook And Save As Tab Name

Feb 28, 2014

I want to take the current sheet and copy to a new workbook (keeping the tab name) and then save as the tab name (xlsl) and close.

I've found ones that do a Saveas box or ends up saving as "Sheet1," "Sheet2" etc but can't seem to find one that keeps tab name and saves.

Here is the one I was using, but it saves all tabs not just selected:

Code:
Sub CopySheet()
Dim fname As Variant, ws As Worksheet, wb As Workbook
Dim nCol As Integer, iCol As Integer

[Code].....

View 1 Replies View Related

Copy A Sheet Into A New Book And Save File Name As The Current Date

Jul 5, 2009

I have an excel file which I use when I book keep journals in work. Each time I come across a new piece of bookkeeping I add to the file, name the sheet and index it. (I've attached a loose example for illustration) so the bookkeeping template.xls gets bigger every day.

Currently, when I book keep on a particular day, I open the template.xls workbook;

draft my journals;

and then manually copy the worksheets I have completed during the day from the template.xls workbook and paste the sheets into a new book and save the days bookkeeping as the current date.

With the file I have attached can someone show me how to write a macro and apply it to each of the buttons on the various work sheet tabs (each button will run the same macro).

Upon clicking a button, I would like the macro to;

Copy the active sheet into a new book and save the file as the current date.

Each subsequent click of a button the macro will check if the .xls file exists for the current date, if it does, then it will just copy the active worksheet to the file that has already been created.

In the new file which is saved as the current date, I need to remove the macro button and the hyperlink that reads back to index.

I have had some helpful macro's provided from another forum, however, the other forum does not appear to enable users to upload files, so I can't quite convey what it is I am trying to achieve.

View 14 Replies View Related

Macro To Save Files In New Folder With Current Month And Date

May 6, 2014

I have this existing macro which saves each tab into a separate excel file. However, I'd like for it to also save them together in a new folder using the current month and date (named: QA Files May_05.06.14). The month and date would change according to current month/date. How would I incorporate that into this code? I am not good with macros.

Sub tabname()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Activate
ws.Name = Range("D1").Value
Next

[Code]...

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

Have Macro Point To Current Sheet Instead Of A Specific Sheet Name

Apr 2, 2009

How do I change this macro to refer to the current sheet name instead of "FullScreen (2)"?

View 4 Replies View Related

How To Use This Macro On Current Sheet?

Jul 13, 2009

I wrote this macro that will work on two named sheets but i want to copy the column from the active sheet:

View 4 Replies View Related

MACRO Lookup Columns Of Current Sheet And Matches It With Table In Tab Then Returns Hourly Pay In Column

Mar 5, 2014

I am having trouble with my macro. I have attached excel sheet for reference.

Basically, I want a Macro that Looks up columns B & C of current sheet and matches it with table in the charges tab, and then returns hourly pay in column D.

I have created the macro but it's giving me Run time 1004 error.

Also, my formula is incorrect. Maybe that's why my macro isn't working?

2WayLookup_Macro.xlsm‎

View 4 Replies View Related

Macro To Save Sheet As PDF?

Feb 27, 2014

I need a macro that will save the range of cells with values as a pdf and saved as the sheet name. I have a macro that does a print preview function based on the cells that contain values. It works great, but instead I just need this to be saved as a pdf.

This is what I have:

[Code] .....

View 2 Replies View Related

Macro Code For Save And Go To Next Sheet?

Feb 5, 2013

I need a macro code with which I save my excel file and go to next sheet.

View 2 Replies View Related

Save A Single Sheet In A Workbook Using A Macro

Apr 2, 2009

I need to save a single sheet to a file (in a workbook of many sheets). I can't use the copy command and then save the new workbook because it truncates the longer info in some cells.

View 9 Replies View Related

Using Current Directory In Save Name?

May 15, 2013

I am trying to use VB to save a workbook into the same directory but with a file name that references the folder it is stored in...if that makes sense!

Here is where I have got to so far but fails on save,

Sub Rename()
Application.DisplayAlerts = False
mdy = Month(Now()) & "." & Day(Now()) & "." & Year(Now())
fold = ThisWorkbook.Path
FName = fold & "-" & mdy & "-(New).xls"
SaveName = fold & "" & FName
ActiveWorkbook.SaveAs (SaveName)
Application.DisplayAlerts = True
End Sub

View 3 Replies View Related

Save Sheet As Macro Enabled Workbook Using Codes

Jan 28, 2014

Working with a macro enabled workbook that has many sheets what would be a good code that would save Sheet1 into a new MACRO enabled workbook so that the 'Buttons' (which are linked to macros) on this specific sheet will be the only macros that will be copied to the new workbook as opposed to the rest of the macros that are found in different sheets?

Here is what I g=have:

[Code] ......

View 11 Replies View Related

Macro To Save Sheet With Same Page Breaks As Original

May 14, 2009

I am trying to sort a macro out to save my sheet the same as the original when the button is clicked. When i try it from one location it is fine but from another location i get a print error, the error says prit quality is not right, when i debug it highlights: Print Quality = 600 I have tried changing it but keep getting the same error. Their maybe an easier way to do this but not being very good on VB i dont know what to do. This file is on a server and will be accessed from different locations.

View 2 Replies View Related

Auto Save Sheet To PDF Macro Not Working When Transferred From Win XP To 7

Jun 3, 2014

I'm fairly new to macros but somehow i managed to create all the required macros for my project through googling and the like. The problem is that i created my macro enabled excel file in XP and when i transferred it to Windows 7 the auto save to PDF macro stopped working with the Runtime Error '5' Invalid Procedure, call or Argument. The highlighted error is as follows.

ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
FileName:="C:WindowsTemp emporaryexam.pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True

This auto save is supposed to work when a hyperlink is clicked or when the set time runs out (Working Macro).

View 5 Replies View Related

Save Excel Sheet To A Specific Location Through Macro

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

Save Data In Current Form

Feb 23, 2014

I've set up a series of linked spreadsheets that feed data to an overall sheet. I work in a school, and each day the staff fill in student data, which then updates back into my overview spreadsheet.

Now the term has finished, I want to be able to store the data, then wipe the spreadsheets so they can be used for the new term (entering student data each day).

(There are about 20 different files I want to save, and don't want to have to copy/paste values for each sheet!)

View 4 Replies View Related

Save File To Current Folder

Apr 23, 2009

I'm running a macro that intially opens an input box where you specify the filepath and name of a .ped file to import into the macro. The default path of H:BOM2.ped may not always be the path I use. It may be just H:.ped or H:Bom1.ped.

HTML INITIAL CHECK
Response = MsgBox(".............do you want to import BOM data?", vbYesNo)
Do Until Response = vbNo
'SELECT RAW FILE
Dim Message, Title, Default, MyValue
Message = "Please Enter PathFile Name for Source File"
Title = "Create CHINA INSPECTION REPORT(s)" ' Set Title.
Default = "H:BOM2.ped" ' Set Default.......

View 9 Replies View Related

VBA Code To Save As Name & Current Date

Feb 15, 2010

I want to schedule a print, for lets say every Sunday at midnight. I have managed to find some what of a solution by using the following vbscript and scheduling a print to default printer. Works perfectly if that is all I wanted.

Dim objExcel, objWorkbook, strFile
' Connect to Excel
Set objExcel = CreateObject("Excel.Application")
strFile = "C: est.xls"
' Open the Excel File for Printing
Set objWorkbook = objExcel.Workbooks.Open _
(strFile)
' Print to Default Printer
Set objSheet = objExcel. ActiveWorkbook.Worksheets(1)
objSheet.PrintOut
objExcel.ActiveWorkbook.Close
objExcel.Application.Quit

I do not want to print to an actual printer, therefore if I set my default printer as the document writer, the vbscript gets it as far as the "Save As" page. Is there a way I can add to this vbscript so it will save as well? Can I get it to save as "name"&[DATE], thereby having it save as a different name each time?
Can I change this vbscript to print to a named printer rather then a default printer? I am sure a PDF convertor may be of some assistance with this, but I do not have an PDF converter on my computer, and as this will be carried out on a computer that I will not have administration rights, I can not download one.

View 2 Replies View Related

Email And Save Worksheet As PDF With Current Date?

Nov 6, 2009

I have a spreadsheet that I send emails from. Currently I use the .PrintOut command just before .send and it prints the email to the default printer. Instead of printing to the printer i want to print the email to pdf or any file for archive purposes. I would also like the file to be located on a network drive with a file name from a cell in the spreadsheet with todays date. Is this possible?

Currently the code looks like this:

VB:
With OutMail
.to = sh.Range("A1").Value [code]....

View 9 Replies View Related

Email And Save Worksheet As PDF With Current Date

Nov 6, 2009

I have a spreadsheet that I send emails from. Currently I use the .PrintOut command just before .send and it prints the email to the default printer. Instead of printing to the printer i want to print the email to pdf or any file for archive purposes. I would also like the file to be located on a network drive with a file name from a cell in the spreadsheet with todays date. Is this possible?

With OutMail
.to = sh.Range("A1").Value
.CC = ""
.BCC = ""
.Subject = sh.Range("H1").Value & " " & sarBody
.HTMLBody = strbody & "<br><br>" & "<H3><B>Specific Notes, If any...</B></H3>" & vbCrLf & varBody & Signature
.PrintOut
.send
End With

View 9 Replies View Related

Save File Under Current Name In A Selected Location

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

Save Workbook As Current Date & Time

Jun 22, 2007

I'm trying to save a file with current date and time...I used the code from the following thread:

Save File Name With Date/time Stamp

ActiveWorkbook.SaveAs Filename:="C:FinalOutput.xls " & _
format(Now(), "mm_dd_yyyy hh mm AMPM"), FileFormat:=xlNormal, Password:="", _
WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False

Now when I try to run the macro, it gives me an error saying: Compile Error, Wrong number of arguments or invalid property assignment. And it highlights "format" in yellow.

View 9 Replies View Related

Macro To Save Excel Sheet As Comma Delimited Text File?

Apr 21, 2014

providing a macro to save an excel sheet to comma delimited txt file. Also, My sheet has 1st row as table columns and i dont want to export them in my txt file.

View 14 Replies View Related

Save To A Folder That Is Current Month And Have It Save To Next Month?

Jul 14, 2014

Here is a macro I am using to save a workbook using 'Save As' .

I have it open a template workbook we use, and then perform a save as, pathed to a specific folder on the desktop. We do this every night just before midnight.

What I haven't been able to figure out is how to have it save to the next month folder (The folders with the name of all the months are already created) on the last day of each current month.

For example. In my code, the final folder in the path is the current month July. On July 31 when I run the macro, I would like it to save it in the folder called August.

Is there a way to code this so it will recognize what the current month is and then at the end of each current month save it in the next month?

[Code] .....

View 12 Replies View Related

Save Word Document With Current Date From Within Module

May 5, 2006

I am using a module to create and save a Word document from an Excel module. I'm using the following line to save the document which works fine but (and this is a big BUT)(to quote a TV programme from long ago) obviously everytime I save the document it will overwrite itself. Is there a way of adding the date it is saved on to the file name so it creates a new document each time.

objWordDoc.SaveAs Filename: = "WAGReport"

I have tried changing it like this but get an error message

Dim dtMyDate As Date
dtMyDate = Format(Date, "DDMMYY")
dtMyDate = Sheets("Client Master").Range("d2")
objWordDoc.SaveAs Filename: = "WAGReport" & dtMyDate

View 3 Replies View Related

Save Workbook With Current File Name To Specific Folder

Dec 4, 2007

I recorded a macro to save a workbook to a specific folder using the current file name. However, I've tried to remove the absolute reference to a specific filename but it is not working for me. Am I close?

ActiveWorkbook.SaveAs Filename:= _
"H:Files and DocumentsPROJECTSSR 2 SS Phase Two Component ReliabilityWinTrac Files xt_conversionsexcel_version" & SheetName _
, FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False

View 2 Replies View Related

Macro To Copy Dynamic Sheet In New Workbook - Save As Temp / Mail And Delete

Sep 15, 2014

Code to copy the sheet that get selected by if-then-elseif statement and paste in a new workbook, save the workbook as temp, email it and delete it,

sub sending_mail

Dim OutApp As Object
Dim OutMail As Object
Dim rng As Range
Dim DataWB As Worksheet

[Code] ......

View 2 Replies View Related







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