Worksheets within one Workbook

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 Adj Report\cash0902.dat"
False)
If openfile = True Then
openmod = .SetModelFile("D:\Cash and Adj Report\Cash_Adj_Rpt.mod")
If openmod = True Then
.CurrentFilter = "Cash01"
.ExportTable ("D:\Cash and Adj Report\Cash_Adj_Rpt_09.xls")
Workbooks.Open Filename:="D:\Cash and Adj Report\Cash_Adj_Rpt_09.xls"
Sheets(1).Copy Before:=Workbooks("Book1").Sheets(1)
End If
End If

openfile = .SetReportFile("D:\Cash and Adj Report\cash0903.dat"
False)
If openfile = True Then
openmod = .SetModelFile("D:\Cash and Adj Report\Cash_Adj_Rpt.mod")
If openmod = True Then
.CurrentFilter = "Cash02"
.ExportTable ("D:\Cash and Adj Report\Cash_Adj_Rpt_09.xls")
Workbooks.Open Filename:="D:\Cash and Adj Report\Cash_Adj_Rpt_09.xls"
Sheets(1).Copy Before:=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?action=getinfo&userid=1510
View this thread: http://www.excelforum.com/showthread.php?threadid=27169

0
10/22/2004 10:23:52 PM
excel.misc 78881 articles. 5 followers. Follow

0 Replies
212 Views

Similar Articles

[PageSpeed] 30

Reply:

Similar Artilces:

Compare entries in 2 worksheets and list what does not match
Good Day All; I have 2 Excell works sheets with approx 14000 rows each. What I would like to do is compare both lists and get a 3rd list that shows what entries do not match. Is there a simple way to do ythis in Excel Thanks All Chomp Assuming A1 should equal A1 in the other sheet... =IF(Sheet1!A1=Sheet2!A1,"",Sheet!A1&" does not match "&Sheet2!A1) Auto-Filter for non-blanks. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "The Chomp" wrote: > Good Day All; > > I have 2 ...

Update one table from another
I am trying to update one table that has one record for each employee(table 1) with available vacation time. The other table records every time off request(table 2) and how much time they want off. I have the update query and it works fine. The problem is that everytime it is ran every requested time off amount(from table2) is subtracted from the available time(table1) again and again. I want the records for requested time(table2) to update the employee available time off(table1) only once, but keep the records on the table as that is the basis for a report. Thank You, Brett ----=...

Text to columns
Once I use the Text to columns feature in Excel, it seems there is no way to turn it off. Anyone know if there is a way to reset this so that newly pasted text will not continue to get broken up (for example by the space delimiter) Presently the only way is to exit Excel and restart Excel - then pasted text all goes into one cell regardless of spaces. Hope I explained that well enough Al I may have been to hasty in making this assumption, it appears that the problem I described below is only happening on one workstation - this may indicate that the Excel Registry keys are in need of...

Copying data from one chart to another
I have many graphs - all plotting on similar scales but using different data. Is there any way I can simply copy one set of data from one graph and paste it into another graph so that I can avoind going through all the hassle plotting each curve again? I want to have graphs showing different combinations of the same data and have hundreds of curves to plot so this could be a huge timesaver... Cheers. -- Alan_Partridge ------------------------------------------------------------------------ Alan_Partridge's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=29295 V...

Can I abbreviate one value in a data series?
I've got a chart where one value (8,300) greatly exceeds all the others. Is there a way to abbreviate this value so the other data points show better in the graph? Hi, One way is to break the Y axis, have a look at these examples of how to http://peltiertech.com/Excel/Charts/BrokenYAxis.html http://tushar-mehta.com/excel/newsgroups/broken_y_axis/tutorial/index.html http://www.andypope.info/charts/brokencolumn.htm Cheers Andy CMEknit wrote: > I've got a chart where one value (8,300) greatly exceeds all the others. Is > there a way to abbreviate this value so the other da...

One Entry to Multiple Rows
I have data that looks like this: X1 | Y1 Y2 Y3 Y4 X2 | Y4 Y5 Y6 Y7 And I need to get to: X1 | Y1 X1 | Y2 X1 | Y3 X1 | Y4 X2 | Y4 ...... etc. I can change the 2nd row's entries to more columns, but that doesn't seem to get me much closer to the needed format (and there are thousands of lines so I'd rather not do it manually). Any ideas? should do it. change mc to suit '===== Option Explicit Sub lineemup() Dim mc As Long Dim mr As Long Dim i As Long Dim lc As Long mc = 3 'col c mr = 1 For i = 1 To Cells(Rows.Count, mc).End(xlUp).Row lc ...

Simple Question-How to create more than one transaction on the Acc
If there is a question already posted let me know. The question is: I created a bank account information on the Account list icon and want to have more than (one)transactions listed and see each payee displayed separately on each page so i could have all the months posted with due dates and total listed. Thank you. In microsoft.public.money, a.j. wrote: >If there is a question already posted let me know. The question is: I created >a bank account information on the Account list icon and want to have more >than (one)transactions listed and see each payee displayed separately ...

Finding characters within a text
Hi How to check, using single formula, that a text within a certain cell contains one of certain characters? For instance, how to check if there is a 'R', 'L' or 'Ps' character within cell A1 that reads 'W-RII'. Thanks in advance Hmm..not very elegant, but maybe =NOT(AND(ISERROR(FIND("R",A1)),ISERROR(FIND("L",A1)),ISERROR(FIND("P",A1)))) Returns TRUE if the text in A1 contains 'R', 'L' or 'Ps' . FIND is case-sensitive, use SEARCH if you also want to find lower-case characters. Cheers, Joerg Mochiku...

Remove file Protection from an Excel workbook file from others
I have an older excel file created by someone who is no longer with my company. I want to use that file as a starting point to created another file. The file is set up as "read only". If I try to change any of the cells, I get the message that the "cell or chart is protected and therefore read only" and further tells me to unprotect before attempting the change. When I got to tools/protection/Unprotect Sheet I get the request for a password. I don't know the password as the file was created by another. I have tried "save as", from tools making sur...

The Sum from 1 worksheet cell to another worksheet cell
the sum from one cell on sheet1 from another cell on sheet2,how do you do the formula qwerty: To sum the value on Sheet1, cell A10 with the cell value Sheet2, cell B20, enter =Sheet1!A10 + Sheet2!B20 (or you can enter '=' sign and click on A10, then enter the plus sign and click on B20) jeff >-----Original Message----- >the sum from one cell on sheet1 from another cell on sheet2,how do you do the formula >. > ...

Somehow I created a Macro in a worksheet.
I created a macro in an Excel worksheet somehow. I didn't try to, it just happened. Now everytime I open that workbook, it asks me if I want to run the macro, disable it, etc. How the hell do I get rid of the macro? It doesn't show up under tools, macros. And it apparently doesn't do anything either because I can disable it and nothing different happens. Who invented this system anyway? Thanks, V When you record a macro, a module is created to store the macro code. There are instructions here for removing the module that is causing the prompt to appear: http://www.c...

organizing hotmail emails within outlook 2003
At home I have outlook 2003 on windows xp configured so that my hotmail email is picked up in outlook. I have outlook on exchange at work and have found that organizing my email by color is invaluable. I tried to organize my hotmail email by color and with rules, however outlook will not let me do so. Is there a way around this? If I could get the mail in my hotmail account into the main default "inbox" under personal folders in outlook then I can organize the email how I want to, however when I try to do this I have no success in doing so. colors are controlled by views, not r...

Excel ask duplicate NAMES when duplicate a worksheets
I have added a NAME called "Above" where point to the cell just above the current cell. The formula is "=INDIRECT("R[-1]C",)" In some workbook, when I duplicate a worksheets, this name will remain silent and work ok. But in some workbooks, when I first duplicate a worksheets, the same name ABOVE will be duplicate and a new local name (belongs to that new worksheet) will be created. If I further duplicate that new worksheets in to a new worksheets, the third worksheets will be warned that a dupicate NAME is existed and ask whether refer to another name or use a ne...

Office 207 One Note
My One Note has been working fine for at least 2 years. Then a couple of days ago two pages of my most important information in my main workbook just disappeared. I'm not sure but none of the other pages look the same. Does anyone have any idea what might have happened? Have had no other computer problems recently. -- Rockymtnwoman -------- Original-Nachricht -------- > My One Note has been working fine for at least 2 years. Then a couple of days > ago two pages of my most important information in my main workbook just > disappeared. > I'm not sure b...

How do add another code to a current one?
I have this following code to make the rows changed based on the critea in column 16, and I need add A "Red, Yellow, Green" for status to only one column 30 at the end of the spreadsheet. How do I add another code? I keep getting an error.. Private Sub Worksheet_Change(ByVal Target As Range) Dim c As Range, clr As Long For Each c In Target.Cells If c.Column = 16 Then Select Case c.Value Case "Analyze": clr = RGB(204, 255, 255) Case "Build ": clr = RGB(204, 255, 255) Case ...

How do I import data from lotus123 & maintain formulas/worksheets
I am trying to convert several complex Lotus 123 workbooks with formulas into Excel 2003. How do I do this and maintain my formulas and the individual tabs (worksheets). hi, if the lotus file is a wks version or earlier, xl should open it and let you save it as an xl file. if the lotus file is a 123 version or higher, you can open the file in lotus and save it as an xl file. if you don't have lotus, find someone who does. "Ineluctable" wrote: > I am trying to convert several complex Lotus 123 workbooks with formulas into > Excel 2003. How do I do this and maintai...

how to insert borders on flyer within Microsoft publisher?
Please help, I'm trying to insert a border around a flyer...I'm using Microsoft Publisher. Thanks, Harriet Is it a clipart border, Borderart or a simple rectangle? What problems are you having? What version Publisher? Any border you insert should be sent to the back so it does not interfere with your main design. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Harriet" <Harriet@discussions.microsoft.com> wrote in message news:7E2ED4D8-CC09-497F-A17C-44AE41F951C9@microsoft.com... > Please help, I'm ...

Bulk sending of emails in Outlook being rejected if one address is wrong.
I am sending bulk emails in BCC and they are all being returned to me because one or more of the email addresses is incorrect. Is there a way to setup Outlook so that the emails go to the correct addresses and the incorrect addresses are bounced back to me? I use the Mail Merge feature and send out a newsletter with over 1000 e-mail addresses (who signed up for the newsletter so it is not spam). My service provider, Comcast, just put a limit of 10 at a time. It's real fun sending these out monthly!! >-----Original Message----- >I am sending bulk emails in BCC and they a...

Can you link 2 worksheets together?
Say i have one worksheet and on my second one I want to reference cells from the first one? is there a formula for that>? To create a simple link: Select a cell in the second worksheet Type an equal sign Select the first sheet Click on the cell that you want to link Press the Enter key. Alesha wrote: > Say i have one worksheet and on my second one I want to reference cells from > the first one? is there a formula for that>? -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html ...

Save custom formats independantly of workbooks?
Hi, Is there a way to save several custom formats (say, numbers in $000's, in $ millions, etc) which I would use for a variety of workbooks (including workbooks where those formats do not exist yet), with a name, and make them accessible from the toolbars? Earlier today someone kindly suggested to assign a name to the format using Format -> Style, but the formats I had saved have disappeared from the style menu once I closed a spreadhseet and used a different one. Any suggestion? Many thanks, Joss Delage ...

one company doesn't show $ amounts in payables for one user
I have a user who has access to multiple companies. The access for all companies is the same. In one company when she goes to Inquiry>purchasing>trx by vendor, the display shows $0 for all transactions. Other companies, she sees the correct $ amount. There are no modified windows and again her security is the same for all companies. Can anyone tell me why this is happening? TIA I am having this exact problem and would appreciate a fix. I have to change users to have the payables inquiry amounts show. I only have this problem in one company and I am the only user in our of...

how to convert a CString variable to unsigned short array one?
Hi, In my unicode VC6 app, how to convert a CString variable to unsigned short array? ....... CString strRst; unsigned short strOleChars[100]; strOleChars = strRst; //??? Thank you. Is ConvertStringToBSTR() what you are looking for? AliR. "David" <David_Wang_Xian@hotmail.com> wrote in message news:e6gbA3avFHA.720@TK2MSFTNGP15.phx.gbl... > Hi, > In my unicode VC6 app, how to convert a CString variable to unsigned short > array? > ...... > CString strRst; > unsigned short strOleChars[100]; > strOleChars = strRst; //??? > > Thank you. > > ...

Prevent copy and paste in one column
I am having trouble trying to prevent copying and pasting in one specific column. The code refers to the specific range, but yet it prevents copying and pasting on the whole worksheet. Option Explicit Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Columns("H:H")) Is Nothing Then Application.CellDragAndDrop = False Application.CutCopyMode = False Else Application.CellDragAndDrop = True End If End Sub Works for me in Excel 2003 Gord Dibben MS Excel MVP On Fri, 30 Apr 2010 11:42:01...

how do I turn off journal for one file #2
I have a number of excel files that run regularly. I how can I turn of individual files so they don't clutter my jouranl in Outlook? ...

Publish A Workbook Onto The Web, Then Access Using My Web Browser.
How do I access my spreadsheet, or workbook, on the web once I've saved it as a webpage from the file menu? I've found that even though I've save my workbook as a webpage, it does not have an http:// address which I can type in my web browser to access the workbook from my home computer or from a remote computer. Should I have to sign up with an http:// service provider or can this all be done from using Microsoft Office XP without going through a third-party? -- sigmad You have to have a website first of all, otherwise, where do you want to host this page? "sigmad&q...