Compress The Worksheet File

Mar 6, 2007

i'm using the following code to compress a worksheet, but i get an error message that i would like to surpress...


'zip
On Error Resume Next
Dim FileNameZip, FolderName
Dim strDate As String, DefPath As String
Dim oApp As Object
DefPath = "c: empsalesmanMDBed"
If Right(DefPath, 1) <> "" Then
DefPath = DefPath & ""
End If
FolderName = "c: empsalesmanMDBed" '<< Change..................

View 9 Replies


ADVERTISEMENT

Compress Worksheet File

Jul 25, 2007

i'm still have troubles compressing an external xls file from within another xls file...?

(sorry...i did a search...)

???

(have to post the current code)...

View 5 Replies View Related

Compress The Formula Is Too Long

Nov 13, 2008

how can in compress the following formula

=IF(B3="Monthly",IF(B25="Windows 2003 Std",15,IF(B25="Windows 2003 Ent",30,IF(B25="Windows 2008 Data Center ",40,IF(B25="RHEL 5","30",IF(B25="Windows 2008 Web","15",0))))))+(IF(B3="Quarterly",IF(B25="Windows 2003 Std",40,IF(B25="Windows 2003 Ent",75,IF(B25="RHEL 5","89",IF(B25="Windows 2008 Data Center ",120,IF(B25="Windows 2008 Web","45",0))))))+(IF(B3="Semi-Annually",IF(B25="Windows 2003 Std",75,IF(B25="Windows 2003 Ent",140,IF(B25="Windows 2008 Data Center ",200,IF(B25="RHEL 5","149",IF(B25="Windows 2008 Web","90",0)))))))+(IF(B3="Annually",IF(B25="Windows 2003 Std",150,IF(B25="Windows 2003 Ent",300,IF(B25="RHEL 5","299",IF(B25="Windows 2008 Data Center ",400,IF(B25="Windows 2008 Web","180",0))))))))

View 5 Replies View Related

Compress The Lines In The Report

Feb 12, 2009

I need a macro where I can compress the lines in the report below. By other words will I end up with totals on lines with the same text information. This report can have different number of lines, so it is an advantage if the macro is dynamic.

BD 000012EXPI2CAC2009SBU48595,98
BD 000013EXPI2CAC2009SBU338903,14
BD 000013EXPI2CAC2009SBU1887610,1
BD 000013EXPI2CAC2009SBU154462,84
BD 000013EXPI2GAC2009SBU739214,99
BD 000014EXPI2CAC2009SBU111295,82

View 6 Replies View Related

Store & Compress Old Workbook Versions

Mar 19, 2007

I'm looking for is ComplyXL and that costs $300 to buy. So, as a poor grad student, I'm looking for an alternative solution - either a freeware program or a hassle-free VBA code.

So here's what I need the code or program to do: When I ask excel to open a pre-existing file, I'd like it to automatically rename (& compress?) the last used version of the file & save that to a filename-specific archive somewhere (hidden?), before opening the file as requested. Alternatively, I suppose that a mirror copy of each 'just used' file could be created & saved to an archive folder whenever the used file is saved & closed.

--Note: to avoid making copies of EVERY workbook I ever use, I suppose there should also be a button in the toolbar or a file-associated setting that lets me identify which files I want this task to apply to...

Basically I'm looking to have excel automatically save versions of certain key files (like Word's 'Versioning' feature) without having to remember to 'Save As', without the versions taking up much space, and without having to store the older file versions in the same place as the most recent one.

And yes, I know that a similar problem has already been posted & solved here, but they didn't include a way to choose which files used versioning nor (if it's possible) a way to compress the archived versions to save space (maybe by adding it into a WinRAR archive somewhere?).

View 11 Replies View Related

Expand / Compress List With Buttons

Jan 27, 2012

I am trying to make a spreadsheet for a customer and would like to include a feature where the list of parts can be expanded or compressed with buttons.

Each SO# has a set of PO#'s associated with it, and it would be nice if the viewer can choose to see the PO#'s or not see them at will (this will make a lot more sense if you see the spreadsheet example in my link.)

Ideally, there would be a button next to each "SO#" which would expand/compress accordingly. I don't want just a universal button that would expand/compress all of the SO# at once (although having this option on the side would be nice).

here's link to my spreadsheet: [URL]....

View 2 Replies View Related

Compress Data For Annual Return - VBA

Mar 4, 2014

I have the data as below. And to submit this to the third party is needs to be compressed (a total for each Full time ANNUAL salary).

RULES

All total monthly earnings must start from 0 when a "Full time ANNUAL Salary" is added or endedIf the Annual amount misses a month I need to assume the salary has ended

I hope this makes sense.

Below is test data for one person. And the result i am hoping to get with some comments.

Employee
Full time ANNUAL salary
Monthly earnings
Pay date from
Pay Date to

[Code]....

The result of the above would be:

Employee
Full time ANNUAL salary
Monthly earnings
Pay date from
Pay Date to
Comments

[Code]...

15k started 01/06/2013 so the total for the 10k starts again, alongside total for 15k

Chris
£15,000.00
£450.00
01/06/2013
31/08/2013

[Code]...

15k started 01/12/2013 so the total for the 10k starts again, alongside total for 15k

Chris
£15,000.00
£150.00
01/12/2013
31/12/2013

[Code]...

10k ended, 20k started 01/01/2014 so total for 15k starts again, alongside total for 20k

Chris
£20,000.00
£400.00
01/01/2014
28/02/2014

[Code]...

20k ended so total for 15k starts again

View 2 Replies View Related

Excel 2010 :: Compress Images In Save As Box?

Oct 14, 2013

Here is something I have noticed with using Compress Images in 2010.

When I run Compress Images from the save as dialog box in 2007, the file size is slightly larger than if I run it in 2010. However, if I then send the resulting excel file out to people, if they are viewing it on an iPad, then they cannot see the images at all from the 2010 version but can see them fine if the excel file is from the 2007 version (with exactly the same data and images in there).

I cannot figure out why this may be. The options on both are set as "Email (96ppi)" and with "Delete Cropped areas of pictures" ticked.

View 3 Replies View Related

Compress/Join Two Tables Into 1 Under Respective Headings

Jun 5, 2008

Have two tables of data the first is shown below (the first line is headers)

DogCatReptileMonkey
SmallBigNosyFluffy
SmellyNosy

The second is (again first line is headings)

SmallSmellyBigNosyFluffy
AAGFF
BGHGE
CTUBQ

Need to create code which reads the first table, finds the categories of the first table in the second table and puts these with the original headings into a new table so in this example the end table would look like -

DogCatReptileMonkey
AGFF
BHGE
CUBQ
AF
GG
TB

My original has about 150 headings in table A and B hence why I have given an example

View 5 Replies View Related

Locate CSV File With Open File Msgbox And Import Columns From CSV To Worksheet

Oct 28, 2011

Actually i've downloaded Tracking report of my SPO and this report is on 4-5 csv files (1 file per week). I have to gather data from these 4 files into one Worksheet. I have to do this with command button on my worksheet; with Open file dialogue box (i want to locate the csv files).

CSV files are something like that (I need only first 4 columns):

ABCDE1Name MSISDN Date Location MapLink 2M. Younus Safi "923***550577" "2011-10-07 20:36:18" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 3M. Younus Safi "923***550577" "2011-10-07 19:36:26" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 4M. Younus Safi "923***550577" "2011-10-07 16:39:58" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 5M. Younus Safi "923***550577" "2011-10-07 15:37:23" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com" 6M. Younus Safi "923***550577" "2011-10-07 14:37:05" "ACB Tower Badragah Chakwal. Badraga" "http://asdf.com"

and my Worksheet is like that (With a command Button):

I want to import first 3 columns of csv file on first 3 columns on my worksheet; leave 2 columns blank and then import the 4th column... now for example i have done importing data from 1st csv file and the data is on 50 rows.. i click the command button again, locate the 2nd csv file.. do the same thing (import 1st 3 columns, 2 blank, then 4th) --from 51st Row-- and so on...

ABCDEF1NameMSISDN DatedBlankBlank Location2

3

4

5

6

7

View 4 Replies View Related

Save Each Worksheet As PDF File And Name Each File Based On Cell Value In Each Sheet

Jul 10, 2014

I have a Workbook that already has a macro in it that will generate multiple sheets based on certain criteria.

For each of these newly generated sheets (numbered 1-6 in the attached example), I need to be able save each of them to a PDF file based on a unique name contained in a certain cell (in this case, each named is referenced in cell Q1 of each sheet). As such, I should end up with 6 pdfs based on the attached sample files.

The PDFs would ideally need to be landscaped and should be just 1 page per sheet.

In my attached sample workbook, you'll notice that I have a "PracticePrint" macro that doesn't quite get the job done. One other criteria involves not printing any sheet with the characters "1010" in it (my PracticePrint macro is setup to do that, but it fails to do much else).

View 1 Replies View Related

Macro To Save Worksheet As New File Then Return To Original File

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

Macro To Select All Worksheet And Save File As File Name?

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

Copy The Same Cells On Different Worksheet On Different File On A Master File

Aug 3, 2006

I have certain excel file that i want to be able to write a macro in order for it to extract certain information from certain cells on different sheet. In other words, i want cell A2 from each of the three different worksheet i have under different files. And have those data automatically update a master excel or access file whichever might be easier.

View 4 Replies View Related

Saving WORKSHEET File

Apr 20, 2009

Saving WORKSHEET file. I'm using this code:

View 4 Replies View Related

Run VBS File For Open Worksheet

Feb 20, 2013

I want to be able to run the following lines of code to edit all xy-scatter plots on worksheet that is currently open by clicking and running a .VBS file. This is the code that works in excel in my macro. I'm having trouble getting the .VBS file to execute and run correctly. I realize I don't need the dim statements for the .VBS file, and have been able to get it to run without errors, but it doesn't edit the chart.

Code:
Sub ChartLineWidth()
Dim c As Chart
Dim s As Series
For Each co In ActiveSheet.ChartObjects()
Set c = co.Chart
For Each s In c.SeriesCollection
s.Format.Line.Weight = 1
Next s
Next co
End Sub

View 1 Replies View Related

How To Save Worksheet To CSV File

Jul 7, 2014

As a newbie to macros I am having trouble trying to save a worksheet to CSV file. The macro worked to .txt but when I change it to .xlCSV it comes up with runtime 1004 error, method 'save as' of object '_workbook' failed.

Sub Export7400_setup_Click()
'
' Exportsub Macro
'
Dim sPath As String
Dim FName As String
FName = Range("rng7400Filename")
sPath = Range("strWorksheetPath")

[Code]...

View 3 Replies View Related

Copy 40 CSV File In To One WorkSheet

Oct 7, 2006

I have about 50 CSV files in a directory named C:POSTAL. Each file has about 4000 records with three fields, Name, Address, Phonenumber. I would like to find some way to combine them into one large CSV file named ALLRECS.CSV so that other parts of the program can open that file and search it by Phonenumber, so I can display the Name and address on the screen. Obviously it is too large for Excel, at the moment. In old DOS you were able to use

copy *.CSV ALL.CSV"

to combine all the CSV files into one. Every now and then I want to delete the old ALLRECS.CSV file and replace it with a new one, as we update the phone numbers in the individual 50 files. For example I would like to use a button so the user can simply update whenever they wish by clicking on it, deleting the old and adding the new.

View 2 Replies View Related

Saving A Worksheet As A File

Oct 24, 2006

I have a workbook which utilizes 2 worksheets to fill a third. I would like a macro to be able to save JUST that worksheet, and not the other two. I thought there was a checkbox allowing you to "save selected" only, but I'm either dreaming, or it was in a previous version of Excel (I know use Excel 2000).

View 9 Replies View Related

Worksheet, File Name From Cell Value

Feb 19, 2007

I have been poking around here for years before i registered, always finding the answers that i need for excel and vba without having to ask. However i have a simple(?) question i can't seem to find the answer to -

I am making a timecard that has a 'save' macro button that when the user clicks, it will name the sheet and the file the same value (from a cell on the sheet) and save it in the same folder as the timecard template. (if you need it, the name will be employee code + weekending date) also, my excel knowledge is pretty good, but with VBA, i seem to know about enough to get myself into trouble...

View 4 Replies View Related

Exporting Figures From A Worksheet To A File

Jan 13, 2009

I'm trying to to take a picture from a Worksheet and save it back to file in a Windows folder via macro.

I've been searching thru Excel help and internet and I didn't see any solution.

View 2 Replies View Related

Columns From Worksheet To Text File...

Sep 14, 2009

Need toretrives 2 column values from an excel sheet and write it as a text file.

View 3 Replies View Related

Save One Worksheet As A .CSV File With Macro

Jan 7, 2010

So I am trying to design a workbook that has two worksheets... one with instructions and a button for users to click to "Save as .CSV File", another for the data that will go into that CSV file.

Here are the Macro requirements:
1. The user will be prompted for the File & Location to save the .CSV file
2. If they click 'Cancel', no changes will be made (and unlike my current code, it won't ask them to debug).
3. Confirmation of the filename is not necessary even though it's currently included in my Macro
4. The file will automatically "reopen" so that they only see the new .CSV file without the original Instruction tab.

View 2 Replies View Related

Updating Worksheet Data From New CSV File?

Dec 14, 2011

I keep track of returns for my company and I am pulling a CSV file with all of the information on it.

I want to be able to format the info and create new columns for info I enter in to the sheet, and be able to import the updated CSV file into my already formatted sheet.

The part that I am wondering about is, after I import my first CSV file(sheet1) do I need to create another sheet(sheet2) and format sheet2 and have it pull the info from sheet1, then when I update workbook1 the data will update in sheet2?

Or, is there a way to just import the new data a single formatted sheet that I created from the old data and have it just add the new data without messing up any of my formatting?

View 2 Replies View Related

Copy Worksheet From Closed File - VBA

Sep 8, 2012

I have 2 workbooks, and want to copy an entire worksheet from 1 to the other workbook.

In the closed workbook, I want to copy "Sheet1", and paste that into the open workbook on worksheet "Original File". What code do I need to complete this?

View 1 Replies View Related

Download XLS File From Net And Save New Worksheet As Name

Oct 6, 2012

Ticker = "ABC"

I have made a url

[URL] ......

And try to open it

Workbooks.Open(url)

But I get the error

Object does not support this property or method

I am trying to download an xls file, copy the data to a worksheet with the name "ticker" and then close the xls download file

View 3 Replies View Related

Import Text File Into One Worksheet?

Jun 5, 2013

The Workbooks.OpenText works for me, but I need to import the text file into one worksheet of an existing workbook. Is there a method to do this?

View 1 Replies View Related

Worksheet To PDF File LOOP ERROR

Mar 23, 2014

This is the code I am using, I can not remember where I got it from.

Code:
Sub PDF()
' Saves marked sheets as PDF file.
Const PDF_path = "c:
eports"
Dim Snr As Integer
Dim Name As String
'Process all sheets in workbook

[code]....

This outputs all worksheets that have a specific value for A1, "Y".

My problem is it always prints exactly one too many, an extra copy. I think it may have to do with a broken loop?

View 1 Replies View Related

Rename Worksheet With Opening The File

Dec 12, 2008

I have the following code, which I use to open up a .xls file generated from Crystal Reports:

Application.ScreenUpdating = False
Application.DisplayAlerts = False

Dim fexport1 As String ' variables for the exported file
Dim fexport2 As String
Dim wb1 As String 'variables to change between the opened workbooks
Dim wb2 As String
strTemp = "Please Choose The Exported File"
MsgBox strTemp
fexport1 = Application.GetOpenFilename("Excel Files (*.xls), *.xls)")
If InStr(fexport1, "False") = 0 Then
Workbooks.Open fexport1
wb1 = ActiveWorkbook.Name

Else
strTemp = "Operation Canceled"
End If

The problem is that Crystal Reports generates the file with an invalid worksheet name (it contains a backslash) and I do not have access to modify the Crystal Report. Althought the file can be automatically repaired by Excel when manually opened, the macro chokes and the "Application.DisplayAlerts = False" does not fix it. The only solution I can think of is renaming the worksheet without opening the file.

View 9 Replies View Related

Naming Worksheet As Part Of File Name

Mar 15, 2009

I have a macro to loop through the files in a folder. The macro will then open up the files and copy over to a new workbook.

As I want to rename the worksheets created in the new workbook as part of the file name. Any idea how to extract the file name out and stored in a string?

Currently it will be named after the Cell A1 in the opened file. However I would like to rename as below.

Example, the file name : 030309_Mary Sales.xls, Worksheet Name to Create : Mary Sales.
File name : 030309_John King, Worksheet Name : John King

(in the code, 030309 taken from my menu sheet,D4 is the keyword , to search in files containing D4, where D3 is the directory to look in)

Sub RunCodeOnAllXLSFiles()

Dim lCount As Long
Dim wbResults As Workbook
Dim wbCodeBook As Workbook

Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False

On Error Resume Next

View 9 Replies View Related







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