Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I have a app that cannot be linked to exel. I wrote some a littl script when the data changes in the app it get auto copied to th clipboard. Is there a way in vb so I can monitor the clipboard so when it changes it auto paste the new content in cell a1. ( so i will have a realtim link ) Thanks Joha -- clima ----------------------------------------------------------------------- climax's Profile: http://www.excelforum.com/member.php...fo&userid=3081 View this thread: http://www.excelforum.com/showthread.php?threadid=56378 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cool idea. I never thought of trying that before. This worked. You will
need to place two command buttons on Sheet1, change their captions to "Start Monitor" and "End Monitor" The Start Monitor will start an endless loop with a 1-second pause and a "DoEvents". The End Monitor will stop the loop. Note - placing the command buttons on the sheet is also necessary to force VB to add the "Microsoft Forms 2.0 Object Library" reference, which is required for the DataObject. Private Sub CommandButton1_Click() Dim EndTime As Single Dim PrevText As String Dim objDataObject As New DataObject Do objDataObject.GetFromClipboard If objDataObject.GetText(1) < PrevText Then Range("A1") = objDataObject.GetText(1) PrevText = objDataObject.GetText(1) End If Set objDataObject = Nothing EndTime = Timer + 1 'one second Do While Timer < EndTime DoEvents Loop Loop End Sub Private Sub CommandButton2_Click() End End Sub "climax" wrote: Hi, I have a app that cannot be linked to exel. I wrote some a little script when the data changes in the app it get auto copied to the clipboard. Is there a way in vb so I can monitor the clipboard so when it changes it auto paste the new content in cell a1. ( so i will have a realtime link ) Thanks Johan -- climax ------------------------------------------------------------------------ climax's Profile: http://www.excelforum.com/member.php...o&userid=30816 View this thread: http://www.excelforum.com/showthread...hreadid=563781 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? | Setting up and Configuration of Excel | |||
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? | Setting up and Configuration of Excel | |||
Clipboard empty but still get waring that clipboard is full | Excel Discussion (Misc queries) | |||
monitor clipboard | Excel Discussion (Misc queries) | |||
ClearContents or ClearFormats also clears Clipboard. How can I keep the clipboard? | Excel Programming |