Posted by: xcopsgen September 29, 2009
VBA code to calculate one number raised to the power another number i.e x to the power n
Login in to Rate this Post:     0       ?        
Private Sub Power()
  Dim val1 as double; //val1 is x
  Dim val2 as double; //val2 is n
  Dim val3 as double;  //val3 to store result

  val3 = val1 ^ val2;  //val3 will have the result

End Sub

Read Full Discussion Thread for this article