tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,926
- Office Version
- 365
- 2019
- Platform
- Windows
This displays the value of a changed cell on the worksheet:
However if multiple cells are selected, an error message pops up:
I can suppress this by disallowing multiple cells to be selected, such as:
but is there a way to actually make the code work when multiple cells are selected?
Thanks
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox Target.Value
End Sub
However if multiple cells are selected, an error message pops up:
Code:
Run-time error '13':
Type mismatch
I can suppress this by disallowing multiple cells to be selected, such as:
Code:
If Selection.Count > 1 Then
but is there a way to actually make the code work when multiple cells are selected?
Thanks
Last edited: