Run time Error 380. Could not set the ControlSource property

Ö

Ömer Ayzan

Dear friends,

The following code seems perfectly normal to me and works fine when I start
the excel first time. However after couple of trial with the code I
sometimes get the following Error.

Quote
Run time Error 380
Could not set the ControlSource property. Invalid property value.
Unquote



With frmFilters
.txtFirstNo.ControlSource = "[" & nameofWB & "]Info!E21"
...
End With

Any idea why.
 
T

Tom Ogilvy

Possibly nameofWB has lost its value.

less likely, sheet info no longer exists
 
Ö

Ömer Ayzan

Hello Tom,
It shold have been sth. else neither nameofwb nor sheet info is the cause.
Because if I stop the program and try to set the property manually via its
properties I get the same message. On msdn I could not find much info about
err 380. I think I get this one if an error happens somewhere else
and I stop the prg and restart it. Because when I close excel (2003) and
reopen it, just works fine. But it is annoying not to know when will it
happen.
Ömer
Tom Ogilvy said:
Possibly nameofWB has lost its value.

less likely, sheet info no longer exists

--
Regards,
Tom Ogilvy

Ömer Ayzan said:
Dear friends,

The following code seems perfectly normal to me and works fine when I
start
the excel first time. However after couple of trial with the code I
sometimes get the following Error.

Quote
Run time Error 380
Could not set the ControlSource property. Invalid property value.
Unquote



With frmFilters
.txtFirstNo.ControlSource = "[" & nameofWB & "]Info!E21"
...
End With

Any idea why.
 

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