ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cell selection in non-active sheet (https://www.excelbanter.com/excel-programming/304285-cell-selection-non-active-sheet.html)

Otto Moehrbach[_6_]

Cell selection in non-active sheet
 
Excel 2002, WinXP
All the following relates to doing this in VBA.

If I paste something to say, A3:D3, then A3:D3 of that sheet is highlighted
in blue.

If I want to get rid of the blue highlight, and make A1 the active cell on
that sheet, and that sheet is the active sheet, all I have to do is select
A1.

Question: How can I make this happen when that sheet is not the active
sheet, short of selecting that sheet first?

Thanks for your help. Otto



keepITcool

Cell selection in non-active sheet
 
I assume you want to copy paste
and not show what you'ce copied thrue the selection..

use syntax like
Range("sheet1!a3:d3").copy Range("sheet2!a4:d4")

and there's no need to (re)select any cells :)


keepITcool

< email : keepitcool chello nl (with @ and .)
< homepage: http://members.chello.nl/keepitcool


"Otto Moehrbach" wrote:

Excel 2002, WinXP
All the following relates to doing this in VBA.

If I paste something to say, A3:D3, then A3:D3 of that sheet is
highlighted in blue.

If I want to get rid of the blue highlight, and make A1 the active
cell on that sheet, and that sheet is the active sheet, all I have to
do is select A1.

Question: How can I make this happen when that sheet is not the
active sheet, short of selecting that sheet first?

Thanks for your help. Otto






All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com