VBA Excel: Issue with Zorder /Help with Debugging Code

Posted by AME on Stack Overflow See other posts from Stack Overflow or by AME
Published on 2010-04-13T19:24:14Z Indexed on 2010/04/16 8:53 UTC
Read the original article Hit count: 263

Filed under:

Hi,

I have multiple shapes and checkboxes in a spreadsheet. I want to create a function that places a particular shape to front (a higher Z-order than its peers) when its corresponding checkbox is clicked. This is the code that I currently have:

Sub CheckBox3_Click()
If CheckBox3.Value = True Then
Sheet1.Shapes("blueoval").ZOrder msoBringToFront
End If
End Sub

I get Run-time Error '424' whenever I run this code. I am new to VBA for excel, so any help would be greatly appreciated. What's wrong with this code? What's missing? etc.. Thanks!

© Stack Overflow or respective owner

Related posts about excel-vba