ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Update text box in real time (https://www.excelbanter.com/excel-programming/414715-update-text-box-real-time.html)

Cerberus

Update text box in real time
 
Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.


Susan

Update text box in real time
 
try a combobox_change......

sub combobox1_change()

textaxleft.value = combobox1.value

end sub

hope that helps!
susan


On Jul 28, 10:02*am, Cerberus wrote:
Okay, one of three things is happening: *1) I’m not searching with the
correct key words. *2) It is so basic nobody has asked it. *Or 3) it is not
possible and I’m wasting my time. *I believe the first option is correct
though I could be wrong. *

I want to know how to update information on a user form in real time. *I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). *Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. *I came up with a formula that works with all the rules I
have in cell A1. *When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. *I tried to put a…

TextAxLeft_Change()
* * * * Application.ScreenUpdating = True
End Sub

But that did not do jack for me. *Any help on this will be appreciated.



Office_Novice

Update text box in real time
 
Hi Cerberus ,
I think i can help. To populate the Text box from the worksheet thats easy
Private Sub UserForm_Initialize()
TextBox1.Value = Range("A1").Value
End Sub

Application.ScreenUpdating = True/False Wont do much for you in this case

"Cerberus" wrote:

Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.


Ranjit kurian

Update text box in real time
 
Hi Cerberus

The below code may help you

Private Sub UserForm_Initialize()
TextBox1.Text = ""
End Sub



"Cerberus" wrote:

Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.


Cerberus

Update text box in real time
 
Thanks for your quick response on this. I already have the text box reading
A1 when the user form Initializes. The issue I have now is at the start, the
combo box reads 0 and the text box reads 3, if I change the combo box to 2
the text box still reads 3 instead of 1. A1 reads 1 but I can't get the Text
box to update unless I leave that user form and then come back.

"Office_Novice" wrote:

Hi Cerberus ,
I think i can help. To populate the Text box from the worksheet thats easy
Private Sub UserForm_Initialize()
TextBox1.Value = Range("A1").Value
End Sub

Application.ScreenUpdating = True/False Wont do much for you in this case

"Cerberus" wrote:

Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.


Office_Novice

Update text box in real time
 
Oh I think I Inderstand what your looking for... If you textbox holds the
total number of items available and the Combobox is the number of items
requested, there by reducing the total number available which you are
wanting to be relected in the text box right? If you put 100 in Cell A1 and
apply this code you will get exectly what i discribed above. If i have
completely misunderstood reply to this pos i will help as far as i can.

Private Sub ComboBox1_Change()
Me.TextBox1.Value = Range("A1").Value - ComboBox1.Value
End Sub

Private Sub UserForm_Initialize()
Dim X
For X = 1 To 5
Me.ComboBox1.AddItem X
Next X

Me.TextBox1.Value = Range("A1").Value
End Sub


"Cerberus" wrote:

Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.


Cerberus

Update text box in real time
 
Would that make the Text Box = Combo Box or would it make the Text Box = A1
after the Combo Box changes? Thanks for your help on this.

"Susan" wrote:

try a combobox_change......

sub combobox1_change()

textaxleft.value = combobox1.value

end sub

hope that helps!
susan


On Jul 28, 10:02 am, Cerberus wrote:
Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.




Office_Novice

Update text box in real time
 
***Correction***
Private Sub ComboBox1_Change()
Me.TextBox1.Value = Range("A1").Value - ComboBox1.Value
Range("A1").Value = Me.TextBox1.Value
End Sub
This will update the worksheet as well

"Office_Novice" wrote:

Oh I think I Inderstand what your looking for... If you textbox holds the
total number of items available and the Combobox is the number of items
requested, there by reducing the total number available which you are
wanting to be relected in the text box right? If you put 100 in Cell A1 and
apply this code you will get exectly what i discribed above. If i have
completely misunderstood reply to this pos i will help as far as i can.

Private Sub ComboBox1_Change()
Me.TextBox1.Value = Range("A1").Value - ComboBox1.Value
End Sub

Private Sub UserForm_Initialize()
Dim X
For X = 1 To 5
Me.ComboBox1.AddItem X
Next X

Me.TextBox1.Value = Range("A1").Value
End Sub


"Cerberus" wrote:

Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.


Cerberus

Update text box in real time
 
It is working so far. Thanks for your help on this once again.

"Office_Novice" wrote:

***Correction***
Private Sub ComboBox1_Change()
Me.TextBox1.Value = Range("A1").Value - ComboBox1.Value
Range("A1").Value = Me.TextBox1.Value
End Sub
This will update the worksheet as well

"Office_Novice" wrote:

Oh I think I Inderstand what your looking for... If you textbox holds the
total number of items available and the Combobox is the number of items
requested, there by reducing the total number available which you are
wanting to be relected in the text box right? If you put 100 in Cell A1 and
apply this code you will get exectly what i discribed above. If i have
completely misunderstood reply to this pos i will help as far as i can.

Private Sub ComboBox1_Change()
Me.TextBox1.Value = Range("A1").Value - ComboBox1.Value
End Sub

Private Sub UserForm_Initialize()
Dim X
For X = 1 To 5
Me.ComboBox1.AddItem X
Next X

Me.TextBox1.Value = Range("A1").Value
End Sub


"Cerberus" wrote:

Okay, one of three things is happening: 1) Im not searching with the
correct key words. 2) It is so basic nobody has asked it. Or 3) it is not
possible and Im wasting my time. I believe the first option is correct
though I could be wrong.

I want to know how to update information on a user form in real time. I
have a Combo Box That says the number of products you can get for this
category (0,1,2,3, or 4). Directly to the right of that Combo Box, I have a
Text Box that I want to say what is the max number of products left you can
choose for that category and I have that text reading the info from cell A1
on the worksheet. I came up with a formula that works with all the rules I
have in cell A1. When you change the Combo Box info from 0 to let's say 3,
A1 changes accordingly but the Text Box showing the max left to choose does
not change. I tried to put a€¦

TextAxLeft_Change()
Application.ScreenUpdating = True
End Sub

But that did not do jack for me. Any help on this will be appreciated.



All times are GMT +1. The time now is 11:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com