toggleButton.locked=true worked in office 03, but not is office 07

N

Neal

Hi,
I'm testing an application I made in Excel 2003 VBA in Excel 2007. I get
the following error:

"Run-time error '1004':
Unable to set the Locked property of the OLEObject class"

Here's the code where it runs into trouble:
<code>
With Sheets("INTERFACE").tglSparesInfo 'unlock sparesinfo button
.Locked = False
.ForeColor = black
End With
</code>

It's the ".locked=false" that doesn't work. If I take out all lines of code
in the application that are .locked=true or .locked=false, the application
runs fine.

Anyone have any ideas about why I'm running into this problem in Excel 2007,
but not Excel 2003?
Thanks for any help you can give.
Neal
 

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