Hi all,
I use the Data > Refresh button on several spread sheets. On a recent one, I added a balance column adjacent to the external data that references cells in the external data to highlight a cell in the balance column. This works great until I Refresh the data, then the conditional formatting is lost. The following VBA code will reestablish the conditional formatting:
The last piece of the puzzle to solve is, how can I tell the external data was refreshed so this subroutine can be called?
advTHANKSance,
Ken
I use the Data > Refresh button on several spread sheets. On a recent one, I added a balance column adjacent to the external data that references cells in the external data to highlight a cell in the balance column. This works great until I Refresh the data, then the conditional formatting is lost. The following VBA code will reestablish the conditional formatting:
VBA Code:
Sub HideInvoice()
ActiveSheet.Range("j8:j1000").FormatConditions.Delete
With ActiveSheet.Range("j8:j1000").FormatConditions.Add( _
Type:=xlExpression, _
Formula1:="=$D8>2")
.Font.Color = RGB(255, 255, 255)
End With
End Sub
The last piece of the puzzle to solve is, how can I tell the external data was refreshed so this subroutine can be called?
advTHANKSance,
Ken