ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Textbox Value not updating (https://www.excelbanter.com/excel-programming/371675-textbox-value-not-updating.html)

dailem

Textbox Value not updating
 
I have a series of textboxes (3) that a user can define a particular
numerical value to represent what is good, okay & bad (i.e. green,
yellow, & red conditional background formatting is later applied using
these criteria). But when I change the amount in one of the text
fields & then run my application, the values are not being used. It is
always looking at what the original default value of the textbox was.
I've tried a few different changes in the events section of the
textbox, but I'm at a loss. What do I need to do here if I want the
app. to use the figures the user inputted? As always, help is much
appreciated!!


stevebriz

Textbox Value not updating
 
can you post your code.. that changes the textbox color?


dailem

Textbox Value not updating
 

stevebriz wrote:
can you post your code.. that changes the textbox color?


Actually, it doesn't change the textbox color- I should be a little
more clear. I am just wanting to pull these values into my VBA to use
later in the process as part of my 'conditional formatting' once the
data is in excel (it is an application that does a lot of summarizing
of the data, then spits it into excel, formats it, pivot tables it, &
then colors it either green, yellow or red, by cell, using the
conditional formatting. It all works, it just doesn't utilize the new
number entered into each textbox, if any.

For example:

textbox1, default value = 5, but if I change that value to '10' on my
form, the 5 still is the value that get's passed to VBA.

.....hope that makes sense.

Thanks...


stevebriz

Textbox Value not updating
 
how are you "passing the value to VBA"?

Do you define a variable = textbox.value

Eg:
Dim x as integer

then in the textbox1_change
x = textbox1.value



All times are GMT +1. The time now is 03:24 AM.

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