LoginSignup
0
0

More than 3 years have passed since last update.

【VBA】処理の最後に部分一致に戻す

Last updated at Posted at 2020-03-05

VBA記述中にFINDメソッドの「完全一致」検索

【例】
Cells.Find(what:="xxx", LookAt:=xlwhole)

を入れていると、処理終了後もExcelが完全一致の設定を保持している。
(置換ダイアログで、「セルの内容が同一~」にチェックが入ったまま)

このためVBAの終了処理に、部分一致に戻す処理を入れることで、
処理終了時に「部分一致」に戻すことができる。
以下の構文であれば、併せて検索欄を空白にリセットすることも可能。

【例】
Cells(1, 1).Find What:="", LookAt:=xlPart

※ 構文の【cells(1,1)】は任意の場所でOK

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0