MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Clearing Form Fields after data has been submitted...

Posted by Tommo Sly on February 13, 2002 7:41 PM

Hi, i'm using forms for data entry... after i've submitted my data, i want all the data that has just been entered to be cleared from the form... ie... all my textboxes to be cleared and so forth... however i can't seen to get it to work... Any ideas would be most appreciated...

Cheers ladies and gents...

Posted by DRJ on February 13, 2002 8:11 PM


A Quick way:

put this after everything is submitted

on error resume next
for x = 1 to userform1.controls.count
userform1.controls(x).value = ""
next x
on error goto 0



Posted by Tommo Sly on February 14, 2002 4:01 AM

Doesn't seem to want to do it...
Thanks anyway for your help!