Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Opening and closing text files

I am opening a text file that is tab delimited via VBA
code. After I copy the data that I want to copy, then
select the current active worksheet and paste the data, I
close the text file. When I close the text file, I always
get the message

"There is a large amount of data on the clipboard, do you
want to save the data...yes, no, cancel".

Is there a way to close the file without having to answer
this question each time?

Any ideas would be appreciated.

Vince
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Opening and closing text files

Vince,

There are 2 ways:

Use -
Application.Displayalerts = False at the beginning of the code
and
Application.Displayalerts = True at the end.

also include
Application.CutCopyMode = False
after the paste (to clear the clipboard)

steve


"Vince" wrote in message
...
I am opening a text file that is tab delimited via VBA
code. After I copy the data that I want to copy, then
select the current active worksheet and paste the data, I
close the text file. When I close the text file, I always
get the message

"There is a large amount of data on the clipboard, do you
want to save the data...yes, no, cancel".

Is there a way to close the file without having to answer
this question each time?

Any ideas would be appreciated.

Vince



Reply
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
Opening text files Sandy5590 Excel Discussion (Misc queries) 0 October 15th 09 04:35 PM
OPENING AND CLOSING OF EXCEL 07 FILES hot-rod-3 Excel Discussion (Misc queries) 2 July 23rd 09 12:30 AM
Excel 2003/2007 Crash when opening/closing files Richard NYC Excel Discussion (Misc queries) 1 October 18th 07 08:22 AM
Opening large text files freekrill Excel Discussion (Misc queries) 6 September 7th 05 04:44 AM
Opening text files using macro Ron de Bruin Excel Programming 0 July 9th 03 02:49 PM


All times are GMT +1. The time now is 12:41 AM.

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"