ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   set a default value on textbox (https://www.excelbanter.com/excel-programming/291846-set-default-value-textbox.html)

dave

set a default value on textbox
 
I am trying to inialise a textbox with a cell value but I am getting the erro

"Invalid use of the poperty

defaultdate = Worksheets("Update").Range("A2"
UserForm1.TextBox1.Text (defaultdate

Any ideas?

BrianB

set a default value on textbox
 
UserForm1.TextBox1.Text = defaultdate


---
Message posted from http://www.ExcelForum.com/


Leo Heuser[_2_]

set a default value on textbox
 
Dave

The proper syntax is:
UserForm1.TextBox1.Text=defaultdate

--
Best Regards
Leo Heuser

Followup to newsgroup only please.

"Dave" skrev i en meddelelse
...
I am trying to inialise a textbox with a cell value but I am getting the

error

"Invalid use of the poperty"

defaultdate = Worksheets("Update").Range("A2")
UserForm1.TextBox1.Text (defaultdate)

Any ideas?




Bob Phillips[_6_]

set a default value on textbox
 
Hi Dave,

Try

UserForm1.TextBox1.Text = Worksheets("Update").Range("A2").Value



--

HTH

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

"Dave" wrote in message
...
I am trying to inialise a textbox with a cell value but I am getting the

error

"Invalid use of the poperty"

defaultdate = Worksheets("Update").Range("A2")
UserForm1.TextBox1.Text (defaultdate)

Any ideas?





All times are GMT +1. The time now is 10:35 PM.

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