Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I made a macro that formats an excel document. I import information
into excel then format it to export to another company. I made the macro save the workbook onto the outgoing server as a .csv file. The other company's system then automatically comes and picks up the saved workbook and puts it into their system. Here is my code: Sub Macro3() ' ' Macro3 Macro ' Macro recorded 5/31/2006 by UnumProvident Corporation ' ' ActiveWorkbook.SaveAs Filename:= _ "O:\UA\UAna\NA_Outsourcing_Administration\Tenet\Re ports\2006 Weekly reports\full reports\week ending." & Format(Now(), "mm-dd-yyyy.") & ".xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False Rows("1:1").Select Selection.Insert Shift:=xlDown Columns("N:P").Select Selection.Delete Shift:=xlToLeft Columns("I:I").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="Closed" Cells.Select Selection.Delete Shift:=xlUp Rows("1:1").Select Selection.Insert Shift:=xlDown Columns("I:I").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="New" Cells.Select Selection.Delete Shift:=xlUp Rows("1:1").Select Selection.Insert Shift:=xlDown Columns("I:I").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="req complete" Cells.Select Selection.Delete Shift:=xlUp Rows("1:1").Select Selection.Insert Shift:=xlDown Columns("I:I").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="Missing Info" Cells.Select Selection.Delete Shift:=xlUp Rows("1:1").Select Selection.Insert Shift:=xlDown Columns("I:I").Select Selection.AutoFilter Selection.AutoFilter Field:=1, Criteria1:="Pending" Cells.Select Selection.Delete Shift:=xlUp Columns("I:I").Select ActiveWorkbook.SaveAs Filename:= _ "B:\Hewitt\TenetHealthCare\NA\LIF\Out\BAS05980.P.E FT.EOIIN.UNUMLIF.csv", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False ActiveWorkbook.SaveAs Filename:= _ "O:\UA\UAna\NA_Outsourcing_Administration\Tenet\Re ports\2006 Weekly reports\reports to server\BAS05980.P.EFT.EOIIN.UNUMLIF" & Format(Now(), "mm-dd-yyyy") & ".csv", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False End Sub This section: ActiveWorkbook.SaveAs Filename:= _ "B:\Hewitt\TenetHealthCare\NA\LIF\Out\BAS05980.P.E FT.EOIIN.UNUMLIF.csv", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False Is what saves the file to the server to be picked up. This is what the company says they are getting: [ ] ) _ V B A _ P R O J E C T _ C U R " F d { d V B A "#,##0.00_);Red\("$"#,##0.00\) 7 * 2 _("$"* #,##0_);_("$"* \(#,##0\) 769-10-1114 EE MANUEL-BAILLY SA a e d MbP?_ * + % ~ l@ I can not imagine what is causing this. If I look at the file once it is placed on the server it looks like a normal CSV file. Is there something I have done wrong in my code that makes this crazyness show up? Thanks! Mary |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with saving Excel Template opened in macro | Excel Programming | |||
Excel file not saving properly | Excel Discussion (Misc queries) | |||
Excel file not saving properly | Excel Discussion (Misc queries) | |||
macro saving problem | Excel Worksheet Functions | |||
Can't get CF to work properly, Active Cell problem? | Excel Programming |