473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Help with Excel control with VB.Net

Dan
Hi guys,

I'm trying to automate an excel worksheet through vb.net. So far i've been
able to figure everything out. However, i recently ran into a problem. I can
ungroup of set of objects with no problem. However, i can't figure out how
to regroup them.

Using excel the grouping command would be
ActiveSheet.Shapes.Range(Array("Border", "BackGround", "Price" _
, "Sku", "Name", "Desc",
"Misc", "Picture")).Select
Selection.ShapeRange.Group.Select

in vb.net i tried:

objBook.Sheets("Print").ActiveSheet.Shapes.Range(A rray("Border",
"BackGround", "Price" _

, "Sku", "Name", "Desc", "Misc", "Picture")).Select()
objapp.selection.ShapeRange.Group.Select

it tells me that array cannot be used. I can't figure out how else to select
the multiple objects at once in order to group them.

any help would be appretiated
thanks

Dan
Ba********@hotmail.com
Nov 20 '05 #1
1 2495
try Excel.Array or something like that, ie use the Excel
definition of array rather than the VB.Net version
-----Original Message-----
Hi guys,

I'm trying to automate an excel worksheet through vb.net. So far i've beenable to figure everything out. However, i recently ran into a problem. I canungroup of set of objects with no problem. However, i can't figure out howto regroup them.

Using excel the grouping command would be
ActiveSheet.Shapes.Range(Array ("Border", "BackGround", "Price" _ , "Sk u", "Name", "Desc","Misc", "Picture")).Select
Selection.ShapeRange.Group.Select

in vb.net i tried:

objBook.Sheets("Print").ActiveSheet.Shapes.Range( Array ("Border","BackGround", "Price" _

, "Sku", "Name", "Desc", "Misc", "Picture")).Select()
objapp.selection.ShapeRange.Group.Select

it tells me that array cannot be used. I can't figure out how else to selectthe multiple objects at once in order to group them.

any help would be appretiated
thanks

Dan
Ba********@hotmail.com
.

Nov 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: yyt | last post by:
I am programmatically adding a web user control to a webform. This User Control displays the employee listing from a database into a datagrid. But the calling webform should render the data as a...
1
by: | last post by:
The following code: Private Sub ClearControls(ByVal ctrl As Control) Dim i As Int32 For i = ctrl.Controls.Count - 1 To 0 Step -1 ClearControls(ctrl.Controls(i))
22
by: Howard Kaikow | last post by:
There's a significant problem in automating Excel from VB .NET. Reminds me of a problem I encountered almost 3 years ago that was caused by the Norton Auntie Virus Office plug-in. Can anybody...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
1
by: hakeemkazmi | last post by:
hi there,i am able to export the gridview data to excel sheet successfully but my gridview has 3 buttonfields like details etc etc which when clicked give the details,but i dont want those...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.