Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Microsoft Excel - Run-Time Error '-2147024809 (80070057)'


  • Please log in to reply
3 replies to this topic

#1 Richard ken

Richard ken

  • Members
  • 247 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:12:44 PM

Posted 05 July 2017 - 08:08 PM

Hi,

 

I recorded a macro that will change the text on the button to show the current date. When I Shared the Workbook I get this error:

 

Run-time error '-2147024809 (80070057)':

 

Requested Shapes are locked for selection

 

Does anyone know a workaround for this? I want the Macro to work while it is being shared. Thank you

Sub updateDate()
'
' updateDate Macro
'

'
    ActiveSheet.Shapes.Range(Array("Button 1")).Select
    Selection.Characters.Text = Date
    With Selection.Characters(Start:=1, Length:=9).Font
        .Name = "Calibri"
        .FontStyle = "Bold"
        .Size = 11
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = 3
    End With
    Range("B1").Select
End Sub



BC AdBot (Login to Remove)

 


#2 -Krockz

-Krockz

  • Members
  • 23 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Mordor
  • Local time:01:44 PM

Posted 06 July 2017 - 12:11 PM

A Post from a different fourm:

 

Did you locked/ protect your Charts and are they embedded?

 

If so, you can unprotect them by using this statement, for example:

ActiveSheet.ChartObjects("Chart 1").Chart.ProtectSelection = False

Clipped from here



#3 Richard ken

Richard ken
  • Topic Starter

  • Members
  • 247 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Local time:12:44 PM

Posted 08 July 2017 - 11:00 PM

 

A Post from a different fourm:

 

Did you locked/ protect your Charts and are they embedded?

 

If so, you can unprotect them by using this statement, for example:

ActiveSheet.ChartObjects("Chart 1").Chart.ProtectSelection = False

Clipped from here

 

I have tried that already. 



#4 jwoods301

jwoods301

  • Members
  • 1,489 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:12:44 PM

Posted 09 July 2017 - 12:10 AM

Set VBA to break on class module and you'll see the exact line where it's happening.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users