【Excel VBA】用途:避免再輸入資料時 日期格式不一 導致資料分析困難
步驟:
- 將下載附件內的模組與物件匯入至Excel模組內
- 至所需要使用的sheet頁面,設定哪一個儲存格或欄位要觸發日歷選單
- 程式碼:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells(1).Address = “$B$2” Then 日曆.Show ‘單一儲存格觸發
If Not Intersect(Target, Range(“C2:C1000”)) Is Nothing Then 日曆.Show ‘多儲存格觸發
end sub
[sdm_download id=”2322″ fancy=”1″]