Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Chance
 
Posts: n/a
Default Using a command button to add

I would like to click on a command button - it would then add 1 to a
predetermined cell
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Using a command button to add

Which bit do you want, the add bit

With Range("H10")
.Value = .Value + 1
End With

or add the button. Drag it off the Forms toolbar and assign a macro with the
above code

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Chance" wrote in message
...
I would like to click on a command button - it would then add 1 to a
predetermined cell



  #3   Report Post  
Kassie
 
Posts: n/a
Default Using a command button to add

Hi

You do not say at what stage this cell will be determined? Is it always the
same cell, is it the active cell, or do you want to establish which cell is
to be acted on?

--
ve_2nd_at. Randburg, Gauteng, South Africa


"Chance" wrote:

I would like to click on a command button - it would then add 1 to a
predetermined cell

  #4   Report Post  
Chance
 
Posts: n/a
Default Using a command button to add

Always the same cell

"Kassie" wrote:

Hi

You do not say at what stage this cell will be determined? Is it always the
same cell, is it the active cell, or do you want to establish which cell is
to be acted on?

--
ve_2nd_at. Randburg, Gauteng, South Africa


"Chance" wrote:

I would like to click on a command button - it would then add 1 to a
predetermined cell

  #5   Report Post  
Chance
 
Posts: n/a
Default Using a command button to add

I wanted the code.
Thank you

"Bob Phillips" wrote:

Which bit do you want, the add bit

With Range("H10")
.Value = .Value + 1
End With

or add the button. Drag it off the Forms toolbar and assign a macro with the
above code

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Chance" wrote in message
...
I would like to click on a command button - it would then add 1 to a
predetermined cell






  #6   Report Post  
comotoman
 
Posts: n/a
Default Using a command button to add


You need to have a blank cell to the right of the number you are adding
to, then select that blank cell hit the combined button assigned to
macro below.

Sub PlusOne()

ActiveCell.FormulaR1C1 = "=RC[-1]+1"

End Sub


--
comotoman
------------------------------------------------------------------------
comotoman's Profile: http://www.excelforum.com/member.php...o&userid=27292
View this thread: http://www.excelforum.com/showthread...hreadid=478309

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



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

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"