littlepete
Well-known Member
- Joined
- Mar 26, 2015
- Messages
- 507
- Office Version
- 365
- Platform
- Windows
hello
I have an excel sheet to type in my lottery numbers ...
all works excellent, but i'm trying to 1. clear all data and 2. start the check the numbers macro with an selection.change event...
selected from the macro list, both macros work as they should...
the macro to clear all data is on range c3:f3, named range "knopvoor" (preparation)
the macro to check all the numbers is on range h3:k3, named range "knoptrek" (choose)
what could I be doing wrong ?
thanks for the help !
I have an excel sheet to type in my lottery numbers ...
all works excellent, but i'm trying to 1. clear all data and 2. start the check the numbers macro with an selection.change event...
selected from the macro list, both macros work as they should...
the macro to clear all data is on range c3:f3, named range "knopvoor" (preparation)
the macro to check all the numbers is on range h3:k3, named range "knoptrek" (choose)
VBA Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Selection.Count = 1 Then
If Not Intersect(Target, Range("knopvoor")) Is Nothing Then
Call voorbereiding
End If
If Not Intersect(Target, Range("knoptrek")) Is Nothing Then
Call trekking
End If
End If
End Sub
what could I be doing wrong ?
thanks for the help !