#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mr. G.
 
Posts: n/a
Default msg box


I've created an expense report that displays a yes/no message box when the
User reports auto rental expenses. The first msg box inquires if they held
the rental over the weekend". If the user selects "Yes" a second box
requests the User provide additional information in a designated area of the
spreadsheet.

If Intersect(Target(1), Me.Range("Y53:BN53")) Is Nothing Then Exit Sub

If Target(1).Value 125 And Target(1).Value < 250 Then
If MsgBox("Was vehicle held over the weekend?", _
vbYesNo) = vbYes Then
MsgBox "Please give reason with approving Manager's name"
Sheets("EXP RPT").Unprotect ("lindAP")
Range("Y317").Select
Sheets("EXP RPT").Unprotect ("lindAP")
ActiveCell.FormulaR1C1 = "X"
Range("Y53").Activate
Sheets("EXP RPT").Unprotect ("lindAP")

End If
End If
If Intersect(Target(1), Me.Range("Y53:BN53")) Is Nothing Then Exit Sub
If Target(1).Value = 250 Then
If MsgBox("Was vehicle held over the weekend?", _
vbYesNo) = vbYes Then
MsgBox "Please give reason with approving Manager's name"
Sheets("EXP RPT").Unprotect ("lindAP")
Range("Y317").Select
Sheets("EXP RPT").Unprotect ("lindAP")
ActiveCell.FormulaR1C1 = "X"
Range("Y53").Activate
Sheets("EXP RPT").Unprotect ("lindAP")
End If
End If
End Sub

Unfortunately, many of my users often don't comply thus forcing me to spend
extra time following-up. Is it possible to customize the second box so that
it requires the User to input the necessary information (possibly in another
pop-up box) before they can move on? Moreover, can their information be
automatically copied to area that was originally intended for their
explanation.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default msg box

Put it within a loop

Do
ans = MsgBox ("Please give reason with approving Manager's name")
if ans = "" Then MsgBox "I need an answer"
Loop until ans < ""

ans will then hold that respnse


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Mr. G." wrote in message
...

I've created an expense report that displays a yes/no message box when the
User reports auto rental expenses. The first msg box inquires if they

held
the rental over the weekend". If the user selects "Yes" a second box
requests the User provide additional information in a designated area of

the
spreadsheet.

If Intersect(Target(1), Me.Range("Y53:BN53")) Is Nothing Then Exit Sub

If Target(1).Value 125 And Target(1).Value < 250 Then
If MsgBox("Was vehicle held over the weekend?", _
vbYesNo) = vbYes Then
MsgBox "Please give reason with approving Manager's name"
Sheets("EXP RPT").Unprotect ("lindAP")
Range("Y317").Select
Sheets("EXP RPT").Unprotect ("lindAP")
ActiveCell.FormulaR1C1 = "X"
Range("Y53").Activate
Sheets("EXP RPT").Unprotect ("lindAP")

End If
End If
If Intersect(Target(1), Me.Range("Y53:BN53")) Is Nothing Then Exit

Sub
If Target(1).Value = 250 Then
If MsgBox("Was vehicle held over the weekend?", _
vbYesNo) = vbYes Then
MsgBox "Please give reason with approving Manager's name"
Sheets("EXP RPT").Unprotect ("lindAP")
Range("Y317").Select
Sheets("EXP RPT").Unprotect ("lindAP")
ActiveCell.FormulaR1C1 = "X"
Range("Y53").Activate
Sheets("EXP RPT").Unprotect ("lindAP")
End If
End If
End Sub

Unfortunately, many of my users often don't comply thus forcing me to

spend
extra time following-up. Is it possible to customize the second box so

that
it requires the User to input the necessary information (possibly in

another
pop-up box) before they can move on? Moreover, can their information be
automatically copied to area that was originally intended for their
explanation.




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



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