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: 39
Default Undismissible Alert

Hello,

Basically I want the following to happen:
Whenever a user changes some value(kinda focus change?), macro will
check for the validality of the entry. In case of an invalid one, it
clears the bad content and fires an alert, waiting for a new input from
the user.

here's the code I use:
==========================================
Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit
'Find the "blank Row"
Dim textRow As Integer
textRow = Range("Blank_row").Row - 1
Application.EnableEvents = False
''check for invalid Pool nomination entries
If (Target.Column = 3 Or Target.Column = 9) And Target.Row 25 And
Target.Row <= textRow And Target.Value = "Pool" And Range("F10").Value
< "Pooling" Then GoTo wrongPoolEntry

wrongPoolEntry:
MsgBox "Invalid entry. Select 'Pooling' as Transaction Type to
proceed.", vbExclamation
Target.ClearContents
Target.Select
Exit Sub
End Sub
==================================

Mainly two undesirable phenomena:
1. Whatever changes to the existing value regardless of valid or
invalid ones, the alert is fired. This should not happen as this should
only if the new value is "Pool" which is taken as invalid whilst the
other cell(F10) is not "Pooling"
2. The alert is undismissible. It comes back immediately everytime when
the OK button is clicked. So nothing else can be done.

What causes the abnormity? Any solution ideas?

Thanks in advance and regards
Frank

 
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
alert nader Excel Worksheet Functions 4 December 15th 08 04:14 PM
alert Brian Excel Discussion (Misc queries) 0 December 21st 06 06:52 PM
Pop-up Alert Help Thomas Excel Programming 2 September 20th 05 01:27 AM
alert Paula[_4_] Excel Programming 2 July 5th 05 09:57 PM
alert Chad Excel Programming 0 April 22nd 05 04:17 PM


All times are GMT +1. The time now is 07:38 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"