Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm code help needed.
Very helpful, and it works exactly as you say. Getting slightly more technical now, I have set the combobox to have default setting (so it doesnt appear blank when the form i initialized). Also, one of the Textboxes has today's date inpu automatically. However, when the form resets using your code, thes things disappear. I've tried deleting the line that sets the control to "", but that leaves everything (even the user typed entries) Is there a simple way around this, or would it involve some seriou (and probably waaaay over my head!) coding? I'm kind of learning VBA o the fly, and I'm finding these examples VERY useful. Thanks to all wh 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 -- madblok ----------------------------------------------------------------------- madbloke's Profile: http://www.excelforum.com/member.php...fo&userid=1442 View this thread: http://www.excelforum.com/showthread.php?threadid=26092 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UserForm code help needed.
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
UserForm code help needed. | Excel Programming | |||
UserForm code help needed. | Excel Programming | |||
Userform Formula Help Needed | Excel Programming | |||
VBA code for Userform | Excel Programming | |||
A pointer or two needed using userform | Excel Programming |