VBA code in excel for 200 sheets
Solved/Closed
        Related:         
- VBA code in excel for 200 sheets
 - Excel online vba - Guide
 - Excel mod apk for pc - Download - Spreadsheets
 - Vba excel mac - Guide
 - Cs 1.6 code - Guide
 - Google sheets right to left - Guide
 
2 responses
                
        
                    TrowaD
    
        
                    Posts
            
                
            2921
                
                            Registration date
            Sunday September 12, 2010
                            Status
            Contributor
                            Last seen
            December 27, 2022
            
            
                    555
    
    
                    
Jan 31, 2012 at 09:53 AM
    Jan 31, 2012 at 09:53 AM
                        
                    Hi Issa,
It seems to me that you don't want to apply the code to a single sheet but to the entire workbook.
Therefore double-click on ThisWorkbook below the sheets in VB and paste your code like:
Best regards,
Trowa
            It seems to me that you don't want to apply the code to a single sheet but to the entire workbook.
Therefore double-click on ThisWorkbook below the sheets in VB and paste your code like:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address <> "$C$9" Then Exit Sub
If Target = "seconded" Then
Range("a12").EntireRow.Hidden = True
Range("a14").EntireRow.Hidden = True
Else
Range("a12").EntireRow.Hidden = False
Range("a14").EntireRow.Hidden = False
End If
End Sub
Best regards,
Trowa