Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Im trying to open a non excel file ( Textpad kind of file) from excel and then saving it as excel type file using the following code ( I made the code by recording the macro). I added DisplayAlerts statements at the appropriate places so that overwriting could be done . Inspite of the above if dev11112 already exists then I get a message saying that "A file named '......' already exists in that location. Do you want to replace it? Is there something wrong/incorrect in my displayalerts statement? Workbooks.OpenText Filename:= _ "C:\Documents and Settings\abc\Desktop\dev11112.lst", Origin:=437, StartRow _ :=1, DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _ ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=False _ , Space:=False, Other:=False, FieldInfo:=Array(1, 1), _ TrailingMinusNumbers:=True DisplayAlerts = False ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\abc\Desktop\dev11112.xls", FileFormat:=xlNormal, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False ActiveWorkbook.Close DisplayAlerts = True -- Thanks a lot, Hari India |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.Displayalerts = value (is not working for me) | Excel Programming | |||
DisplayAlerts Intermittently stops working | Excel Programming | |||
application.displayalerts is not working | Excel Programming | |||
Can't Set DisplayAlerts to False | Excel Programming | |||
Application::DisplayAlerts not working | Excel Programming |