![]() |
Unloading Cell Value in Textbox...?
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 |
Unloading Cell Value in Textbox...?
Sorry, what exactly is the question?
-- HTH RP (remove nothere from the email address if mailing direct) "SIGE" wrote in message om... 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 |
Unloading Cell Value in Textbox...?
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 -- Regards, Tom Ogilvy "SIGE" wrote in message om... 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 |
Unloading Cell Value in Textbox...?
Thx Tom,
A Charm!!! Sorry Bob for not having been more clear.. Cheers to you. "Tom Ogilvy" wrote in message ... 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 -- Regards, Tom Ogilvy "SIGE" wrote in message om... 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 |
All times are GMT +1. The time now is 03:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com