Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default create a button when pressed it will +1 to another field

Customer Survey- When a button or cell is pressed once it will add 1 to
another existing field and every time it is pressed it will add another 1.



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,117
Default create a button when pressed it will +1 to another field

Private Sub Commandbutton1_Click()

Dim myRange as Range
Dim myNumber as Long

Set myRange = ActiveSheet.Range("a5") '<== change
myNumber = myRange.Value

myNumber = myNumber + 1
myRange.Value = myNumber

End Sub


susan



On Nov 24, 9:25*am, mswisher
wrote:
Customer Survey- When a button or cell is pressed once it will add 1 to
another existing field and every time it is pressed it will add another 1.. *


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default create a button when pressed it will +1 to another field

Might be easiest to add a spinner from the Forms Toolbar or Control
Toolbox..

But a macro to do what you want. Add a button and assign the macro.

Sub add_one()
With ActiveSheet.Range("A1")
.Value = .Value + 1
End With
End Sub


Gord Dibben MS Excel MVP

On Tue, 24 Nov 2009 06:25:03 -0800, mswisher
wrote:

Customer Survey- When a button or cell is pressed once it will add 1 to
another existing field and every time it is pressed it will add another 1.



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
Enter button jumps to next cell each time its pressed!!!! evasmagacz Excel Discussion (Misc queries) 3 June 17th 07 08:37 PM
preventing button being pressed Mike Excel Discussion (Misc queries) 2 March 16th 06 03:47 PM
count how many times a button is pressed Mike Excel Discussion (Misc queries) 2 February 5th 06 09:38 PM
create formula. 1 field constant and another field varies by inpu. telnettech Setting up and Configuration of Excel 2 February 2nd 06 11:09 PM
Change button right before the formula field STefan Nilsson Excel Discussion (Misc queries) 1 December 28th 05 03:15 PM


All times are GMT +1. The time now is 11:45 AM.

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

About Us

"It's about Microsoft Excel"