Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If I run the following the the string appears in the cell WITH all the
tags ThisWorkbook.Sheets("Sheet1").Cells(10, 4) = "<html<table border=""1""<thhelloworld</th</table</html" but if I copy that string from another application into a cell in Excel then the result is 'helloworld' in a box i.e the tags have become active How can I change the code so the tags are active? Any help appreciated Jason. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Feb 22, 5:03*am, WhytheQ wrote:
If I run the following the the string appears in the cell WITH all the tags ThisWorkbook.Sheets("Sheet1").Cells(10, 4) = "<html<table border=""1""<thhelloworld</th</table</html" but if I copy that string from another application into a cell in Excel then the result is 'helloworld' in a box i.e the tags have become active How can I change the code so the tags are active? Any help appreciated Jason. If you add a reference to the Microsoft Forms2.0 Object Library (via tools/references) the following seems to work: Sub test() Dim DataObj As New DataObject Dim HTML As String Dim myRange As Range HTML = "<html<table border=""1""<thhelloworld</th</table</html" Set myRange = ThisWorkbook.Sheets("Sheet1").Cells(10, 4) DataObj.SetText (HTML) DataObj.PutInClipboard myRange.PasteSpecial End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Feb 22, 11:49*am, John Coleman wrote:
On Feb 22, 5:03*am, WhytheQ wrote: If I run the following the the string appears in the cell WITH all the tags ThisWorkbook.Sheets("Sheet1").Cells(10, 4) = "<html<table border=""1""<thhelloworld</th</table</html" but if I copy that string from another application into a cell in Excel then the result is 'helloworld' in a box i.e the tags have become active How can I change the code so the tags are active? Any help appreciated Jason. If you add a reference to the Microsoft Forms2.0 Object Library (via tools/references) the following seems to work: Sub test() Dim DataObj As New DataObject Dim HTML As String Dim myRange As Range HTML = "<html<table border=""1""<thhelloworld</th</table</html" Set myRange = ThisWorkbook.Sheets("Sheet1").Cells(10, 4) DataObj.SetText (HTML) DataObj.PutInClipboard myRange.PasteSpecial End Sub Cheers John - much appreciated J |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
strange behaviour | Excel Programming | |||
strange behaviour | Excel Programming | |||
Strange if(***) behaviour? | Excel Discussion (Misc queries) | |||
Strange behaviour in VBA Help | Excel Programming | |||
strange behaviour | Excel Programming |