LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Selecting most of very many programmatically


what you can also do is expanding
a selection by setting the replace argument to false..

Sub SubSet()
Dim shp As Shape
Dim sel As DrawingObjects

Application.ScreenUpdating = False
ActiveCell.Select
For Each shp In ActiveSheet.Shapes
If shp.AutoShapeType = msoShapeOval Then
shp.Select False
End If
Next
Set sel = Selection
Application.ScreenUpdating = True

End Sub



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Tom Ogilvy wrote :

Sub SelectSubset()
Dim v() As Variant
v = Array("Rectangle 2", "Oval 5")
ActiveSheet.Shapes.Range(v).Select
End Sub

worked for me. The declaration

Dim v() as Variant

was important.

this also worked:

Sub SelectSubset()
Dim v() As Variant
ReDim v(0 To 1)
v(0) = "Rectangle 2"
v(1) = "Oval 5"
ActiveSheet.Shapes.Range(v).Select
End Sub

 
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
Selecting Embedded charts in Active Sheets programmatically Barb Reinhardt Charts and Charting in Excel 5 January 15th 06 02:36 PM
How do I programmatically specify a range. Hari[_3_] Excel Programming 4 January 17th 05 03:31 PM
delete row programmatically Pat Excel Programming 2 September 2nd 04 09:11 PM
Programmatically Add Reference` keepitcool Excel Programming 1 September 16th 03 05:30 PM
Selecting Rows Programmatically Aaron Lampkin Excel Programming 1 September 5th 03 01:42 PM


All times are GMT +1. The time now is 02:39 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"