View Full Version : [SOLVED:] Auto Fill into Text Box / cell
dimitrz
11-11-2009, 10:44 PM
Hi Guys
I know this is virtually impossible :devil2:
but couldn't help wondering :cool:
Is it possible to have an autofill option in a Normal cell or text box ( not combo or list box) ?
Thanks
mdmackillop
11-12-2009, 06:57 AM
If you are talking about an ActiveX textbox, then someting like this could work
Private Sub TextBox1_Change()
test
End Sub
Sub test()
Select Case TextBox1.Text
Case "a"
TextBox1.Text = "all text entered"
Case "b"
TextBox1.Text = "better text entered"
End Select
End Sub
For a cell, you would need to run a Change event after data is entered, so you could use a list of abreviations, similar to above. These cannot be checked though, as each letter is entered.
Bob Phillips
11-12-2009, 07:06 AM
I would suggest a slight alternative using Malcolm's basic idea
Private Sub TextBox1_AfterUpdate()
With TextBox1
Select Case True
Case "all text entered" Like .Text & "*"
.Text = "all text entered"
Case "better text entered" Like .Text & "*"
.Text = "better text entered"
End Select
End With
End Sub
dimitrz
11-17-2009, 07:32 AM
Thank you
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.