Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Programming Excel with VBA: How to make Selection Nothing

Hi
I'm programming Excel in VBA, after running a PasteSpecial method the pasted
region is selected, I do not want any range selected. How can I turn off the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Programming Excel with VBA: How to make Selection Nothing

Range("A1").Select

or

Selection(1).Select

--
Regards,
Tom Ogilvy


"John Sherry" wrote in message
...
Hi
I'm programming Excel in VBA, after running a PasteSpecial method the

pasted
region is selected, I do not want any range selected. How can I turn off

the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Programming Excel with VBA: How to make Selection Nothing

Thanks Tom,
Range(A1").Select leaves "A1" selected.

Selection(1).Select leaves top left cell of range selected.

Tried Selection(0).Select, it leaves cell to left of top left cell of range
selected.

Am I asking too much of Excel to expect that there can be no cell selected?

Best regards

"Tom Ogilvy" wrote:

Range("A1").Select

or

Selection(1).Select

--
Regards,
Tom Ogilvy


"John Sherry" wrote in message
...
Hi
I'm programming Excel in VBA, after running a PasteSpecial method the

pasted
region is selected, I do not want any range selected. How can I turn off

the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Programming Excel with VBA: How to make Selection Nothing

There will always be something selected unless you protect the sheet and set
enable selection to disallow selection. You can position the cursor off
the screen

ActiveWindow.VisibleRange.Offset(200,0).Activate

perhaps.

When you complained about pastespecial residue, I didn't realize your
request was so primal.

--
Regards,
Tom Ogilvy



"John Sherry" wrote in message
...
Thanks Tom,
Range(A1").Select leaves "A1" selected.

Selection(1).Select leaves top left cell of range selected.

Tried Selection(0).Select, it leaves cell to left of top left cell of

range
selected.

Am I asking too much of Excel to expect that there can be no cell

selected?

Best regards

"Tom Ogilvy" wrote:

Range("A1").Select

or

Selection(1).Select

--
Regards,
Tom Ogilvy


"John Sherry" wrote in message
...
Hi
I'm programming Excel in VBA, after running a PasteSpecial method the

pasted
region is selected, I do not want any range selected. How can I turn

off
the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Programming Excel with VBA: How to make Selection Nothing

close the file
--
Gary''s Student


"John Sherry" wrote:

Hi
I'm programming Excel in VBA, after running a PasteSpecial method the pasted
region is selected, I do not want any range selected. How can I turn off the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Programming Excel with VBA: How to make Selection Nothing

Perhaps a workaround...

With ActiveSheet
.EnableSelection = xlNoSelection
.Protect
End With

HTH. :)
--
Dana DeLouis
Win XP & Office 2003


"John Sherry" wrote in message
...
Hi
I'm programming Excel in VBA, after running a PasteSpecial method the
pasted
region is selected, I do not want any range selected. How can I turn off
the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default Programming Excel with VBA: How to make Selection Nothing

The only way that I know of not selecting anything is to deselect a
chart. So, if you have a chart in the worksheet, the following in the
VBE Immediate window yields 'Nothing'

activesheet.chartobjects(1).activate
activechart.Deselect
?typename(selection)

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Hi
I'm programming Excel in VBA, after running a PasteSpecial method the pasted
region is selected, I do not want any range selected. How can I turn off the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Programming Excel with VBA: How to make Selection Nothing

Still around? i don't think anyone answered your question properly.

Application.CutCopyMode = False

This will deselect the region. The advice that there is always something
selected is wrong. There is always something activated (though that chart
thing from Tushar sounds like an exception).


"John Sherry" wrote:

Hi
I'm programming Excel in VBA, after running a PasteSpecial method the pasted
region is selected, I do not want any range selected. How can I turn off the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Programming Excel with VBA: How to make Selection Nothing

I always select the first cell

For example
http://www.rondebruin.nl/values.htm

..Cells(1).Select

See the first macro


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Allen_N" wrote in message ...
Still around? i don't think anyone answered your question properly.

Application.CutCopyMode = False

This will deselect the region. The advice that there is always something
selected is wrong. There is always something activated (though that chart
thing from Tushar sounds like an exception).


"John Sherry" wrote:

Hi
I'm programming Excel in VBA, after running a PasteSpecial method the pasted
region is selected, I do not want any range selected. How can I turn off the
selection?

Anyone got any ideas on how to do this neatly?

Many thanks in advance

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dragging formula to make selection memobile Excel Discussion (Misc queries) 2 July 30th 08 02:16 PM
How can I make random selection from excel list? DD Excel Discussion (Misc queries) 2 October 9th 06 09:38 PM
how to make a menu selection in the same cell? Eve Excel Discussion (Misc queries) 1 March 29th 06 08:29 PM
how make a selection like sum function's CFCAT Excel Programming 1 June 1st 05 05:59 PM
Programming to make graph work. Adam Hicks Excel Programming 3 May 18th 04 04:25 PM


All times are GMT +1. The time now is 05:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"