Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto message box


Hi

I am trying to make a message box appear automatically based on
conditions, so basically if cell range G8 has a value in it then chec
cell J8 if J8 is blank then the message box pops up and keeps poping u
till a value is entered. But if G8 is empty then nothing happens.

Little help?

Thank

--
Vlad99
-----------------------------------------------------------------------
Vlad999's Profile: http://www.excelforum.com/member.php...fo&userid=3358
View this thread: http://www.excelforum.com/showthread.php?threadid=54977

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Auto message box

hi,
here is code that will do that. but without a better understanding of what
you are doing, i am not sure which event would be best. here i used the sheet
change event.
you may wish to conside the before save event or the before close event and
set cancel to true . that way the user will not be able save or close the
file untill your criteria is met.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Range("G8").Value = "" Then
Exit Sub
Else
If Range("G8").Value < "" And _
Range("J8").Value = "" Then
MsgBox ("this is a message")
End If
End If
End Sub

regards
FSt1
"Vlad999" wrote:


Hi

I am trying to make a message box appear automatically based on 2
conditions, so basically if cell range G8 has a value in it then check
cell J8 if J8 is blank then the message box pops up and keeps poping up
till a value is entered. But if G8 is empty then nothing happens.

Little help?

Thanks


--
Vlad999
------------------------------------------------------------------------
Vlad999's Profile: http://www.excelforum.com/member.php...o&userid=33586
View this thread: http://www.excelforum.com/showthread...hreadid=549771


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto message box


sorry

well basically its a time sheet for employees to punch in and out wha
i want is for them they punch out at the end of the day for the macr
to check J8 to see if they have entered what they have worked o
today.

I used G8 because thats where their log out time goes what i was hopin
for was a macro that would check G8 (on exit or something) and check J
and if there was a value in G8 but not J8 then the message comes up t
remind them to enter what they did

--
Vlad99
-----------------------------------------------------------------------
Vlad999's Profile: http://www.excelforum.com/member.php...fo&userid=3358
View this thread: http://www.excelforum.com/showthread.php?threadid=54977

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
Auto answer message box csdjj Excel Discussion (Misc queries) 3 August 5th 09 06:33 PM
Macro for pop up message box for auto-filter entry Roady Excel Discussion (Misc queries) 1 January 20th 09 06:26 PM
auto open message pcor New Users to Excel 8 September 19th 07 01:25 PM
Auto e-mail message Freshman Excel Worksheet Functions 1 October 31st 06 07:24 PM
message/dialog box auto open when excel file is activated welshwizzard Excel Discussion (Misc queries) 2 January 21st 05 10:05 PM


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