Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これが私のコードです。
Sub Hide_Column() Range("A,C:AV,AY:BA,BJ:BR").Select Selection.EntireColumn.Hidden = True End Sub
私はこれを私のアクティブなワークブックの個人から実行しています。考え?
行番号を使用せずに列を選択するときは、開始と終了を指定する必要があります。
range("A")間違っている
range("A")
range("A:A")正しい形式です
range("A:A")
したがって、コードは次のようになります。
range("A:A,C:AV,AY:BA,BJ:BR").Columns.Hidden=true