Posting cell content on desktop

H

Hubbs

Is it possible to get the contents of a cell and have it posted (visible) to
your desktop? I don't need the whole sheet, just the contents of a single
cell.
 
N

Nick Hodge

Not quite sure what you mean by posted (Visible) to you desktop?

The following code, pasted into the workbook with the data in, when run will
post the contents of cell A1 on sheet1 to a text file on the desktop called
'text'. (Obviously you will have to change the path)

Sub rangeToText()
Open "C:\Documents and Settings\Nick Hodge\Desktop\text.txt" For Output As
#1
Print #1, ThisWorkbook.Worksheets("Sheet1").Range("A1").Value
Close #1
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
[email protected]
 
Top