Board logo

標題: [發問] vba程式求救 [打印本頁]

作者: 阿宗    時間: 2017-9-4 11:12     標題: vba程式求救

各位大大,請幫我確認下面程式哪你有錯誤,為何我每天重新開機後程式就無法執行
請幫忙我,謝謝!
--------------------------------------------------------------------------------------------------
Sub Sample5()
    With CommandBars("Cell").Controls.Add
         .Caption = "測試"
         .OnAction = "另存"
    End With
End Sub
------------------------------------------------------------------------------------------------------------------------
Sub 另存()
   
     ActiveWorkbook.SaveAs Filename:="C:\Users\QAUSER1\Documents\加班資料\品保課加班單統計.xlsm"
   
    ActiveSheet.Protect Password:="0304"
   
    ActiveWorkbook.SaveAs Filename:="\\Hp110g3\品保qa\加班紀錄\品保課加班單統計.xlsx", _
        FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
   
   
   
End Sub
--------------------------------------------------------------------------------------------------------




歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)