Setting selection to Nothing when programming Excel

后端 未结 17 2089
误落风尘
误落风尘 2021-02-02 09:35

When I create a graph after using range.copy and range.paste it leaves the paste range selected, and then when I create a graph a few lines later, it uses the selection as the f

17条回答
  •  旧巷少年郎
    2021-02-02 09:50

    If you select a cell in an already selected range, it will not work. But, Selecting a range outside the original selection will clear the original selection.

    '* The original selection *' ActiveSheet.range("A1:K10").Select

    '* New Selections *' Activesheet.Range("L1").Select

    '* Then *' Activesheet.Range("A1").Select

提交回复
热议问题