6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

EXCEL-VBAで全文検索を実装する

Last updated at Posted at 2014-03-16

概略

ExcelVBA 2003の全文検索コマンドであるFileSearch.TextOrProperty プロパティが廃止されていたので、代案を考えた。

解決策

なにジョジョ?
ExcelVBAで全文検索が実装できない?

ジョジョ それは
無理矢理実装しようと
するからだよ

逆に考えるんだ
「実装しなくてもいいさ」と考えるんだ


ファイル選択ダイアログの検索機能を使う事にした。

全文検索.bas
Attribute VB_Name = "全文検索"
Sub 全文検索()

    Dim adr As String

    adr = _
        Application.GetOpenFilename( _
           , Title:="画面右上の「ドキュメントの検索」欄にキーワードを入力して下さい。" _
           , MultiSelect:=False _
            )
            
    MsgBox adr
    
End Sub
6
6
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
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?