Team,
How can i run a CAll if sheet is Visible, If it isnt carry on??
How can i run a CAll if sheet is Visible, If it isnt carry on??
VBA Code:
'--------
'Clear Sheets from Database
'--------
Sub ClearFormulas()
Dim i As Long
For i = Sheets("Ignore1").Index + 1 To Sheets("Ignore2").Index - 1
With Sheets(i)
.Unprotect
.Range("A1, C10, C34:C38, D3, L34:L38, F3, L3:L200, N3:N200, P3:P200, R3:U200").ClearContents
.Protect
End With
Next
'--------
'Clear TOC & Tabs Sheet
'--------
'--------INSERT CALL ClearTableCluster, and Call ClearTableReader Sheets is VISIBLE, If NOT Visible Carry on, If it is VISIBLE, DO the call and return here and Carry on
Sheets("Site TOC").Select
Sheets("Site TOC").Unprotect
Sheets("Site TOC").Range("C7:C31, C34:C38, D7:D31, F3, F4, F7:F31, G7:G31, I7:I31, J7:J31, L7:L31, L34:L38, M7:M31, Z1, AA1, AC1:AC200").ClearContents
Range("C7:L31, C34:L38").Interior.Color = vbWhite
ActiveSheet.Tab.ColorIndex = 2
Range("A1").Activate
Sheets("Site TOC").Protect
End Sub
Last edited: