PC Review


Reply
Thread Tools Rate Thread

determine if sheet contains mergearea(s)

 
 
=?Utf-8?B?ZGs=?=
Guest
Posts: n/a
 
      6th Oct 2006
Is there any way to determine if a sheet contains mergearea(s) without
checking individual cells for MergedCell?

tia,
dk
 
Reply With Quote
 
 
 
 
Peter T
Guest
Posts: n/a
 
      6th Oct 2006
Sub test()
Dim bGotMergedCells As Boolean
Dim vMerged As Variant

vMerged = ActiveSheet.Cells.MergeCells
bGotMergedCells = IsNull(vMerged) Or vMerged

MsgBox bGotMergedCells
End Sub

Regards,
Peter T

"dk" <(E-Mail Removed)> wrote in message
news:E21BB721-9CB0-4D56-B3C6-(E-Mail Removed)...
> Is there any way to determine if a sheet contains mergearea(s) without
> checking individual cells for MergedCell?
>
> tia,
> dk



 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      6th Oct 2006
If cells.MergeCells = Null then
' contains merged cells
elseif cell.MergeCells = True then
' whole sheet is one big merged cell
elseif cell.MergeCells = False
' no merged cells
End if



--
Regards,
Tom Ogilvy


"dk" wrote:

> Is there any way to determine if a sheet contains mergearea(s) without
> checking individual cells for MergedCell?
>
> tia,
> dk

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      6th Oct 2006
that first line should be

if isNull(cells.MergeCells) then

--
Regards,
Tom Ogilvy


"dk" wrote:

> Is there any way to determine if a sheet contains mergearea(s) without
> checking individual cells for MergedCell?
>
> tia,
> dk

 
Reply With Quote
 
=?Utf-8?B?ZGs=?=
Guest
Posts: n/a
 
      6th Oct 2006
Thanks

"Tom Ogilvy" wrote:

> that first line should be
>
> if isNull(cells.MergeCells) then
>
> --
> Regards,
> Tom Ogilvy
>
>
> "dk" wrote:
>
> > Is there any way to determine if a sheet contains mergearea(s) without
> > checking individual cells for MergedCell?
> >
> > tia,
> > dk

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine if a sheet is protected? Robert Crandal Microsoft Excel Programming 4 19th Jan 2010 12:55 AM
Line count in 1 sheet to determine paste range in 2nd sheet. wpreqq99@yahoo.com Microsoft Excel Programming 0 26th Sep 2008 07:43 PM
Determine if the sheet has been changed Erik Wikström Microsoft Excel Programming 2 12th Dec 2007 03:00 PM
Undefined MergeArea when MergeCells is true =?Utf-8?B?YnN0b2JhcnQ=?= Microsoft Excel Programming 1 14th Sep 2007 04:57 PM
Determine sheet dimensions Fritz Hilgemann Microsoft Excel Programming 7 3rd Jun 2007 09:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:52 PM.