参考代码
Dim App As New MSExcel.ApplicationDim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\test.xls")Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)Ws.Protect(Password:="foxtable")App.Visible = TrueWs.PrintPreviewApp.Quit