Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hard to tell what you did. For example, in your original code
Set wkbk = ActiveWorkbook For i = LBound(varr) To UBound(varr) Workbooks.OpenText Filename:=tName, _ you open a workbook tName, but you never set that variable so your array of names it totally unused. Yet you say the code is working. Yes, I did omit a closing paren: wkbk1.SaveAs Filename = left(wkbk1.name, len(wkbk1.name)-4 & ".xls", _ should be wkbk1.SaveAs Filename = left(wkbk1.name, len(wkbk1.name)-4) & ".xls", _ No, there is nothing wrong with the statement you cite - since it hasn't been executed yet when your error occurs, that would be even more reason not to look there. for some reason, it is opening a workbook named False.xl I would assume. Probably the product of some previously flawed code being run. If you want to delete existing workbooks with duplicate names, you can use the kill command Or you can suppress the message with DiplayAlerts. -- Regards, Tom Ogilvy "waveracerr " wrote in message ... Thanks for the help, I still cannot get the macro to save the workbook. Excel gives me an error, "Run-time error '13': Type mismatch". I included a missing ")" after the number "4" in the code and then find Excel telling me the file "False.xls" already exists and do I wish to save over it... I click "No" and then find the following code is highlighted in debug mode: wkbk1.SaveAs Filename = Left(wkbk1.Name, Len(wkbk1.Name) - 4) & ".xls", _ FileFormat:=xlWorkbookNormal I wonder if the code under the above code has anything to do with this problem? wkbk1.Close SaveChanges:=False Thanks for any help! Ryan --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
emailing files from excel, the files will not go until I open up . | New Users to Excel | |||
how do I toggle between 2 open excel files and leave both open | Excel Discussion (Misc queries) | |||
How to change default Open/Files of Type to "Microsoft Excel Files | Excel Discussion (Misc queries) | |||
I can't open any excel files | Excel Discussion (Misc queries) | |||
Excel files won't open | Excel Discussion (Misc queries) |