Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
jk jk is offline
external usenet poster
 
Posts: 109
Default Delete from control button

I have a sheet which contains a several data validation dependant lists which
will be used amoung several people from distant locations.They will fill in
all the fields and submit the sheet to other departments. I would like to
create a control such as a button which would delete all data after
information has been submitted so a blank sheet can be used several times
without affecting the validation lists.Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Delete from control button

I'm not sure exactly what you're after but try this:
Sheets("Sheet1").Cells.ClearContents

Charles Chickering

jk wrote:
I have a sheet which contains a several data validation dependant lists which
will be used amoung several people from distant locations.They will fill in
all the fields and submit the sheet to other departments. I would like to
create a control such as a button which would delete all data after
information has been submitted so a blank sheet can be used several times
without affecting the validation lists.Is this possible?


  #3   Report Post  
Posted to microsoft.public.excel.programming
jk jk is offline
external usenet poster
 
Posts: 109
Default Delete from control button

Hi,
I want a reusable sheet without the user to manually clear out all the
entries and delete the data validation lists. How would i incorporate the
code into a button that i can place on the sheet?


"Die_Another_Day" wrote:

I'm not sure exactly what you're after but try this:
Sheets("Sheet1").Cells.ClearContents

Charles Chickering

jk wrote:
I have a sheet which contains a several data validation dependant lists which
will be used amoung several people from distant locations.They will fill in
all the fields and submit the sheet to other departments. I would like to
create a control such as a button which would delete all data after
information has been submitted so a blank sheet can be used several times
without affecting the validation lists.Is this possible?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Delete from control button

You should unlock all the data input cells, leaving the labels and formulae
locked, protect the worksheet, and then just add code like DAD gave you to
the button.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"jk" wrote in message
...
Hi,
I want a reusable sheet without the user to manually clear out all the
entries and delete the data validation lists. How would i incorporate the
code into a button that i can place on the sheet?


"Die_Another_Day" wrote:

I'm not sure exactly what you're after but try this:
Sheets("Sheet1").Cells.ClearContents

Charles Chickering

jk wrote:
I have a sheet which contains a several data validation dependant

lists which
will be used amoung several people from distant locations.They will

fill in
all the fields and submit the sheet to other departments. I would like

to
create a control such as a button which would delete all data after
information has been submitted so a blank sheet can be used several

times
without affecting the validation lists.Is this possible?





  #5   Report Post  
Posted to microsoft.public.excel.programming
jk jk is offline
external usenet poster
 
Posts: 109
Default Delete from control button

Thanks Bob. I have a small problem in that if i protect the sheet so the
column labels wont be deleted as well, I am unable to run the code. I have
tried protecting and unprotecting that one cell with the control but it give
me a run time error.Can this control buttom use additional code to prevent
that or placed somewhere else?

"Bob Phillips" wrote:

You should unlock all the data input cells, leaving the labels and formulae
locked, protect the worksheet, and then just add code like DAD gave you to
the button.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"jk" wrote in message
...
Hi,
I want a reusable sheet without the user to manually clear out all the
entries and delete the data validation lists. How would i incorporate the
code into a button that i can place on the sheet?


"Die_Another_Day" wrote:

I'm not sure exactly what you're after but try this:
Sheets("Sheet1").Cells.ClearContents

Charles Chickering

jk wrote:
I have a sheet which contains a several data validation dependant

lists which
will be used amoung several people from distant locations.They will

fill in
all the fields and submit the sheet to other departments. I would like

to
create a control such as a button which would delete all data after
information has been submitted so a blank sheet can be used several

times
without affecting the validation lists.Is this possible?







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Delete from control button

Could you post the code that gives you the problem?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"jk" wrote in message
...
Thanks Bob. I have a small problem in that if i protect the sheet so the
column labels wont be deleted as well, I am unable to run the code. I have
tried protecting and unprotecting that one cell with the control but it

give
me a run time error.Can this control buttom use additional code to prevent
that or placed somewhere else?

"Bob Phillips" wrote:

You should unlock all the data input cells, leaving the labels and

formulae
locked, protect the worksheet, and then just add code like DAD gave you

to
the button.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"jk" wrote in message
...
Hi,
I want a reusable sheet without the user to manually clear out all the
entries and delete the data validation lists. How would i incorporate

the
code into a button that i can place on the sheet?


"Die_Another_Day" wrote:

I'm not sure exactly what you're after but try this:
Sheets("Sheet1").Cells.ClearContents

Charles Chickering

jk wrote:
I have a sheet which contains a several data validation dependant

lists which
will be used amoung several people from distant locations.They

will
fill in
all the fields and submit the sheet to other departments. I would

like
to
create a control such as a button which would delete all data

after
information has been submitted so a blank sheet can be used

several
times
without affecting the validation lists.Is this possible?







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
How to stop a Control Button moving when I delete columns(Excel) CH-DE-FDS APRIL Excel Discussion (Misc queries) 2 October 28th 08 10:08 AM
How can I delete a macro when the Delete button is not active? FCR Excel Worksheet Functions 0 March 9th 06 09:43 AM
Can't delete or edit control button Steve Excel Discussion (Misc queries) 1 July 15th 05 08:39 PM
Delete a custom button by holding down the ALT key and dragging the button off the toolbar Stephen[_8_] Excel Programming 0 April 4th 04 02:22 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM


All times are GMT +1. The time now is 12:15 AM.

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"