Question : Unable to set the range class error message

What is wrong to this code:

    If appXL.Sheets(WSName).Range("TN2") = 0 Then
       
        With appXL.Sheets("Worksheet4")
            .Range("A1:A34").EntireRow.Hidden = True>>>>>> error starts here
            .Range("O10:O34").EntireRow.Hidden = True
            .Range("P10:P34").EntireRow.Hidden = True
            '.EntireRow.Hidden = True
            .Protect
            Parent.Save
         End With
The error says: Unable to set the hidden property of this range class

Answer : Unable to set the range class error message

If it works from Excel - but not Access then either there is a particular problem (with your install or whatever) or a fundamental flaw in Automation.
(I've seen something like ignored commands in Word before many moons ago).
Random Solutions  
 
programming4us programming4us