Hide and unhide sheet in vb.net

I need to hide and unhide the sheet in excel using vb.net

@sruthesanju

             Sub HideSheet()
             Sheets("Sheet1").Visible = False
             End Sub



              Sub UnhideSheet()
              Sheets("Sheet1").Visible = True
              End Sub

Hi

Use INVOKE CODE activity and mention the below code choosing vb net as language

Sub Macro1()
    ActiveWindow.Visible = False
    Windows("Book1").Visible = True
End Sub

Where book1 is the sheetname
If the windows(“Book1”).Visible is true it is unhidden and if visible is false it is hidden

Hope this would help you resolve this

Cheers @sruthesanju