ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro for cell showing exact value (https://www.excelbanter.com/excel-programming/434870-macro-cell-showing-exact-value.html)

vijay[_3_]

Macro for cell showing exact value
 
Hi,

Can anyone help me on this.
I want a message box poping up with message saying as "Do you want to close
the Batch" whenever there is value 50 in the cell "D2"

Please do help me with a macro on the same

vijay

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...el.programming

Ken

Macro for cell showing exact value
 
vijay

Put this code in the worksheet object:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Range("d2").Value = 50 Then MsgBox "Dow you want to close the
Batch?"

End Sub


I suspect you will want to do more eventually, but, this should
accomplish what you have asked so far.

Good luck


Ken
Norfolk, Va

On Oct 12, 1:22*pm, vijay wrote:
Hi,

Can anyone help me on this.
I want a message box poping up with message saying as "Do you want to close
the Batch" whenever there is value 50 in the cell "D2"

Please do help me with a macro on the same

vijay

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm....mspx?mid=4f66....



Otto Moehrbach[_2_]

Macro for cell showing exact value
 
A slight mod to provide a Yes/No. Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("d2").Value = 50 Then _
MsgBox "Do you want to close the Batch?", 4, "Close?"
End Sub
"Ken" wrote in message
...
vijay

Put this code in the worksheet object:

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Range("d2").Value = 50 Then MsgBox "Dow you want to close the
Batch?"

End Sub


I suspect you will want to do more eventually, but, this should
accomplish what you have asked so far.

Good luck


Ken
Norfolk, Va

On Oct 12, 1:22 pm, vijay wrote:
Hi,

Can anyone help me on this.
I want a message box poping up with message saying as "Do you want to
close
the Batch" whenever there is value 50 in the cell "D2"

Please do help me with a macro on the same

vijay

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm....mspx?mid=4f66...





All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com