keeping things simple, you could:
add an if test like:
If na < 1 or na < 3 Then
Controls(na) =""
End if
in your For next loop to exclude the combo / textboxes you
want to keep the values from being deleted
or
you could after the For loop just place the data back in eg
Textbox1.Text = date
Hope helps
-----Original Message-----
Very helpful, and it works exactly as you say.
Getting slightly more technical now, I have set the
combobox to have a
default setting (so it doesnt appear blank when the form
is
initialized). Also, one of the Textboxes has today's date
input
automatically. However, when the form resets using your
code, these
things disappear. I've tried deleting the line that sets
the controls
to "", but that leaves everything (even the user typed
entries)
Is there a simple way around this, or would it involve
some serious
(and probably waaaay over my head!) coding? I'm kind of
learning VBA on
the fly, and I'm finding these examples VERY useful.
Thanks to all who
are trying to help a complete novice!
dude Wrote:
a combobox is a control - you should be able to read
data
in to your array in same way.
If you create a test form as suggested. Add a combobox
in
place of one of the textboxes (remember to add the
button
on your form as last item (it's a control as well!)) Run
the form & add test data. It should place data from both
text & comboboxes into the worksheet.
hope helpful
--
madbloke
----------------------------------------------------------
--------------
madbloke's Profile: http://www.excelforum.com/member.php?
action=getinfo&userid=14422
View this thread:
http://www.excelforum.com/showthread...hreadid=260925
.