View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
raypayette[_37_] raypayette[_37_] is offline
external usenet poster
 
Posts: 1
Default Showing a calculation in a userform Textbox


I supposed that you made an error and the result is 35500.
Note that the UserForm1 must have the ShowModal property as False.
The following code should be in the Sheet1 code.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
UserForm1.txtCalc.Text = ActiveSheet.Cells(1, 1).Text
UserForm1.txtAmount.Text = ActiveSheet.Cells(2, 1).Value
UserForm1.txtResult.Text = ActiveSheet.Cells(1, 1) -
ActiveSheet.Cells(2, 1)
End Sub


--
raypayette


------------------------------------------------------------------------
raypayette's Profile: http://www.excelforum.com/member.php...o&userid=29569
View this thread: http://www.excelforum.com/showthread...hreadid=567817