View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Swap values in userform txtboxes

Try something like this...

Private Sub CheckBox1_Click()
Dim Temp As String
Temp = txtheight.Value
txtheight.Value = txtwidth.Value
txtwidth.Value = Temp
End Sub

--
Rick (MVP - Excel)


"CR" wrote in message
m...
I have two txtboxes on a userform.
txtheight and txtwidth, I want to add a checkbox that will change the
value of the height box (11) to the value of the width box (14) and vice
versa.
In other words, change the two boxes from 11x14 to 14x11.

Thank you
CR