Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Error Could not set the ControlSource property. Invalid property v

I get a Run-time error '380': Could not set the ControlSource property.
Invalid property value

When I run: Add_ShipToAcct.ControlSource= Range("Add3_ShipToAcct").Value in
a form

If I simply change the "Control Source" to "Text" it works fine:
Add_ShipToAcct.Text = Range("Add3_ShipToAcct").Value

The form field must be correct otherwise you get "Complie error: Method or
data member not found"

The Range must be correct otherwise you get "Run-time error '1004': Method
'Range' of object ' Global' failed

I ran this on about 50 text boxes, and about 6 failed. I have tried
re-creating the field from scratch and copy a working one, but no luck.

I tried replace the Range value with one that worked and now this works. I
have tried copying the "good" cell over the top of the "bad" cell but still
no good.

So it appears that this is failing because it does not like the "contents"
Range Value?

Its here that I have run out of ideas, Any clues that some userforms guru
can give me please?

--
Trefor
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Error Could not set the ControlSource property. Invalid property v

Try using the Address property, not Value.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Trefor" wrote in message
...
I get a Run-time error '380': Could not set the ControlSource property.
Invalid property value

When I run: Add_ShipToAcct.ControlSource= Range("Add3_ShipToAcct").Value
in
a form

If I simply change the "Control Source" to "Text" it works fine:
Add_ShipToAcct.Text = Range("Add3_ShipToAcct").Value

The form field must be correct otherwise you get "Complie error: Method or
data member not found"

The Range must be correct otherwise you get "Run-time error '1004': Method
'Range' of object ' Global' failed

I ran this on about 50 text boxes, and about 6 failed. I have tried
re-creating the field from scratch and copy a working one, but no luck.

I tried replace the Range value with one that worked and now this works. I
have tried copying the "good" cell over the top of the "bad" cell but
still
no good.

So it appears that this is failing because it does not like the "contents"
Range Value?

Its here that I have run out of ideas, Any clues that some userforms guru
can give me please?

--
Trefor



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 201
Default Error Could not set the ControlSource property. Invalid proper

Bob,

Perfect thankyou.

While this has led to a fix, I noticed that with cells on two different
sheets it did always pick the correct range. I am not sure why this would be
the case but moving all the cells onto the same sheets fixed it. Then I
notice that using Address only works if the Range is just one cell if the
userform is a list then Address does not work, so far this is not an issue as
the ones I have the Value proprty worked. Also I noticed that a blanket
change to Address did not work, but changing the ones that failed back to
Value fixed the problem. Seems something strange is happening here.

--
Trefor


"Bob Phillips" wrote:

Try using the Address property, not Value.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Trefor" wrote in message
...
I get a Run-time error '380': Could not set the ControlSource property.
Invalid property value

When I run: Add_ShipToAcct.ControlSource= Range("Add3_ShipToAcct").Value
in
a form

If I simply change the "Control Source" to "Text" it works fine:
Add_ShipToAcct.Text = Range("Add3_ShipToAcct").Value

The form field must be correct otherwise you get "Complie error: Method or
data member not found"

The Range must be correct otherwise you get "Run-time error '1004': Method
'Range' of object ' Global' failed

I ran this on about 50 text boxes, and about 6 failed. I have tried
re-creating the field from scratch and copy a working one, but no luck.

I tried replace the Range value with one that worked and now this works. I
have tried copying the "good" cell over the top of the "bad" cell but
still
no good.

So it appears that this is failing because it does not like the "contents"
Range Value?

Its here that I have run out of ideas, Any clues that some userforms guru
can give me please?

--
Trefor




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ControlSource and Localization Issue?? (run-time error '380' Could not set the ControlSource property) TCook Excel Programming 1 March 4th 07 08:12 AM
Runtime error 380 - Could not set the list property. Invalid property value. [email protected] Excel Programming 3 February 27th 07 06:35 AM
Could not set the ControlSource property. Invalid property value error Ömer Ayzan Excel Programming 2 October 31st 06 09:15 AM
Runtime Error 380 – Could not set the list property. Invalid property value BernzG[_16_] Excel Programming 2 August 21st 05 10:10 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"