Complile error

Please post any questions regarding the program here.

Moderator: 2020vision

Complile error

Postby SWV » Fri Oct 25, 2019 9:48 pm

Why do I keep getting an error with this code please?

Code: Select all
Sub Worksheet_Change(ByVal Target As Range)
If Target.Columns.Count = 16 Then
Application.EnableEvents = False

    With ThisWorkbook.Sheets(Target.Worksheet.Name)
         
       
        If .Range("M2") >= 1 Then
            Call Macro1
                   
Application.EnableEvents = True
End Sub
SWV
 
Posts: 61
Joined: Sat Aug 12, 2017 8:11 am

Re: Complile error

Postby alrodopial » Sat Oct 26, 2019 4:47 am

Code: Select all
Sub Worksheet_Change(ByVal Target As Range)
    If Target.Columns.Count = 16 Then
        Application.EnableEvents = False
            With ThisWorkbook.Sheets(Target.Worksheet.Name)
                If .Range("M2") >= 1 Then
                    Call Macro1
                End If
            End With
        Application.EnableEvents = True
    End If
End Sub
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Re: Complile error

Postby SWV » Sun Oct 27, 2019 1:02 pm

Thank you very much alrodopial I really appreciate you taking the time to reply and write the code. I will try it tomorrow :-)
SWV
 
Posts: 61
Joined: Sat Aug 12, 2017 8:11 am


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 57 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.