Use the click event of teh button: Right-Click the button & then click 'View Code'. The default action for a Command Button is click, the VBE editor will open in this module
HT
Roge
Shaftesbury (UK
----- david2004 wrote: ----
Hi al
This is my 1st post.I am really new in VBA . Need help from all
code:
Option Base
Function ABN(n, npoint
Dim Temp(2
Sum =
sum1 =
alpha = 2# * 3.141592654 / npoin
For j = 1 To npoin
ang = alpha * (j - 1
Sum = Sum + Cells(6 + j, 4) * Cos(n * ang
sum2 = sum2 + Cells(6 + j, 4) * Sin(n * ang
Next
Temp(1) = Sum * 2# / npoin
Temp(2) = sum2 * 2# / npoin
If n = 0 Then Temp(1) = Temp(1) /
ABN = Tem
End Functio
If i wish to create a click() function such that the macro will b
activated automatically when the user click on the assigned button. Th
formula will be called by the sub function.But i am not sure at all ho
it should be done.
The calculated values will then appear in a created table in
particular column
Pls help. Urgent!. Th
--
Message posted from
http://www.ExcelForum.com