English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How to create group and ungroup functionality in active sheet of excel 2000 using VBA?

2006-08-22 02:31:34 · 2 answers · asked by padam_india 1 in Computers & Internet Programming & Design

2 answers

Cheaters way out... Start recording a macro and perform the steps to both group and ungroup your spreadsheet. Stop recording and review the code of the macro and that should answer your question. I use this frequently to figure out how to code functions that I am not familiar on how to code it.

2006-08-22 03:53:12 · answer #1 · answered by Houston Computer Guru 4 · 1 0

The Shaperange object gives you the ability to make groups and ungroup them
- you need first to know the name of each object, click it and wacth the name appears in the name box in the left side of formula bar.
- now, you need to select them, (Or make an array of objects), using
activesheet. shapes.range( Array( Object1 name, object2 name, etc)). shaperange. group
will create an array for them and make them as group
Notice the spaces, I had to put spaces for you to read.
- now then new group will have a name (you can know the name in the name box again)
- using the ungroup method for it will just ungroup it, using
activesheet. Shapes(groupname).ungroup

good luck

XLMan

2006-08-25 21:23:14 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers