Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default After OpenText all pastes from external apps use format from OpenText

I've used the OpenText method to open a txt file as space
delimited. The problem is is that after this macro has
been run, whenever I try to paste into Excel from another
application (Impromptu, Arthur), the data I'm pasting is
inserted as if it's space delimited also. It's as if
some property was altered with the OpenText method and
was not reset, but I can't find any documentation on it.
I have to exit out of Excel in order to get the pastes to
work again. Any ideas? FYI: Excel 2000, Windows XP.

TIA,
Jim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default After OpenText all pastes from external apps use format from OpenText

I use this subroutine to deal with that irritation. Watch for
linewrap.

Sub FixTextToColumns()

Dim rngO As Range

Application.ScreenUpdating = False

On Error Resume Next

Set rngO = ActiveSheet.UsedRange.SpecialCells(xlBlanks).Cells (1)
If rngO Is Nothing Then Set rngO = ActiveSheet.Cells(1, 1)

With rngO
.Value = "Tim"
.TextToColumns Destination:=rngO, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False,
Comma:=False, Space:=False, _
Other:=False, FieldInfo:=Array(1, 1)
.ClearContents
End With

End Sub

HTH
Paul
--------------------------------------------------------------------------------------------------------------
Be advised to back up your WorkBook before attempting to make changes.
--------------------------------------------------------------------------------------------------------------

I've used the OpenText method to open a txt file as space
delimited. The problem is is that after this macro has
been run, whenever I try to paste into Excel from another
application (Impromptu, Arthur), the data I'm pasting is
inserted as if it's space delimited also. It's as if
some property was altered with the OpenText method and
was not reset, but I can't find any documentation on it.
I have to exit out of Excel in order to get the pastes to
work again. Any ideas? FYI: Excel 2000, Windows XP.

TIA,
Jim


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
Help - Alt-E hotkey does not work in MSOffice apps, no prob in other apps Bob Newheart Excel Discussion (Misc queries) 4 July 28th 08 03:57 PM
Workbooks.OpenText Alistair Eberst Excel Programming 2 October 21st 03 12:50 PM
Using Workbooks.OpenText to read a tab-delimited file into a worksheet Dan E[_2_] Excel Programming 0 August 19th 03 08:02 PM
How do I unprotect cells when using OpenText function? Scott Lyon Excel Programming 1 August 18th 03 10:07 PM
OpenText bug ? Orlando Magalhães Filho Excel Programming 0 August 1st 03 04:14 AM


All times are GMT +1. The time now is 01:04 AM.

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

About Us

"It's about Microsoft Excel"