ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Userform with textbox displaying Cell B1 Value (https://www.excelbanter.com/excel-discussion-misc-queries/244500-userform-textbox-displaying-cell-b1-value.html)

JMay

Userform with textbox displaying Cell B1 Value
 
How do I do this?

My Cell B1 contains the number 55.

I want my textbox to read

"Cell B1 is 55",

But HOW???????????

Per Jessen[_2_]

Userform with textbox displaying Cell B1 Value
 
You can load the textbox when the userform is initialezed. Ínsert the
code below in the code sheet for for the userform.

Private Sub UserForm_Initialize()
Me.TextBox1.Value = "Cell B1 is " & Range("B1").Value
End Sub

Regards,
Per


On 4 Okt., 01:04, JMay wrote:
How do I do this?

My Cell B1 contains the number 55.

I want my textbox to read

"Cell B1 is 55",

But HOW???????????



Chip Pearson

Userform with textbox displaying Cell B1 Value
 

Try something like

Me.TextBox1.Text = "Cell B1 is " & Format(Range("B1").Value,"#,##0")

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Sat, 3 Oct 2009 16:04:01 -0700, JMay
wrote:

How do I do this?

My Cell B1 contains the number 55.

I want my textbox to read

"Cell B1 is 55",

But HOW???????????



All times are GMT +1. The time now is 03:51 PM.

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