エントリを含む最後の列の文字をユーザーに尋ねる InputBox を作成しました。タイトルはインデックス通りのシート名にしたいです。ここに私が書いたコードがあります:
Dim LastEntryCol As String
Dim ShtName As Variant
Set ShtName = ThisWorkbook.Sheets(2) '****The number 2 will need to be changed to an index. For now it's hard-entered.
LastEntryCol = Application.InputBox("What is the letter of the last column containing entry labels?", ShtName)`
実行すると、エラー 1004「オブジェクト '_Application' のメソッド 'InputBox' が失敗しました」が表示されます。タイトル引数を「やったーコーディング!」
何が問題なのか、どうすれば修正できるのか、誰か説明してもらえますか? ありがとう!