View Single Post
  #6   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default activate a worksheet formula through a button

apologise for this vague reply

type something like this

Range("g25") = Range("g25").Offset(0, -1) * Range("g25").Offset(0, -2)

this means G25=F25*E25


--
remove $$$ from email addresss to send email

=============

"TUNGANA KURMA RAJU" wrote in
message ...
Thanks.Mr.Raman,I have a range of cells shows results of a formula,for
example g25:k30.I want to insert that formula in that macro which assigned

to
that command button.How to do this?how to write formula in that macro?

"R.VENKATARAMAN" wrote:


select the sheet
open the ocntrol box
click commandbutton icon
draw the command button somewhere in that sheet
righ click and click view code
under <Private Sub CommandButton1_Click()
type the macro NAME
exit design mode (blue trriangle in the vba toolbar)


now if you clcik the commandbutton the macro will be run



"TUNGANA KURMA RAJU" wrote

in
message ...
Thanks Mr.Raman,can give me a macro code for this task

"R.VENKATARAMAN" wrote:

you can use a comand button and under this button the code can be

added.or
assign a macro
see help under <type of buttons etc

--
remove $$$ from email addresss to send email

"TUNGANA KURMA RAJU"

wrote
in
message ...
how to add and activate a worksheet formula in a cell through a

control
tool
button.any article for this topic.