A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Command Button formula determiner



 
 
Thread Tools Display Modes
  #1  
Old March 4th, 2004, 10:42 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default Command Button formula determiner

Here is an example based upon checkboxes (seeing as I recommended thatvbg.

Put this code in a macro and assign that macro to the checkbox

If ActiveSheet.CheckBoxes("Check Box 2").Value = xlOn Then
ActiveCell.FormulaR1C1 = "=SUM(RC[-10]:RC[-1])"
Else
ActiveCell.FormulaR1C1 = "=R1C1*17.5%"
End If


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"ADIGuy " wrote in message
...
Hello, thanks in advance for your help. I want to have a formula in a
cell change depending on weather a command button is depressed or not
(not depressed will run one formula; if depressed will run a different
formula). It can also be referencing a check box (does not have to be
a button). Can I do this? How?

Thanks!!


---
Message posted from http://www.ExcelForum.com/



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:28 PM.


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