Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Resetting cells

I want to be able to clear all the fields that are being
populated by a userform with a command button. Can this
be done?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Resetting cells

Insert an event in your user form for the reset button (I have named it
Reset)
Yuo need to set the userform controls to an appropriate value eg Textbox
with the reset value, checkboxes, options buttons to true or false, whatever
you deem as the reset state.

Private Sub Reset_Click()
TextBox1.Value = ""
CheckBox1.Value = False
OptionButton1.Value = False
End Sub

Cheers
Nigel

"Sony" wrote in message
...
I want to be able to clear all the fields that are being
populated by a userform with a command button. Can this
be done?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Resetting cells

Thank you Nigel.
-----Original Message-----
Insert an event in your user form for the reset button

(I have named it
Reset)
Yuo need to set the userform controls to an appropriate

value eg Textbox
with the reset value, checkboxes, options buttons to

true or false, whatever
you deem as the reset state.

Private Sub Reset_Click()
TextBox1.Value = ""
CheckBox1.Value = False
OptionButton1.Value = False
End Sub

Cheers
Nigel

"Sony" wrote in

message
...
I want to be able to clear all the fields that are

being
populated by a userform with a command button. Can

this
be done?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-

Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the

World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Resetting cells

Nigel, Will this work for multiple cells? For example, I
wrote the code to advance to next row for next entry. So
would a modified version of this work in that fashion?
Thx again
-----Original Message-----
Insert an event in your user form for the reset button

(I have named it
Reset)
Yuo need to set the userform controls to an appropriate

value eg Textbox
with the reset value, checkboxes, options buttons to

true or false, whatever
you deem as the reset state.

Private Sub Reset_Click()
TextBox1.Value = ""
CheckBox1.Value = False
OptionButton1.Value = False
End Sub

Cheers
Nigel

"Sony" wrote in

message
...
I want to be able to clear all the fields that are

being
populated by a userform with a command button. Can

this
be done?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-

Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the

World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---
.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Resetting cells

Not in its current format, the click event resulting currently clears the
form control values only, however you can use the same event to clear
entries in sheet cells. In its simplest form use

for a sinlge cell on a worksheet
Worksheets("sheet1").Range("A1").Value = ""

or for multiple cells in a column
Worksheets("sheet1").Range("A1:A10").Value = ""

or for an area
Worksheets("sheet1").Range("A1:C10").Value = ""

Cheers
Nigel

"Sony" wrote in message
...
Nigel, Will this work for multiple cells? For example, I
wrote the code to advance to next row for next entry. So
would a modified version of this work in that fashion?
Thx again
-----Original Message-----
Insert an event in your user form for the reset button

(I have named it
Reset)
Yuo need to set the userform controls to an appropriate

value eg Textbox
with the reset value, checkboxes, options buttons to

true or false, whatever
you deem as the reset state.

Private Sub Reset_Click()
TextBox1.Value = ""
CheckBox1.Value = False
OptionButton1.Value = False
End Sub

Cheers
Nigel

"Sony" wrote in

message
...
I want to be able to clear all the fields that are

being
populated by a userform with a command button. Can

this
be done?





----== Posted via Newsfeed.Com - Unlimited-Uncensored-

Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the

World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---
.





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Resetting cells

Thank You Nigel, thats exactly what I was looking for.
-----Original Message-----
Not in its current format, the click event resulting

currently clears the
form control values only, however you can use the same

event to clear
entries in sheet cells. In its simplest form use

for a sinlge cell on a worksheet
Worksheets("sheet1").Range("A1").Value = ""

or for multiple cells in a column
Worksheets("sheet1").Range("A1:A10").Value = ""

or for an area
Worksheets("sheet1").Range("A1:C10").Value = ""

Cheers
Nigel

"Sony" wrote in

message
...
Nigel, Will this work for multiple cells? For

example, I
wrote the code to advance to next row for next entry.

So
would a modified version of this work in that fashion?
Thx again
-----Original Message-----
Insert an event in your user form for the reset button

(I have named it
Reset)
Yuo need to set the userform controls to an

appropriate
value eg Textbox
with the reset value, checkboxes, options buttons to

true or false, whatever
you deem as the reset state.

Private Sub Reset_Click()
TextBox1.Value = ""
CheckBox1.Value = False
OptionButton1.Value = False
End Sub

Cheers
Nigel

"Sony" wrote in

message
...
I want to be able to clear all the fields that are

being
populated by a userform with a command button. Can

this
be done?




----== Posted via Newsfeed.Com - Unlimited-Uncensored-

Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in

the
World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---
.





----== Posted via Newsfeed.Com - Unlimited-Uncensored-

Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the

World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total

Privacy via Encryption =---
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resetting cells to zero value. Ron New Users to Excel 5 April 26th 23 11:48 AM
Resetting multiple cells containing drop-down lists christophercbrewster via OfficeKB.com Excel Discussion (Misc queries) 3 August 13th 09 02:58 PM
Resetting cells Chuck Excel Worksheet Functions 1 December 17th 07 06:45 PM
Why are my options resetting themselves? cbare Excel Discussion (Misc queries) 0 November 2nd 06 11:30 PM
Resetting values based on change in cells of other column NSteinner Excel Discussion (Misc queries) 1 September 4th 05 04:09 PM


All times are GMT +1. The time now is 05:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"