I have created a form in excel which consists of fill ins, list boxes and
check mark options. I am using the database wizard to collect the data onto
one spreadsheet. Does anyone know if l can create a macro to clear all the
previous data entry data from each of these fields. Everytime the form is to
be used l would like the user to start with a blank form. It is my
understanding by using the template wizard l am not able to start fresh
everytime. I am inexperienced with complicated macros. I have only created
simple ones. Any assistance would be greatly appreciated.
Lynda S
Hi,
I'm not going to be much help with a database wizard but...
If you created a user form using vb then a simple macro like...
sub cleardata()
userform.listboxname=quot;quot;
end sub
will clear the items. Attach it to a button that is labeled quot;clear dataquot;???
Hope this is going in the right direction.
peter
quot;Lynda Squot; wrote:
gt; I have created a form in excel which consists of fill ins, list boxes and
gt; check mark options. I am using the database wizard to collect the data onto
gt; one spreadsheet. Does anyone know if l can create a macro to clear all the
gt; previous data entry data from each of these fields. Everytime the form is to
gt; be used l would like the user to start with a blank form. It is my
gt; understanding by using the template wizard l am not able to start fresh
gt; everytime. I am inexperienced with complicated macros. I have only created
gt; simple ones. Any assistance would be greatly appreciated.
gt;
gt; Lynda S
Thank you Peter,
I have not gone into the vb world as yet. Is this easy to do and how can l
get started. Can you point me in the right direction ie instructions,
manuals, etc.
Any assistance would be greatly appreciated.
Lynda
quot;peterquot; wrote:
gt; Hi,
gt; I'm not going to be much help with a database wizard but...
gt; If you created a user form using vb then a simple macro like...
gt; sub cleardata()
gt; userform.listboxname=quot;quot;
gt;
gt; end sub
gt; will clear the items. Attach it to a button that is labeled quot;clear dataquot;???
gt;
gt; Hope this is going in the right direction.
gt;
gt; peter
gt;
gt;
gt;
gt; quot;Lynda Squot; wrote:
gt;
gt; gt; I have created a form in excel which consists of fill ins, list boxes and
gt; gt; check mark options. I am using the database wizard to collect the data onto
gt; gt; one spreadsheet. Does anyone know if l can create a macro to clear all the
gt; gt; previous data entry data from each of these fields. Everytime the form is to
gt; gt; be used l would like the user to start with a blank form. It is my
gt; gt; understanding by using the template wizard l am not able to start fresh
gt; gt; everytime. I am inexperienced with complicated macros. I have only created
gt; gt; simple ones. Any assistance would be greatly appreciated.
gt; gt;
gt; gt; Lynda S
Hi,
Here is a quick intro.
open the vb editor
alt-f11
insert userform
add controls (command button, checkbox, COMBOBOX, etc)
add a combobox
double click control to add code that will run when button is clicked
(changed or exit)
( range(“a1”).value=userform1.comboBox1.value )insert module
sub start()
UserForm1.ComboBox1.List = Range(quot;e10:e13quot;).Value
(this will fill combo box with selection-values in e10:e13)
userform1 show
end sub
put a command button on your ss and assign it to macro start
buy a good book
Excel 2003 Power Programming with VBA
John Walkenbach
have fun, good luck.
peter
quot;Lynda Squot; wrote:
gt; Thank you Peter,
gt; I have not gone into the vb world as yet. Is this easy to do and how can l
gt; get started. Can you point me in the right direction ie instructions,
gt; manuals, etc.
gt;
gt; Any assistance would be greatly appreciated.
gt;
gt; Lynda
gt; quot;peterquot; wrote:
gt;
gt; gt; Hi,
gt; gt; I'm not going to be much help with a database wizard but...
gt; gt; If you created a user form using vb then a simple macro like...
gt; gt; sub cleardata()
gt; gt; userform.listboxname=quot;quot;
gt; gt;
gt; gt; end sub
gt; gt; will clear the items. Attach it to a button that is labeled quot;clear dataquot;???
gt; gt;
gt; gt; Hope this is going in the right direction.
gt; gt;
gt; gt; peter
gt; gt;
gt; gt;
gt; gt;
gt; gt; quot;Lynda Squot; wrote:
gt; gt;
gt; gt; gt; I have created a form in excel which consists of fill ins, list boxes and
gt; gt; gt; check mark options. I am using the database wizard to collect the data onto
gt; gt; gt; one spreadsheet. Does anyone know if l can create a macro to clear all the
gt; gt; gt; previous data entry data from each of these fields. Everytime the form is to
gt; gt; gt; be used l would like the user to start with a blank form. It is my
gt; gt; gt; understanding by using the template wizard l am not able to start fresh
gt; gt; gt; everytime. I am inexperienced with complicated macros. I have only created
gt; gt; gt; simple ones. Any assistance would be greatly appreciated.
gt; gt; gt;
gt; gt; gt; Lynda S
Hi Peter, Thank you for the responses. Sorry for the delay in thank yous. I
am taking small steps here. I have purchased an Excel VBA in easy steps
book. First l have created a button on my database that clears the contents
for specific cells. I have one problem with that in that it clears my
formulas as well. How do l get around just clearing the data in these cells
and not the formulas?. Second l have list boxes in numerous cells ie one in
c9 and c10. How do l clear the selection in those as well? They are linked
to a cell that displays the response that was chosen. Ie in cell c9 l have a
list box for gender with the choices of female and male. In my linked cell
0=blank, 1=female and 2=male. So if the auditor selects female l have a
formula that states if the auditor selects female then female displays in the
cell. My question is how can l get the list box to display a blank for the
next auditor to input from this same button that clears the data in the other
cells. This is what l have writen so far to clear my text cells:
Private Sub CommandButton1_Click()
Range(quot;c5:c39quot;) . ClearContents
End Sub
Thank you for any assistance
Lynda S
quot;peterquot; wrote:
gt; Hi,
gt; Here is a quick intro.
gt; open the vb editor
gt; alt-f11
gt;
gt; insert userform
gt;
gt; add controls (command button, checkbox, COMBOBOX, etc)
gt;
gt; add a combobox
gt; double click control to add code that will run when button is clicked
gt; (changed or exit)
gt; ( range(“a1”).value=userform1.comboBox1.value )
gt;
gt;
gt; insert module
gt;
gt; sub start()
gt;
gt; UserForm1.ComboBox1.List = Range(quot;e10:e13quot;).Value
gt; (this will fill combo box with selection-values in e10:e13)
gt;
gt; userform1 show
gt;
gt; end sub
gt;
gt; put a command button on your ss and assign it to macro start
gt;
gt; buy a good book
gt; Excel 2003 Power Programming with VBA
gt; John Walkenbach
gt;
gt; have fun, good luck.
gt;
gt; peter
gt; quot;Lynda Squot; wrote:
gt;
gt; gt; Thank you Peter,
gt; gt; I have not gone into the vb world as yet. Is this easy to do and how can l
gt; gt; get started. Can you point me in the right direction ie instructions,
gt; gt; manuals, etc.
gt; gt;
gt; gt; Any assistance would be greatly appreciated.
gt; gt;
gt; gt; Lynda
gt; gt; quot;peterquot; wrote:
gt; gt;
gt; gt; gt; Hi,
gt; gt; gt; I'm not going to be much help with a database wizard but...
gt; gt; gt; If you created a user form using vb then a simple macro like...
gt; gt; gt; sub cleardata()
gt; gt; gt; userform.listboxname=quot;quot;
gt; gt; gt;
gt; gt; gt; end sub
gt; gt; gt; will clear the items. Attach it to a button that is labeled quot;clear dataquot;???
gt; gt; gt;
gt; gt; gt; Hope this is going in the right direction.
gt; gt; gt;
gt; gt; gt; peter
gt; gt; gt;
gt; gt; gt;
gt; gt; gt;
gt; gt; gt; quot;Lynda Squot; wrote:
gt; gt; gt;
gt; gt; gt; gt; I have created a form in excel which consists of fill ins, list boxes and
gt; gt; gt; gt; check mark options. I am using the database wizard to collect the data onto
gt; gt; gt; gt; one spreadsheet. Does anyone know if l can create a macro to clear all the
gt; gt; gt; gt; previous data entry data from each of these fields. Everytime the form is to
gt; gt; gt; gt; be used l would like the user to start with a blank form. It is my
gt; gt; gt; gt; understanding by using the template wizard l am not able to start fresh
gt; gt; gt; gt; everytime. I am inexperienced with complicated macros. I have only created
gt; gt; gt; gt; simple ones. Any assistance would be greatly appreciated.
gt; gt; gt; gt;
gt; gt; gt; gt; Lynda S
Hi,
If your still having trouble or just want help, you can email the ss and
I'll take a lookpeter
quot;Lynda Squot; wrote:
gt; Hi Peter, Thank you for the responses. Sorry for the delay in thank yous. I
gt; am taking small steps here. I have purchased an Excel VBA in easy steps
gt; book. First l have created a button on my database that clears the contents
gt; for specific cells. I have one problem with that in that it clears my
gt; formulas as well. How do l get around just clearing the data in these cells
gt; and not the formulas?. Second l have list boxes in numerous cells ie one in
gt; c9 and c10. How do l clear the selection in those as well? They are linked
gt; to a cell that displays the response that was chosen. Ie in cell c9 l have a
gt; list box for gender with the choices of female and male. In my linked cell
gt; 0=blank, 1=female and 2=male. So if the auditor selects female l have a
gt; formula that states if the auditor selects female then female displays in the
gt; cell. My question is how can l get the list box to display a blank for the
gt; next auditor to input from this same button that clears the data in the other
gt; cells. This is what l have writen so far to clear my text cells:
gt; Private Sub CommandButton1_Click()
gt; Range(quot;c5:c39quot;) . ClearContents
gt; End Sub
gt;
gt; Thank you for any assistance
gt; Lynda S
gt;
gt; quot;peterquot; wrote:
gt;
gt; gt; Hi,
gt; gt; Here is a quick intro.
gt; gt; open the vb editor
gt; gt; alt-f11
gt; gt;
gt; gt; insert userform
gt; gt;
gt; gt; add controls (command button, checkbox, COMBOBOX, etc)
gt; gt;
gt; gt; add a combobox
gt; gt; double click control to add code that will run when button is clicked
gt; gt; (changed or exit)
gt; gt; ( range(“a1”).value=userform1.comboBox1.value )
gt; gt;
gt; gt;
gt; gt; insert module
gt; gt;
gt; gt; sub start()
gt; gt;
gt; gt; UserForm1.ComboBox1.List = Range(quot;e10:e13quot;).Value
gt; gt; (this will fill combo box with selection-values in e10:e13)
gt; gt;
gt; gt; userform1 show
gt; gt;
gt; gt; end sub
gt; gt;
gt; gt; put a command button on your ss and assign it to macro start
gt; gt;
gt; gt; buy a good book
gt; gt; Excel 2003 Power Programming with VBA
gt; gt; John Walkenbach
gt; gt;
gt; gt; have fun, good luck.
gt; gt;
gt; gt; peter
gt; gt; quot;Lynda Squot; wrote:
gt; gt;
gt; gt; gt; Thank you Peter,
gt; gt; gt; I have not gone into the vb world as yet. Is this easy to do and how can l
gt; gt; gt; get started. Can you point me in the right direction ie instructions,
gt; gt; gt; manuals, etc.
gt; gt; gt;
gt; gt; gt; Any assistance would be greatly appreciated.
gt; gt; gt;
gt; gt; gt; Lynda
gt; gt; gt; quot;peterquot; wrote:
gt; gt; gt;
gt; gt; gt; gt; Hi,
gt; gt; gt; gt; I'm not going to be much help with a database wizard but...
gt; gt; gt; gt; If you created a user form using vb then a simple macro like...
gt; gt; gt; gt; sub cleardata()
gt; gt; gt; gt; userform.listboxname=quot;quot;
gt; gt; gt; gt;
gt; gt; gt; gt; end sub
gt; gt; gt; gt; will clear the items. Attach it to a button that is labeled quot;clear dataquot;???
gt; gt; gt; gt;
gt; gt; gt; gt; Hope this is going in the right direction.
gt; gt; gt; gt;
gt; gt; gt; gt; peter
gt; gt; gt; gt;
gt; gt; gt; gt;
gt; gt; gt; gt;
gt; gt; gt; gt; quot;Lynda Squot; wrote:
gt; gt; gt; gt;
gt; gt; gt; gt; gt; I have created a form in excel which consists of fill ins, list boxes and
gt; gt; gt; gt; gt; check mark options. I am using the database wizard to collect the data onto
gt; gt; gt; gt; gt; one spreadsheet. Does anyone know if l can create a macro to clear all the
gt; gt; gt; gt; gt; previous data entry data from each of these fields. Everytime the form is to
gt; gt; gt; gt; gt; be used l would like the user to start with a blank form. It is my
gt; gt; gt; gt; gt; understanding by using the template wizard l am not able to start fresh
gt; gt; gt; gt; gt; everytime. I am inexperienced with complicated macros. I have only created
gt; gt; gt; gt; gt; simple ones. Any assistance would be greatly appreciated.
gt; gt; gt; gt; gt;
gt; gt; gt; gt; gt; Lynda S
- Sep 10 Mon 2007 20:39
excel macro
close
全站熱搜
留言列表
發表留言