View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nick Hebb Nick Hebb is offline
external usenet poster
 
Posts: 162
Default userform and spreadsheet formulas

Private Sub CommandButton2_Click()

UserForm1.Show
UserForm1.TextBox1.Value = Range("K94").Text

End Sub


Make sure you use the Text property of Range("K94"), not the value
property.

The reason that the original form removed the cell formula is because
the cell <== control binding is a 2-way relationship. When you change
the value or close the form, the cell gets updated with the control's
value, which in this case was a plain number.

Nick Hebb
http://www.breezetree.com