LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Macro message box.

Hi, i have this macro:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Sh.Name < "SEARCH" And Sh.Name < "PLANNING" Then
If Not Application.Intersect(Target, Range("B5:B120")) Is Nothing Then
If Trim(Target.Text) < "" Then
Application.EnableEvents = False
If WorksheetFunction.CountIf(Worksheets("PLANNING").R ange("J4:J10"), _
Split(Target.Value)(0)) 0 Then
MsgBox "NO COLABORATION", vbExclamation, ""
Range("C" & Target.Row).Activate
End If
Application.EnableEvents = True
End If
End If
End If
End Sub

I need to extract "NO COLABORATION" from range K4:K10. I don't want to have
"NO COLABORATION" in macro. i need to transform this:
MsgBox "NO COLABORATION", vbExclamation, ""
into something like this:
MsgBoxFunction.CountIf (Worksheets("PLANNING").Range("K4:K10")), _

Can this be done?
Thanks!
 
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
A macro disabled message comes up but there is no macro. lovetocount Excel Discussion (Misc queries) 2 June 25th 08 12:54 PM
Macro message Lesley Charts and Charting in Excel 0 February 27th 07 12:54 PM
Message Box Macro Heather O'Malley Excel Discussion (Misc queries) 3 August 22nd 06 09:13 AM
Message box macro Heather O'Malley Excel Discussion (Misc queries) 3 July 21st 06 12:43 PM
Macro message box ynissel Excel Discussion (Misc queries) 7 July 18th 05 06:50 PM


All times are GMT +1. The time now is 01:27 PM.

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"