How to have a message pop up?

MOB

Well-known Member
Joined
Oct 18, 2005
Messages
1,055
Office Version
  1. 365
Platform
  1. Windows
Hi

I want to achieve the following with VB;

- whenever an amount is typed into a cell in column D, a message box should appear saying "please ensure totals agree before saving"
- user just clicks ok, nothing else has to happen

Bear in mind I'm a novice with VB.............................

Thanks
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi,

Right click on the worksheet tab, select view code and paste this:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns("D")) Is Nothing Then _
    MsgBox ("Please ensure totals agree before saving!")
End Sub

Hope it helps,

Dom
 
Upvote 0
Hi

I want to achieve the following with VB;

- whenever an amount is typed into a cell in column D, a message box should appear saying "please ensure totals agree before saving"
- user just clicks ok, nothing else has to happen

Bear in mind I'm a novice with VB.............................

Thanks
Hi,

OK, you are a novice. Do you want to become better :)
Could you define what this means
totals agree
then you could make Excel check that

kind regards,
Erik
 
Upvote 0
Hi Eric

I thought about doing something to ensure the totals agree, but I really just wanted a message to remind the user to check it - its a pretty simple spreadsheet (and a temporary one) that I dont want to put much effort into.

Thanks
 
Upvote 0
You don't need VB. Setting Validation to the formula =FALSE will cause a (information style) warning message appear everytime something in entered in the cells.
 
Upvote 0
- whenever an amount is typed into a cell in column D, a message box should appear saying "please ensure totals agree before saving"
- user just clicks ok, nothing else has to happen...

You really want to irritate people don't you? I'm with Erik on finding a way to gt Excel to check for you, 'cause I'd probably throttle you if you bugged me with a message every time I entered data.

EDIT: not meaning to sound aggravated or grumpy though. ;)

Heya Erik!
 
Last edited:
Upvote 0
Hi, Smitty,

Calm down, it's just a temporary project ;)

Only purpose of this reply was in fact to say
HELLO, SMITTY :)
 
Upvote 0
You don't need VB. Setting Validation to the formula =FALSE will cause a (information style) warning message appear everytime something in entered in the cells.

At least with the VB the user can choose not to enable the macros and avoid it ;)
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

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