Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default [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
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
Help displaying "Maximum" or "Minimum" if cell is max or min in a group? RussAllison Excel Discussion (Misc queries) 1 February 24th 11 02:22 AM
How do i enable "Group" & "Ungroup" in a protected sheet ruddojo Excel Discussion (Misc queries) 0 June 2nd 06 01:01 AM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM
Pivot table "Group and Show Details" vs. "SubTotals" pgchop Excel Programming 0 February 1st 06 07:29 AM
Getting "compile error" "method or data member not found" on reinstall Bp Excel Programming 1 April 23rd 04 04:42 PM


All times are GMT +1. The time now is 09:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"