A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Using an action button.



 
 
Thread Tools Display Modes
  #1  
Old March 23rd, 2010, 01:19 PM posted to microsoft.public.excel.misc
MichaelZ
external usenet poster
 
Posts: 20
Default Using an action button.

How do I insert a button into a spreadsheet that will "clear" all values from
cells that are intended for inputting data, but not clear other cells that
are not meant for data input? As part of this I suppose I need some way to
designate which cells are meant for data input and which ones are not.
Thanks, MichaelZ
  #2  
Old March 23rd, 2010, 01:33 PM posted to microsoft.public.excel.misc
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default Using an action button.

Simplest way. Hold down the control key while selecting each cell you want
to cleargoto the namebox just to the left of the formula box and type in
rngtoclearfire this macro assigned to a shape or forms button.

Sub clearcells()
Range("rngtoclear").ClearContents
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MichaelZ" wrote in message
news
How do I insert a button into a spreadsheet that will "clear" all values
from
cells that are intended for inputting data, but not clear other cells that
are not meant for data input? As part of this I suppose I need some way
to
designate which cells are meant for data input and which ones are not.
Thanks, MichaelZ


  #3  
Old March 23rd, 2010, 07:12 PM posted to microsoft.public.excel.misc
MichaelZ
external usenet poster
 
Posts: 20
Default Using an action button.

Ran into a little problem...
Some of the input cells were merged cells, so an error message reading,
"Cannot change part of a merged cell" was generated. Is there any way around
this? I still want to be able to clear the input cells, even if they are
merged cells.
Thanks.

"Don Guillett" wrote:

Simplest way. Hold down the control key while selecting each cell you want
to cleargoto the namebox just to the left of the formula box and type in
rngtoclearfire this macro assigned to a shape or forms button.

Sub clearcells()
Range("rngtoclear").ClearContents
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MichaelZ" wrote in message
news
How do I insert a button into a spreadsheet that will "clear" all values
from
cells that are intended for inputting data, but not clear other cells that
are not meant for data input? As part of this I suppose I need some way
to
designate which cells are meant for data input and which ones are not.
Thanks, MichaelZ


.

  #4  
Old March 23rd, 2010, 08:15 PM posted to microsoft.public.excel.misc
Don Guillett[_2_]
external usenet poster
 
Posts: 607
Default Using an action button.

In the defined name, you will have to specifically reference the merged
cells as shown here. g9 not merged.
=Sheet28!$G$7:$H$7,Sheet28!$G$9,Sheet28!$G$11:$H$1 1

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MichaelZ" wrote in message
...
Ran into a little problem...
Some of the input cells were merged cells, so an error message reading,
"Cannot change part of a merged cell" was generated. Is there any way
around
this? I still want to be able to clear the input cells, even if they are
merged cells.
Thanks.

"Don Guillett" wrote:

Simplest way. Hold down the control key while selecting each cell you
want
to cleargoto the namebox just to the left of the formula box and type in
rngtoclearfire this macro assigned to a shape or forms button.

Sub clearcells()
Range("rngtoclear").ClearContents
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MichaelZ" wrote in message
news
How do I insert a button into a spreadsheet that will "clear" all
values
from
cells that are intended for inputting data, but not clear other cells
that
are not meant for data input? As part of this I suppose I need some
way
to
designate which cells are meant for data input and which ones are not.
Thanks, MichaelZ


.


  #5  
Old March 24th, 2010, 02:55 PM posted to microsoft.public.excel.misc
MichaelZ
external usenet poster
 
Posts: 20
Default Using an action button.

Thanks Don. This works great.
Michael

"MichaelZ" wrote:

How do I insert a button into a spreadsheet that will "clear" all values from
cells that are intended for inputting data, but not clear other cells that
are not meant for data input? As part of this I suppose I need some way to
designate which cells are meant for data input and which ones are not.
Thanks, MichaelZ

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:55 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.