ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   need form to initialize without closing (https://www.excelbanter.com/excel-programming/295870-need-form-initialize-without-closing.html)

bruce forster

need form to initialize without closing
 
I have a userform with several comboboxes and textboxes. When I change a selection in a combobox a certain "if" statement on the workbook is supposed to "fire", and it does, but the change is not reflected in the userform until i close and reopen. I am using a UserForm_Initialize() event. Any suggestions as to how I can have the changes on the worksheet be reflected on the userform without closing it.?

thanks


Bob Phillips[_6_]

need form to initialize without closing
 
It would help to see the code.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"bruce forster" wrote in message
...
I have a userform with several comboboxes and textboxes. When I change a

selection in a combobox a certain "if" statement on the workbook is supposed
to "fire", and it does, but the change is not reflected in the userform
until i close and reopen. I am using a UserForm_Initialize() event. Any
suggestions as to how I can have the changes on the worksheet be reflected
on the userform without closing it.??

thanks.




Anders S[_2_]

need form to initialize without closing
 
Hi Bruce,

A Text Box in a User Form is (usually) not dynamic so you will have to refresh it in the code after the if statement has changed the worksheet.

For example:

Private Sub UserForm_Initialize()
Me.TextBox1.Text = ActiveSheet.Range("D1").Value
ActiveSheet.Range("D1").Value = Now()
Me.TextBox1.Text = ActiveSheet.Range("D1").Value
End Sub

HTH
Anders Silven

"bruce forster" skrev i meddelandet ...
I have a userform with several comboboxes and textboxes. When I change a selection in a combobox a certain "if" statement on the workbook is supposed to "fire", and it does, but the change is not reflected in the userform until i close and reopen. I am using a UserForm_Initialize() event. Any suggestions as to how I can have the changes on the worksheet be reflected on the userform without closing it.??

thanks.



All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com