Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
a) Is it a textbox from the control toolbox (activeX) not from the forms
toolbox? b) Have you switched off design mode c) Is the textbox called textbox12? Works fine for me -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "Paperback Writer" wrote in message ... I right-clicked on the tab, selected "View Code," and then put it in the box where you put visual basic code. "Nick Hodge" wrote: Where did you 'put' this? -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS www.nickhodge.co.uk "Paperback Writer" wrote in message ... I'm putting this in EXACTLY, and it isn't working. Thoughts? Private Sub TextBox12_LostFocus() If TextBox12.Value < "" Then TextBox12.BackColor = RGB(255, 255, 255) Else: TextBox12.BackColor = RGB(255, 255, 0) End If End Sub "Elkar" wrote: This code should do the trick. Private Sub TextBox1_LostFocus() If TextBox1.Value < "" Then TextBox1.BackColor = RGB(255, 255, 255) Else: TextBox1.BackColor = RGB(255, 255, 0) End If End Sub HTH, Elkar "Paperback Writer" wrote: Is it possible for a text box to be one color when blank, but change to another color when the user types something into it? When it's blank, I want it to be yellow. After the user types in it, I want it to change to white. Thoughts? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change text into time | Excel Discussion (Misc queries) | |||
Text entries behaving like numbers | Excel Discussion (Misc queries) | |||
Text Color Change prompted by different columns | Excel Worksheet Functions | |||
Change number in Text Box in Excel | Excel Discussion (Misc queries) | |||
How do I change the default cell formatting to be text? | Excel Discussion (Misc queries) |