Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default how do i create a button to clear a value field i created?

i created a field in which you can enter values in different spaces and it
will calculate, these number accordingly.... how do i create a button to
clear the values inputed, so that the "calculator" can be used again
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default how do i create a button to clear a value field i created?

You can try something like this

Public Sub ClearData()
On Error Goto ErrorHandler:
Application.Calculation = xlManual
With Sheets("Sheet1")
.Range("A1").ClearContents
.Range("B2").ClearContents
.Range("C3").ClearContents
.Range("D4").ClearContents
End With
ErrorHandler:
Application.Calculation = xlAutomatic
End Sub

Place this in a module and add a button from the forms toolbar. Select this
macro when propted to do so and...
--
HTH...

Jim Thomlinson


"sofodile" wrote:

i created a field in which you can enter values in different spaces and it
will calculate, these number accordingly.... how do i create a button to
clear the values inputed, so that the "calculator" can be used again

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
create a button when pressed it will +1 to another field mswisher Excel Discussion (Misc queries) 2 November 24th 09 04:34 PM
How to make a field created a part of the Pivot Table Field List? drhell Excel Discussion (Misc queries) 0 January 29th 07 11:13 PM
create a clear button jbf frylock Excel Discussion (Misc queries) 9 January 6th 06 11:00 PM
Create a button to Clear Cells tamato43 Excel Discussion (Misc queries) 3 May 16th 05 02:09 AM
Create event triggered by Pivot Chart field button Mike Collard Excel Programming 0 January 28th 04 12:00 PM


All times are GMT +1. The time now is 05:31 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"