View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
STEVE BELL STEVE BELL is offline
external usenet poster
 
Posts: 692
Default Save value on form

In your code your might insert a Name and set it = to the value.
Than refer to the name to set the textbox.

recorded code in Excel 2000
ActiveWorkbook.Names.Add Name:="Myvalue", RefersToR1C1:="=13"


--
steveB

Remove "AYN" from email to respond
"speyry" wrote in
message ...

1) The easiest way I know how is to write the value to a cell. Then when
the userform opens again, set the "controlsource" of the textBox to the
value in the cell that you previously stored the value in.

RANGE(\"A1\").VALUE = TEXTBOX1.VALUE
'After closed and reopened

*TextBox1.Value = Range("A1") *
'OR
*TextBox1.ControlSource = Range("A1")*

With this method, if changes are made to the value, it can create
problems sometimes

Or something similar depending on how your user form is set up


--
speyry
------------------------------------------------------------------------
speyry's Profile:
http://www.excelforum.com/member.php...o&userid=25128
View this thread: http://www.excelforum.com/showthread...hreadid=386473