Need help with macro error

  • Thread starter Thread starter Bob Phillips
  • Start date Start date
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)
 
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
 
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

vba macro day 2 1
Combining two macros 2
No! 5
Conditional Formatting of Numbers 2
Progress Bar 2
Opening a single workbook 4
Hide Macros from Users using workbook! 11
Help with "IF" Formula 2

Back
Top