K
Kennyatwork
Hello everyone
Another difficult one to explain!
A userform (containing text and combo boxes) is populated from an Excel
database.
Textbox2 has a number entered by the user then a commandbutton runs the
following code
(yes Tom, it looks remarkably like yours!)
ans = UserForm.TestBox2.Value
res = Application.Match(CLng(ans),Range("A":A3000"),0)
Range("A":A3000")(res).Activate
UserForm1.TextBox1.Text=ActiveCell.Offset(0,1).Value
UserForm1.ComboBox1.Value=ActiveCell.Offset(0,2).Value
<etc.>
Is there any way of saying the following
If ActiveCell.Offset(0,1).Value is <anything - numeric or text> then
set the textbox property as enabled=False else
textbox1 property=True
and so on
As you will gather I am trying to stop any editing of the database via the
userform
Thanks in advance
Kenny
Another difficult one to explain!
A userform (containing text and combo boxes) is populated from an Excel
database.
Textbox2 has a number entered by the user then a commandbutton runs the
following code
(yes Tom, it looks remarkably like yours!)
ans = UserForm.TestBox2.Value
res = Application.Match(CLng(ans),Range("A":A3000"),0)
Range("A":A3000")(res).Activate
UserForm1.TextBox1.Text=ActiveCell.Offset(0,1).Value
UserForm1.ComboBox1.Value=ActiveCell.Offset(0,2).Value
<etc.>
Is there any way of saying the following
If ActiveCell.Offset(0,1).Value is <anything - numeric or text> then
set the textbox property as enabled=False else
textbox1 property=True
and so on
As you will gather I am trying to stop any editing of the database via the
userform
Thanks in advance
Kenny