Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create HTML code for a hyperlink from cell contents | Excel Worksheet Functions | |||
Copy contents to another page | Excel Worksheet Functions | |||
copy cell contents to different page | Excel Discussion (Misc queries) | |||
how do I keep clipboard contents active in excel? | Excel Discussion (Misc queries) | |||
Copy outside Clipboard contents (html page) to a cell in Excel | Excel Programming |