Excel Select vs Activate

后端 未结 6 1777
轻奢々
轻奢々 2020-12-01 10:39

What is the difference between the VBA code wb.Sheets(1).Cells.Select and wb.Sheets(1).Activate?

6条回答
  •  鱼传尺愫
    2020-12-01 11:27

    Here is an explanation from MSDN

    You first example wb.Sheets(1).Cells.Select allows you to select multiple cells

    The second wb.Sheets(1).Activate makes the sheet active.

    There are lots of resources out there to help with Excel VBA.

    http://www.excel-vba.com/index.htm#Tutorial%20on%20Excel%20Macros

    http://www.excel-vba-easy.com/

    http://www.functionx.com/vbaexcel/

提交回复
热议问题