Unloading Cell Value in Textbox...?

  • Thread starter Thread starter SIGE
  • Start date Start date
S

SIGE

Hi There,

I would like to get in my textbox the value of a certain cell on my sheet ...
If i do not like the value ...I fill in Textbox1 and write it to the same cell
Could it be that it unloads ...?

Sub Fill_Form()
Dim pform As UserForm4
Set pform = New UserForm4

Application.ScreenUpdating = False
Load pform
pform.Show
If bStop Then Exit Sub

'***** TO SUGGEST WHAT IS ALREADY FILLED IN THE FILE *****
pform.TextBox1.Value = Worksheets("General TT").Range("C3").Text
'***** To OVER-WRITE EXISTING DATA ****
Worksheets("General TT").Range("C3") = pform.TextBox1.Text


Application.ScreenUpdating = True

'Run "Save_CCard_Proposed_Name"
End Sub
 
Sorry, what exactly is the question?

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
You need to put the code for loading the textbox and writing back in the
events of the useform. That code doesn't run until the userform is unloaded
or hidden.

----- In the Userform Module ------------
Private Sub Userform_Initialize()
pform.TextBox1.Value = Worksheets("General TT").Range("C3").Text
end Sub

Private Sub TextBox1_Change()
Worksheets("General TT").Range("C3") = pform.TextBox1.Text
end Sub

---------------------------------------
in a general module
--------------------------------------

Sub Fill_Form()
Dim pform As UserForm4
Set pform = New UserForm4

Application.ScreenUpdating = False
Load pform
pform.Show
If bStop Then Exit Sub

Application.ScreenUpdating = True

'Run "Save_CCard_Proposed_Name"
End Sub
 
Back
Top