Excel Visual Basic coding

November 14, 2013 at 17:42:32
Specs: Windows 7
I have a worksheet connected to live data.
Whenever Cell B1 changes I want to clear a range GM9:IT2500.
This is what I use below. It works manually but not when connected to live data feed.
Thanks in advance for your help.

Dim row As Integer
Dim oldB1
Private Sub Worksheet_Change(ByVal Target As Range)

If (Target.Address = "$B$1") Then

If Not (Target.Address = oldB1) Then
If Not (Target.Address = "") Then
Application.ScreenUpdating = False

Application.ScreenUpdating = True
oldB1 = Target.Address
End If
End If
End Sub

See More: Excel Visual Basic coding

November 14, 2013 at 20:03:43
First, a posting tip...

Before posting any more VBA code in this forum, please click on the blue line at the end of this post and read the instructions on how post code so that it is easier for us to read. Thanks!

As for your question, does this help?


Let us know!

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question