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: 22
Default Copy outside Clipboard contents (html page) to a cell in Excel

hi,

I am trying to copy the contents of a clipboard which was copied from
an html file which has 2 verticals columns viz, 1st column for labels
& 2nd column for Values.
e.g.

first Name | abc
Last Name | fgh
Tel | 12345678
error | flashing adsl

etc.....

I am copying the 2nd column (values) to clipboard by selecting the
cells from top to bottom on html page.

when i goto excel sheet (which has similar 1st column labels in the
first row), i want to place these values under the respective labels
horizontally (transpose).

The below code in Sheet1 does not seem to work.

Please Help!

Warm Rgds,

Sifar
============================================
Option Explicit
Dim MyDataObj As DataObject
Dim LastRow As Long

Public Function GetOffClipboard() As Variant
Dim MyDataObj As New DataObject
MyDataObj.GetFromClipboard
GetOffClipboard = MyDataObj.GetText()
End Function

Sub PasteTxT()
With Worksheets(1)
LastRow = Cells(Rows.Count, "A").End(xlUp).Row
LastRow = LastRow + 1
.UsedRange.Cells(LastRow, "A").Activate
.Range(ActiveCell, ActiveCell).PasteSpecial_ Paste:=xlPasteValues,
Transpose:=True = GetOffClipboard()
End With
End Sub
================================================

 
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
Create HTML code for a hyperlink from cell contents Billy_McSkintos Excel Worksheet Functions 1 January 26th 11 04:20 AM
Copy contents to another page Richard Excel Worksheet Functions 2 March 24th 08 01:08 AM
copy cell contents to different page adamt1973 Excel Discussion (Misc queries) 1 February 5th 07 04:32 PM
how do I keep clipboard contents active in excel? Gunchla Excel Discussion (Misc queries) 1 January 30th 06 02:49 PM
Copy outside Clipboard contents (html page) to a cell in Excel sifar Excel Programming 2 September 3rd 05 03:40 AM


All times are GMT +1. The time now is 02:06 PM.

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"