- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
回復 1# myleoyes - Sub 項目()
- Dim Z, Msg As Boolean
- Z = Application.InputBox("請輸入項目名稱", , "早安!", Type:=2)
- If Z <> False Then
- Msg = False
- For I = 1 To Len(Z)
- If Mid(Z, I, 1) Like "[!0-9]" Then Msg = True: Exit For '判定是字串
- Next
- If Msg Then
- ActiveCell = Z
- Else
- ActiveCell = ""
- End If
- ElseIf Z = False Then
- ActiveCell = ""
- End If
- ActiveCell.Offset(, 1).Select
- End Sub
- Sub 註解()
- If ActiveCell.Comment Is Nothing Then ActiveCell.AddComment
- ZZ = InputBox("請輸入附註", , ActiveCell.Comment.Text)
- If ZZ = "" Then ActiveCell.Comment.Delete: Exit Sub
- ActiveCell.Comment.Text Text:=ZZ
- End Sub
複製代碼 |
|