Run Time Error '1004'

S

Sam K

Greetings All,

I am getting a run time error '1004' (select method of range class failed)
only when I click on
a hyperlink in the sheet. Thanks in advance. --Sam K.


Public Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
With Application
.ScreenUpdating = False
.EnableEvents = False
ActiveSheet.unprotect
Windows(1).VisibleRange.WrapText = True ' wrapping text only in the
visible range window
Target.Select
.EnableEvents = True
.ScreenUpdating = True
ActiveSheet.protect
End With
End Sub
 

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

Top