Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default TextBox Updating within for loop

Why is the textbox not updated until the loop(or the sub?) is exited?
The Cell is updated, but not the TextBox.

Can this be 'fixed'?

================================================== ==
Private Sub CommandButton1_Click()
Dim x9 As Single
Dim i9 As Integer
Dim s9 As Integer

Dim Header$(4)

For i9 = 1 To 4
s9 = InputBox("Please input a number:", "InputBox Title", 65)
Cells(10, 2) = s9
Cells(10, 3) = Chr(s9)
TextBox1.Value = Chr(s9)
x9 = DoEvents()

Next i9

End Sub
==================================================

Thanks,
TomC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default TextBox Updating within for loop

On Dec 22, 12:30*pm, tomcee wrote:
Why is the textbox not updated until the loop(or the sub?) is exited?
The Cell is updated, but not the TextBox.

Can this be 'fixed'?

================================================== ==
Private Sub CommandButton1_Click()
Dim x9 As Single
Dim i9 As Integer
Dim s9 As Integer

Dim Header$(4)

For i9 = 1 To 4
*s9 = InputBox("Please input a number:", "InputBox Title", 65)
*Cells(10, 2) = s9
*Cells(10, 3) = Chr(s9)
*TextBox1.Value = Chr(s9)
*x9 = DoEvents()

Next i9

End Sub
==================================================

Thanks,
TomC


Hi:Tom

You need to coherse the TextBox a little stronger:

Sub dural()
Dim s As String, num As Integer
For i = 1 To 4
num = Application.InputBox(prompt:="Please input a number",
Type:=1)
s = Chr(num)
With ActiveSheet.Shapes("TextBox 1")
.TextFrame.Characters.Text = s
End With
DoEvents
Application.ScreenUpdating = False
Application.ScreenUpdating = True
Next
End Sub
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
Trendline Textbox Not Updating Phil Hageman Charts and Charting in Excel 5 September 27th 08 05:11 PM
Textbox Value not updating dailem Excel Programming 3 August 29th 06 03:28 PM
TextBox Updating grahammal[_29_] Excel Programming 4 May 15th 06 10:52 AM
updating spreadsheet from textbox David Goodall Excel Programming 0 October 11th 04 08:54 PM
Textbox updating other Textboxes Thomas L[_2_] Excel Programming 1 July 7th 04 08:33 PM


All times are GMT +1. The time now is 05:07 AM.

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

About Us

"It's about Microsoft Excel"