vba msgbox when a cell changes in column

gd1sum8nfg2

New Member
Joined
Aug 30, 2014
Messages
6
Hello,
I am fairly new to VBA. What I am trying to do is have a message box for when a cell is changed in an entire column. So say, for instance, I input "10" in cell (A1), a vbokonly message box pops saying "cell changed". and then if (A2) is changed later on, that message box pops up again. So I am trying to write a code for an entire column, but only effects a single cell at a time. Sorry if I am bad at clarifying. Any help is appreciated, Thank you.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hello,
I am fairly new to VBA. What I am trying to do is have a message box for when a cell is changed in an entire column. So say, for instance, I input "10" in cell (A1), a vbokonly message box pops saying "cell changed". and then if (A2) is changed later on, that message box pops up again. So I am trying to write a code for an entire column, but only effects a single cell at a time. Sorry if I am bad at clarifying. Any help is appreciated, Thank you.
Personally, that sounds like it would be annoying to the user (wouldn't the user already know he/she changed the cell... why would he/she need a message box to tell him/her it just occurred?). Anyway, given you want to do it, what should happen if the user copy/paste multiple values into several cells in the range being monitor... one message box covering all the changes or a message box for each change?
 
Upvote 0
Right click the sheet tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
    MsgBox Target.Address(False, False) & " Changed", vbInformation
End If
End Sub
 
Upvote 0
I understand it is an annoyance. It's for a database, at work. Some of the people using the database don't record some information. This code is going to be for when someone replaces a certain source, a pop up box appears saying something along the lines of "record lot code", that way some people don't forget to do so. In the spreadsheet, there's a column named "Date changed" so if the source wasn't changed, then nothing appears in the cell. If it is changed, the date goes into the cell. So when someone changes a source and inputs the date, that's when I want the message box to pop up saying "record lot code"
 
Upvote 0

Forum statistics

Threads
1,223,460
Messages
6,172,334
Members
452,454
Latest member
MadamRedRabbit

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top