by thonggruss » Tue Jun 17, 2008 8:51 am
Hi
I start learning VB after i start BA, i have the basic idea but not pro, i wrote a code but it makes my sheet very busy. can somebody make it to more efficient?
My basic idea is, when the sheet is updated and go in-play, then place a "U" to update my balance, after that quit the entire macro. i use z41 to control the update but is there any better/pro codes? (start from A41)
thank you
Private Sub Worksheet_Calculate()
If Sheets("1").Range("A41").Value <> Sheets("1").Range("z1").Value Then
Sheets("1").Range("z1").Value = Sheets("1").Range("A41").Value
Sheets("1").Range("z41").Value = 0
End If
If Sheets("1").Range("z41").Value = 0 Then
If Sheets("1").Range("e42").Value = "In Play" Then
Sheets("1").Range("z41").Value = 1
Sheets("1").Range("t45:t80").ClearContents
Sheets("1").Range("j42").Value = "U"
End If
End If
End Sub