ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   UserForm Initialization (https://www.excelbanter.com/excel-programming/406466-userform-initialization.html)

Patrick C. Simonds

UserForm Initialization
 
Sorry if this is a second post, but my reader said my original message was
no longer on the server.

In UserForm Initialization, is there any way to have TextBox4 always show
the value of cell A4?


Mike

UserForm Initialization
 
TextBox4 .value = Worksheets("Sheet1").Range("A4").value

"Patrick C. Simonds" wrote:

Sorry if this is a second post, but my reader said my original message was
no longer on the server.

In UserForm Initialization, is there any way to have TextBox4 always show
the value of cell A4?



Josh heep

UserForm Initialization
 
On Feb 21, 1:15 pm, "Patrick C. Simonds"
wrote:
Sorry if this is a second post, but my reader said my original message was
no longer on the server.

In UserForm Initialization, is there any way to have TextBox4 always show
the value of cell A4?


Hrm, I couldn't see my reply to the original post so I am trying
again....

Private Sub UserForm_Initialize()

Me.TextBox1.Value =
ThisWorkbook.Sheets("Sheet1").Range("A4").Value
' Or
' Me.TextBox1.Value = ThisWorkbook.ActiveSheet.Range("A4").Value

End Sub


All times are GMT +1. The time now is 01:22 PM.

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