Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Trendline Textbox Not Updating | Charts and Charting in Excel | |||
Textbox Value not updating | Excel Programming | |||
TextBox Updating | Excel Programming | |||
updating spreadsheet from textbox | Excel Programming | |||
Textbox updating other Textboxes | Excel Programming |