Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
[VBA] pb with "group" method
Hi everyone, I'm trying to developp a VBA code which will group a range of columns together "dynamically", but I have a pb ! Here the code : Code: -------------------- Sub Group(iNumSheet, iColumnsDeb) For IColumns = iColumnsDeb To iColumnsDeb + 200 If xlapp.ActiveWorkbook.Sheets(iNumSheet).Cells(7, IColumns).Font.Bold = True And xlapp.ActiveWorkbook.Sheets(iNumSheet).Cells(7, IColumns).Font.Italic = True Then xlapp.ActiveWorkbook.Sheets(iNumSheet).Range(Cells (7, iColumnsDeb), Cells(7, IColumns - 1)).Columns.Group End If Next End Sub -------------------- I try to execute once, it's working, yeah ! But a seconde time does not work : I have this pb : "The cells method of the object '_globals' failed". Do you have any idea of what's goin' on ? Thank you PS : sorry for my english (I'm French !) -- argv ------------------------------------------------------------------------ argv's Profile: http://www.excelforum.com/member.php...o&userid=37099 View this thread: http://www.excelforum.com/showthread...hreadid=568269 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? | Excel Discussion (Misc queries) | |||
How do i enable "Group" & "Ungroup" in a protected sheet | Excel Discussion (Misc queries) | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
Pivot table "Group and Show Details" vs. "SubTotals" | Excel Programming | |||
Getting "compile error" "method or data member not found" on reinstall | Excel Programming |