Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic update of UserForm TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dynamic update of UserForm TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic update of UserForm TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dynamic update of UserForm TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic update of UserForm TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dynamic update of UserForm TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dynamic update of UserForm TextBox

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Dynamic update of UserForm TextBox

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
Type of textbox on userform Lieven Mettepenningen[_2_] Excel Programming 2 October 15th 03 01:36 PM
How to add textbox/buttons to an UserForm Terence[_2_] Excel Programming 2 August 7th 03 08:56 AM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM
Populating Textbox in UserForm Derek[_2_] Excel Programming 3 July 10th 03 10:41 PM


All times are GMT +1. The time now is 02:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"