![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
If you use Columns("A:N").Select in a marco how do you deselect them
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
Select something else
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
I know I can do that but I did not want to move out of the cell I am in, tried using deselect but it want work
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
As far as I know, there must be at least one cell selected in a worksheet - i don't think it's possible to have nothing selected.
What exactly are you trying to do? It is rarely necessary to do any selecting/activating in macros and doing so merely increases run times. |
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Brisbane, Down Under
Posts: 533
|
Select the cell you are in and the columns will be deselected.
|
|
|
|
|
|
#6 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
As has already been said it is very rare that you should need to select an Objects with VBA. But if you do just use:
ActiveCell.Select |
|
|
|
|
|
#7 |
|
Guest
Posts: n/a
|
I am selecting the range to clear it is there anouther way to do this with out selecting it, but I want to end up in the cell I was in which could be different each time. ActiveCell.Select takes me to A1
|
|
|
|
#8 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Sure is, try: Range("A1:D500").ClearContents 'or to remove formatting as well 'Range("A1:D500").Clear |
|
|
|
|
|
#9 |
|
Guest
Posts: n/a
|
Thanks
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|