[ 初めての方へ | 一覧(最新更新順) | 全文検索 | 過去ログ ]
『セルをコントロールキーで選択した場合のカーソルの移動VBA 2』(しーちゃん)
カレンダーを一つ一つ処理するのではなく複数選択(コントロールキー)して
一度に処理します。戻すときは初期処理で戻します。
Public Sub Cmd0021()
Dim i As Long Dim ClAd As String Dim MsgRun As VbMsgBoxResult Dim Cnt As Range
'Cnt = 0 'i = Selection.Count 'Do Until i = Cnt For Each Cnt In Selection ClAd = ActiveCell.Value MsgRun = MsgBox(ClAd & "出勤処理しますか", vbYesNoCancel + vbQuestion) Select Case MsgRun Case vbYes ActiveCell.Interior.Color = 16777215 '白色 ActiveCell.Font.Color = 1 'フォント色:黒 'Cnt = Cnt + 1 'Application.SendKeys ("{Enter}") Case vbNo 'Cnt = Cnt + 1 'Application.SendKeys ("{Enter}") Case Else 'Call Application.OnKey("~") Exit Sub End Select 'Loop Next End Sub
< 使用 Excel:Excel2010、使用 OS:Windows10 >
ClAd = Cnt.Value (???) 2018/06/18(月) 18:00
[ 一覧(最新更新順) ]
YukiWiki 1.6.7 Copyright (C) 2000,2001 by Hiroshi Yuki.
Modified by kazu.