Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem Importing Delimited Data from IE

I am having a problem with getting the delimited text data
from IE to the clipboard to cell "A1". I can copy all data
into a single cell. I am trying to mimic the manual
process of Selecting All on a delimited text web page,
Copy and then Pasting it into my worksheet. I have Office
2K

I have tried:
Clipboard.Clear
Clipboard.SetText ie.Document.Body.InnerText.Copy
(I got this from working VB6 code)
It fails at the first reference of the Clipboard so I
didn't show the rest.

I've tried the following also:
ie.Document.Body.InnerText
Destination:=ActiveWorkbook.Worksheets(1).Range("A 1")

Any Ideas?
Thanks,
Jim
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem Importing Delimited Data from IE

Excellent suggestion Tom - Many thanks

Here's what I did:

Dim ie As Object
Dim ABC As New DataObject
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate sURL_Link
Do Until ie.ReadyState = 4 'Busy
DoEvents
Loop

ClearClipboard
ABC.SetText ie.Document.Body.InnerText
ABC.PutInClipboard
Worksheets(PrefixedPN).Select
Range("A1").Select
GetOffClipboard
ActiveCell.PasteSpecial

Here's The Additional Code from Chip Pearsons Site that I
used.
Public Sub PutOnClipboard(Obj As Variant)
Dim MyDataObj As New DataObject
MyDataObj.SetText Format(Obj)
MyDataObj.PutInClipboard
End Sub
Public Function GetOffClipboard() As Variant
Dim MyDataObj As New DataObject
MyDataObj.GetFromClipboard
GetOffClipboard = MyDataObj.GetText()
End Function
Public Sub ClearClipboard()
Dim MyDataObj As New DataObject
MyDataObj.SetText ""
MyDataObj.PutInClipboard
End Sub

-----Original Message-----
there is no clipboard object in VBA. The closest is the

DataObject.

See Chip Pearsons page on this for examples of how to use

it.

http://www.cpearson.com/excel/clipboar.htm

--
Regards,
Tom Ogilvy


Jim W. wrote in message
...
I am having a problem with getting the delimited text

data
from IE to the clipboard to cell "A1". I can copy all

data
into a single cell. I am trying to mimic the manual
process of Selecting All on a delimited text web page,
Copy and then Pasting it into my worksheet. I have

Office
2K

I have tried:
Clipboard.Clear
Clipboard.SetText ie.Document.Body.InnerText.Copy
(I got this from working VB6 code)
It fails at the first reference of the Clipboard so I
didn't show the rest.

I've tried the following also:
ie.Document.Body.InnerText
Destination:=ActiveWorkbook.Worksheets(1).Range("A 1")

Any Ideas?
Thanks,
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
How to use first row of delimited file for field names when importing ? goldtech New Users to Excel 1 October 21st 11 06:57 AM
Importing text file and changing default to delimited [email protected] Excel Discussion (Misc queries) 0 April 30th 08 11:45 PM
Importing MM:SS From Tab Delimited File and Charting Bryan Charts and Charting in Excel 4 July 28th 06 04:14 PM
Importing Comma delimited file Patsy Rogge Excel Discussion (Misc queries) 2 April 20th 06 02:50 PM
Importing a part of a big comma delimited csv-file smari Excel Worksheet Functions 0 October 6th 05 02:32 PM


All times are GMT +1. The time now is 07:10 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"