Quantcast
Channel: OKWAVE 最新質問(Visual Basic/257)【本日】
Viewing all articles
Browse latest Browse all 6510

コマンドボタンに二回目のマクロ実行しない設定を

$
0
0
excel2007を使ってマクロ作成の初心者です。 「最新明細」シート上に、ユーザーフォームがあります。 その中のコマンドボタンクリックすると マクロ2を実行します。 しかし、このマクロは月初めに1回だけ実行し、 再びボタンをクリックしても、マクロ2を実行しないようにしたいです。 いろいろ考えたましたが、思ったように動作させることできず、こまってます。 どうしたらよいのでしょう。 Sub 処理済の確認() Dim AB3 As Date Dim AB4 As Date Sheets("計算").Select If AB3 = AB4 Then Exit Sub MsgBox "データは処理済みです。" Sheets("最新明細").Select Else End If If AB3 <> AB4 Then マクロ2の実行 End If End Sub

Viewing all articles
Browse latest Browse all 6510

Trending Articles