LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 157
Default Displayalerts not working

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Application.Displayalerts = value (is not working for me) [email protected] Excel Programming 3 December 18th 04 02:00 AM
DisplayAlerts Intermittently stops working Daniel[_11_] Excel Programming 1 June 17th 04 09:32 AM
application.displayalerts is not working will lam Excel Programming 2 April 30th 04 08:21 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 1 April 6th 04 10:45 PM
Application::DisplayAlerts not working Howard Dierking Excel Programming 2 February 11th 04 12:04 PM


All times are GMT +1. The time now is 03:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"