Code gives Runtime Error 13
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Target.Range("A1") Then
MsgBox "Please Highlight Cell A1 Before Calculating Lexical Diversity"
End If
End Sub
How can I fix this?
ExcelExperts.comExcel Consultancy, VBA Consultancy, Training and Tips Call:+442081234832 |
|
Excel / VBA ConsultancyFree Training VideosFree SpreadsheetsExcel / VBA JobsNavigationWho's onlineThere are currently 0 users and 296 guests online.
New Excel Experts
Current Excel / VBA Jobs |
Code gives Runtime Error 13Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Target.Range("A1") Then End If End Sub How can I fix this? |
Highest Ranked Users
Last viewed:
Recent Blogs
ForumsRecent comments
User login |
Change Target.Range("A1") to Target.Address = "$A$1"
Hi dragonv29, try this:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Target.Address = "$A$1" Then
MsgBox "Please Highlight Cell A1 Before Calculating Lexical Diversity"
End If
End Sub