vba help

Please post any questions regarding the program here.

Moderator: 2020vision

vba help

Postby knot » Sat Oct 27, 2007 10:48 am

can somebody please change the target address in the following code so it is for cells A1:A10. Thank you. :)

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
If Target.Value = 4 Then
Application.EnableEvents = False
Range("B1").Value = Range("B1").Value + 1
Application.EnableEvents = True
End If
End If
End Sub
knot
 
Posts: 196
Joined: Sun Feb 04, 2007 9:51 pm
Location: leicester

Postby knot » Sat Oct 27, 2007 11:14 am

sorted :)
knot
 
Posts: 196
Joined: Sun Feb 04, 2007 9:51 pm
Location: leicester

Postby phrenetic » Sat Oct 27, 2007 11:31 am

knot

Could you post the answer - it would be useful to understand what the answer turned out to be.

Thanks

Alistair
phrenetic
 
Posts: 142
Joined: Tue Oct 16, 2007 8:44 pm

Postby knot » Sat Oct 27, 2007 2:30 pm

Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
For Each c In Intersect(Target, Range("A1:A10"))
If c.Value = 4 Then
Application.EnableEvents = False
c.Offset(, 1).Value = c.Offset(, 1).Value + 1
Application.EnableEvents = True
End If
Next c
End If
End Sub
knot
 
Posts: 196
Joined: Sun Feb 04, 2007 9:51 pm
Location: leicester

Postby phrenetic » Sat Oct 27, 2007 2:51 pm

Thanks - always useful to learn something new.

Alistair
phrenetic
 
Posts: 142
Joined: Tue Oct 16, 2007 8:44 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 51 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.