LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 211
Default PRESENTING MSGBOX ONCE ONLY

In the following code when the TST(Rng) function is applied upon four cells
simply (i.e. by Ctrl+Enter), while Rng selected for the same being cells not
equal to 4 in number, results into reappearing of a msgbox 4 times, unless
the function is applied as an array formula.

How to have the same presenting the message:

"Activecells' and the Selection's ranges should be of the Exactly Same Size."

be presented only once and TST returning a zero?

Function TST(Rng As Range)
Dim AR As Range
Set AR = Selection
If AR.Cells.Count < Rng.Cells.Count Then
MsgBox "Activecells' and the Selection's ranges" & vbNewLine & _
" should be of the Exactly Same Size."
Exit Function
Else
TST = "OK"
End If
End Function

--
Thanx in advance,
Best Regards,

Faraz
 
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
Presenting Excel charts kippers Excel Discussion (Misc queries) 1 April 8th 09 02:03 PM
Help with presenting data in å chart norway Charts and Charting in Excel 1 August 15th 07 09:04 PM
Presenting two percentages Omar Excel Discussion (Misc queries) 2 August 2nd 07 04:58 AM
Presenting Subtotals only Tom Excel Discussion (Misc queries) 2 April 12th 06 01:46 PM
Determining and presenting unique entries? [email protected] Excel Programming 3 December 7th 04 03:40 PM


All times are GMT +1. The time now is 12:00 AM.

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

About Us

"It's about Microsoft Excel"