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
 

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

Similar Threads

Need help modifying code 0
vba macro day 2 1
Conditional Formatting of Numbers 2
No! 5
how to use true or false conditions 1
Progress Bar 2
Opening a single workbook 4
Custom Menu Bar 5

Top