Need help with macro error

B

Bob Phillips

It is probably because the shape is not 'ClearWorksheet' at that point,
especially as that is what the next line does.

Select the shape, and see what the name is in the Names box.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
S

SlimPickins

Keyboard Shortcut: Ctrl+q
'
ActiveSheet.Shapes("ClearWorkSheet").Select
Selection.Characters.Text = "Clear WorkSheet" & Chr(10) & "Clear
WorkSheet"
With Selection.Characters(Start:=1, Length:=31).Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("C9").Select
Selection.ClearContents
Range("C10").Select
End Sub

the macro debugger say I have an error, and it highlights this:
ActiveSheet.Shapes("ClearWorkSheet").Select
the button is to clear one cell.

Slim
 
S

SlimPickins

To fix the problem I just made another button and macro to go with it.

Thanks for the help anyway.
Slim
 
Top