Could not set the ControlSource property. Invalid property value error

  • Thread starter =?iso-8859-9?Q?=D6mer_Ayzan?=
  • Start date
?

=?iso-8859-9?Q?=D6mer_Ayzan?=

Friends I'm using Excel 2003 and on msform I have a simple textbox named txtFirstNo. Sometimes (I could not repeat problem bymyself) I get the error message 'Could not set the ControlSource property. Invalid property value' to an assignment statement:
txtFirstNo.ControlSource = dbInfo!E21. I have other text boxes whose control source set manually. They work perfectly fine. But this one gives me trouble.
Any Idea why?

Ömer Ayzan
 
N

NickHK

Try :
txtFirstNo.ControlSource = Worksheets("dbInfo").Range("E21").address
as ControlSource requires a string.

NickHK

Friends I'm using Excel 2003 and on msform I have a simple textbox named
txtFirstNo. Sometimes (I could not repeat problem bymyself) I get the error
message 'Could not set the ControlSource property. Invalid property value'
to an assignment statement:
txtFirstNo.ControlSource = dbInfo!E21. I have other text boxes whose
control source set manually. They work perfectly fine. But this one gives me
trouble.
Any Idea why?

Ömer Ayzan
 
B

Bob Phillips

As an aside, best to use an external reference

txtFirstNo.ControlSource =
Worksheets("dbInfo").Range("E21").address(,,,True)


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top