PC Review


Reply
Thread Tools Rate Thread

Reset button in my spreadsheet

 
 
=?Utf-8?B?R1Q=?=
Guest
Posts: n/a
 
      8th Aug 2007
I want a button in my spreadsheet that will allow me to reset to zero or
clear the contents of certain cells in a calculator I created .... how do i
do this? Is there a formula in VB i can use (can't seem to get clearcontents
to work)?

Thanks

GT
--
Just an amateur Microsoft Office enthusiast
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9obiBCdW5keQ==?=
Guest
Posts: n/a
 
      8th Aug 2007
I'm assuming the calculator is not a form. When you place the button on the
sheet double click it to get to the code behind it and just set the values of
the cells you want with cells("row","column")
cells(1,1)=0
That sets cell A1 to 0
cells(3,5)=""
Double quotes set blanks so cell E3 would be cleared.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"GT" wrote:

> I want a button in my spreadsheet that will allow me to reset to zero or
> clear the contents of certain cells in a calculator I created .... how do i
> do this? Is there a formula in VB i can use (can't seem to get clearcontents
> to work)?
>
> Thanks
>
> GT
> --
> Just an amateur Microsoft Office enthusiast

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      8th Aug 2007
To add a button to a worksheet go to View Menu - Toolbars - Control Tool box.
Add Command button to worksheet. Double click button to start macro. Go
back to worksheet a press on Toolbar properties. Change caption from
commandbutton to what evver you like. Exit design mode on toolbar to start
using the button.

use Range("A3:B7).clearcontents

"GT" wrote:

> I want a button in my spreadsheet that will allow me to reset to zero or
> clear the contents of certain cells in a calculator I created .... how do i
> do this? Is there a formula in VB i can use (can't seem to get clearcontents
> to work)?
>
> Thanks
>
> GT
> --
> Just an amateur Microsoft Office enthusiast

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      8th Aug 2007
Start recording a macro
select the cells that get 0's
type 0 and hit ctrl-enter
(continue recording)
select the cells that get cleared
hit the delete key
stop recording the macro

Add a button from the Forms toolbar to a nice location. Assign the macro you
just recorded to this button.

GT wrote:
>
> I want a button in my spreadsheet that will allow me to reset to zero or
> clear the contents of certain cells in a calculator I created .... how do i
> do this? Is there a formula in VB i can use (can't seem to get clearcontents
> to work)?
>
> Thanks
>
> GT
> --
> Just an amateur Microsoft Office enthusiast


--

Dave Peterson
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
reset button in spreadsheet C.M.G. Microsoft Excel Discussion 12 21st Oct 2009 10:41 PM
Soft Reset and Intercepting a Hard Reset windows ce 4.2 .net c# tristanbannon@gmail.com Microsoft Dot NET Compact Framework 3 13th Mar 2006 10:35 PM
Using Emulator: Hard Reset, Soft Reset, Turn Off AlexAngAB@gmail.com Microsoft Dot NET Compact Framework 0 12th Oct 2005 02:15 AM
i need to reset my display setting to normal but page wont scroll up enough to allow me to do this in adv settings, is there any way to do this ie default settings reset. =?Utf-8?B?Y2xhaXJl?= Windows XP Help 2 4th Apr 2004 08:09 PM
HTML Reset Button Doesn't work after postback with Submit button Chris Lane Microsoft ASP .NET 4 18th Nov 2003 12:52 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:46 PM.