VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes
VB net Excel grouping shapes VB net Excel grouping shapes
VB net Excel grouping shapes
Go Back  Xtreme Visual Basic Talk > > > VB net Excel grouping shapes


Reply
 
Thread Tools Display Modes
  #1  
Old 11-18-2011, 06:00 AM
MikeWar MikeWar is offline
Newcomer
 
Join Date: Sep 2003
Location: North England
Posts: 15
Unhappy VB net Excel grouping shapes


I have a worksheet with up to 200 shapes and I want to group them all into one group.
I know how to group a few of them (oDrawing is my Excel.Worksheet) :
Dim Grp As Microsoft.Office.Interop.Excel.Shape = oDrawing.Shapes.Range({"S1", "S2", "S3"}).Group()
Grp.Name = "myGroup1"
How to I build an array to pass into oDrawing.Shapes.Range({ --array--}).Group()
I can loop thru the shapes :-
Dim shp As Microsoft.Office.Interop.Excel.Shape
Dim shpList As New ArrayList()
Dim ShpString As String = ""
For Each shp In oDrawing.Shapes
shpList.Add(shp.Name)
ShpString = ShpString & shp.Name & Chr(34) & ", " & Chr(34)
Next
I cannot pass either the arraylist or the correctly formated string to the .group
Reply With Quote
  #2  
Old 11-22-2011, 11:15 AM
DennisW's Avatar
DennisW DennisW is offline
Junior Contributor
 
Join Date: Mar 2006
Location: Östersund, Sweden
Posts: 268
Default

Mike,

This looks like a post I recently read at Expert Exchange. Did You get any solution from EE?
__________________
Kind regards,
Dennis

.NET & Excel | 2nd edition PED | MVP
Reply With Quote
  #3  
Old 11-30-2011, 02:06 AM
MikeWar MikeWar is offline
Newcomer
 
Join Date: Sep 2003
Location: North England
Posts: 15
Default

DennisW
Suggestion in EE was not possible in VB net (It is in VB6).
See my reply in EE
http://www.experts-exchange.com/Soft...html#a37212127
Reply With Quote
  #4  
Old 11-30-2011, 09:12 AM
MikeWar MikeWar is offline
Newcomer
 
Join Date: Sep 2003
Location: North England
Posts: 15
Default

DennisW
See EE link above.
imnorie came back with a very good solution and I was able to group all shapes and also group selected shapes.
Reply With Quote
  #5  
Old 11-30-2011, 09:33 AM
DennisW's Avatar
DennisW DennisW is offline
Junior Contributor
 
Join Date: Mar 2006
Location: Östersund, Sweden
Posts: 268
Default

Mike,

Great that it could be resolved
__________________
Kind regards,
Dennis

.NET & Excel | 2nd edition PED | MVP
Reply With Quote
Reply

Tags
.net automation


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes VB net Excel grouping shapes
VB net Excel grouping shapes
VB net Excel grouping shapes
 
VB net Excel grouping shapes
VB net Excel grouping shapes
 
-->