Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default command button to calculate two cell values?


Hi,

Probably an easy one for most...

I've got a command button and I would like it so when I press it, i
calculates the values in cells "D8" and "D9" and puts the total i
"D10"


Any help would be much appreciated.

Thanks

--
sunil
-----------------------------------------------------------------------
sunil5's Profile: http://www.excelforum.com/member.php...fo&userid=1361
View this thread: http://www.excelforum.com/showthread.php?threadid=38248

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default command button to calculate two cell values?

Private Sub CommandButton1_Click()
Range("D10").Value = Range("D8").Value + _
Range("D9").Value
End Sub

--
Regards,
Tom Ogilvy


"sunil5" wrote in
message ...

Hi,

Probably an easy one for most...

I've got a command button and I would like it so when I press it, it
calculates the values in cells "D8" and "D9" and puts the total in
"D10"


Any help would be much appreciated.

Thanks.


--
sunil5
------------------------------------------------------------------------
sunil5's Profile:

http://www.excelforum.com/member.php...o&userid=13614
View this thread: http://www.excelforum.com/showthread...hreadid=382482



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default command button to calculate two cell values?


In the design mode double click the button

and paste this code

Private Sub CommandButton1_Click()
Range("d10").Value = Range("d8").Value + Range("d9").Value
End Sub


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=382482

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default command button to calculate two cell values?


Oh thanks for that- i was trying to use the Range command but not
properly.

Cheers again :)


--
sunil5
------------------------------------------------------------------------
sunil5's Profile: http://www.excelforum.com/member.php...o&userid=13614
View this thread: http://www.excelforum.com/showthread...hreadid=382482

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
copy cell by command button kalpesh Excel Worksheet Functions 1 December 28th 11 08:41 PM
Selective calculate command button & other questions. DangerPayne Excel Discussion (Misc queries) 1 December 23rd 08 07:45 AM
How do i clear a cell using a command button? Mariann Excel Discussion (Misc queries) 1 March 30th 06 09:15 PM
Command Button for PasteSpecial - Values - Transpose Alisha Excel Discussion (Misc queries) 0 March 10th 06 09:39 PM
How I disable a command button until cell has value? Brian Excel Programming 4 October 21st 03 08:12 PM


All times are GMT +1. The time now is 09:16 AM.

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"