Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having a problems getting a texbox on a userform to updat
dynamcally (updated without user interaction). I am gettin measurements which are changing continuously and would like to monito them in real time. I can see the values by using a DDERequest, but must always click something to get an update. Or I can put th following (=SIPART|'DR24'!SAA6) in an Excel cell and it will monito the signal in real time, but I cannot get this to update in th textbox. Using the ControlSource of the text box would work, but i overwrites the code (=SIPART|'DR24'!SAA6) in the referenced cell. Can any one help? Thank you -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
I think you need some event to update the textbox, just changing the ControlSource may not be enough. I don't know what code you are using to write to the spreadsheet, but could this not be directed to the textbox at this point? If not, perhaps worksheet event code would do it, that is write to AA6 and trap that change of AA^ to write to the textbox. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tom_C " wrote in message ... I am having a problems getting a texbox on a userform to update dynamcally (updated without user interaction). I am getting measurements which are changing continuously and would like to monitor them in real time. I can see the values by using a DDERequest, but I must always click something to get an update. Or I can put the following (=SIPART|'DR24'!SAA6) in an Excel cell and it will monitor the signal in real time, but I cannot get this to update in the textbox. Using the ControlSource of the text box would work, but it overwrites the code (=SIPART|'DR24'!SAA6) in the referenced cell. Can any one help? Thank you! --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
Thank you for your quick response. What I have is a DDE Server pickin up measurements from the COM port. With this formul (=SIPART|'DR24'!SAA8) in cell "A1" I can continuously monito measurements. SIPART being the application (server) and DR24 the ite and SAA8 the point name (SAA8 means serial analog output #8). With the TextBox1 (below) I can get one update from cell "A1" into m userform everytime I press the backspace. (and of course I am in th textbox). I would like the textbox to update continuouly without m interaction. There could be of course a button that starts continuou monitoring and stops it. Private Sub TextBox1_Change() TextBox1.Value = Worksheets("Sheet1").Range("A1") End Sub Thanks. To -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Haven't monitored a serial port myself, but you could try this. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then UserForm1.TextBox1.Text = Target.Value End If End Sub Add it to sheet1 code module. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tom_C " wrote in message ... Bob, Thank you for your quick response. What I have is a DDE Server picking up measurements from the COM port. With this formula (=SIPART|'DR24'!SAA8) in cell "A1" I can continuously monitor measurements. SIPART being the application (server) and DR24 the item and SAA8 the point name (SAA8 means serial analog output #8). With the TextBox1 (below) I can get one update from cell "A1" into my userform everytime I press the backspace. (and of course I am in the textbox). I would like the textbox to update continuouly without my interaction. There could be of course a button that starts continuous monitoring and stops it. Private Sub TextBox1_Change() TextBox1.Value = Worksheets("Sheet1").Range("A1") End Sub Thanks. Tom --- Message posted from http://www.ExcelForum.com/ |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
It didn't work unfortunately. I think it is because the actual content of the cell did not change. I mean the (=SIPART|'DR24'!SAA8) is always the same. I added another textbox to the form that sent a value to cell A1. It then came back into textbox1. Do you get what I mean? I can also get values directly in my userform with the DDERequest command. Again I have the continuous and automatic update problem. Isn't there any kind of looping that would send this command every second or 0.5 seconds without locking up other controls on the same userform? Thanks again for you interest. Tom --- Message posted from http://www.ExcelForum.com/ |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom,
Take a look at the OnTime method in help. With this you can schedule forward a macro to run. So you could set it to run in 5 secs, and when it runs, you could do your thing, then schedule it to run again in another 5 secs. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Tom_C " wrote in message ... Bob, It didn't work unfortunately. I think it is because the actual content of the cell did not change. I mean the (=SIPART|'DR24'!SAA8) is always the same. I added another textbox to the form that sent a value to cell A1. It then came back into textbox1. Do you get what I mean? I can also get values directly in my userform with the DDERequest command. Again I have the continuous and automatic update problem. Isn't there any kind of looping that would send this command every second or 0.5 seconds without locking up other controls on the same userform? Thanks again for you interest. Tom --- Message posted from http://www.ExcelForum.com/ |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
Thanks a million! Now I got it to work. Now I can go have a beer. I you are ever in Finland, let me know. I owe you a beer! Thanks again! To -- Message posted from http://www.ExcelForum.com |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Great, I am pleased. I look forward to the beer, enjoy yours.
Bob "Tom_C " wrote in message ... Bob, Thanks a million! Now I got it to work. Now I can go have a beer. If you are ever in Finland, let me know. I owe you a beer! Thanks again! Tom --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
userform textbox | Excel Worksheet Functions | |||
Type of textbox on userform | Excel Programming | |||
How to add textbox/buttons to an UserForm | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming | |||
Populating Textbox in UserForm | Excel Programming |