Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() What I am trying to do is run a macro that will take a dat file, then d the MOD and save into excel. Then take another dat file do the same MO and save it in another worksheet within the same workbook file. So guess my gold is to try to save many worksheets within one workbook. Thanks for your help. ==== Set MonarchObj = CreateObject("Monarch32") With MonarchObj openfile = .SetReportFile("D:\Cash and Ad Report\cash0902.dat", False) If openfile = True Then openmod = .SetModelFile("D:\Cash and Ad Report\Cash_Adj_Rpt.mod") If openmod = True Then .CurrentFilter = "Cash01" .ExportTable ("D:\Cash and Ad Report\Cash_Adj_Rpt_09.xls") Workbooks.Open Filename:="D:\Cash and Ad Report\Cash_Adj_Rpt_09.xls" Sheets(1).Copy Befo=Workbooks("Book1").Sheets(1) End If End If openfile = .SetReportFile("D:\Cash and Ad Report\cash0903.dat", False) If openfile = True Then openmod = .SetModelFile("D:\Cash and Ad Report\Cash_Adj_Rpt.mod") If openmod = True Then .CurrentFilter = "Cash02" .ExportTable ("D:\Cash and Ad Report\Cash_Adj_Rpt_09.xls") Workbooks.Open Filename:="D:\Cash and Ad Report\Cash_Adj_Rpt_09.xls" Sheets(1).Copy Befo=Workbooks("Book1").Sheets(1) End If End If .CloseAllDocuments .Exit End With Application.Quit End Su -- bawaho ----------------------------------------------------------------------- bawahoo's Profile: http://www.excelforum.com/member.php...fo&userid=1510 View this thread: http://www.excelforum.com/showthread.php?threadid=27168 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Shared workbook - to save or not to save | Excel Discussion (Misc queries) | |||
I have a workbook of 12 worksheets. I want to only save one. how? | Excel Discussion (Misc queries) | |||
Select sheet tabs in workbook & save to separate workbook files | Excel Worksheet Functions | |||
save button in excel to save one of the worksheets with a cell value as its name | Excel Programming | |||
What commands do you use to name a workbook, save a workbook,open a workbook | Excel Programming |