ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA pop-up message (https://www.excelbanter.com/excel-programming/389775-vba-pop-up-message.html)

NANGO

VBA pop-up message
 
I'd like to have a pop-up message that says "Did you remember to mark-up your
quote?", and if they have they click "Yes" and can move on, and if not "No"
forces them to stay on that tab.

There are 8 total tabs, and I simply need it when the go from the tab labled
"Pricing" to any of the other 7 tabs..

Any idea how I might accomplish this?

I'm not finding any information on how to do this, just information that
says you can enter pop-up messages.

Any help would be greatly appreciated!



AKphidelt

VBA pop-up message
 
Hey Nango, it's me again, lol. Try something like this
This one could get a little complicated... first off
Go to Tools--- Macro--- Visual Basic Editor

To the left you'll see a project explorer, if not select View---Project
Explorer
Then find your workbook, double click on the Sheet "Pricing"

A module will pop up, and the top left corner will have a drop down box that
says "(General)". Change this to worksheet.

You should see this pop up

Private Sub Worksheet_SelectionChange(ByVal Target As Range)


End Sub

In the top right corner, select from the drop down list "Deactivate"

So now you'll see this

Private Sub Worksheet_Deactivate()

End Sub

In between those lines... enter the code

Response = MsgBox("Did you remember to mark-up your quote?", vbYesNo)

If Response = vbYes Then GoTo GoodToGo

Sheets("Pricing").Activate

GoodToGo:
End Sub

"NANGO" wrote:

I'd like to have a pop-up message that says "Did you remember to mark-up your
quote?", and if they have they click "Yes" and can move on, and if not "No"
forces them to stay on that tab.

There are 8 total tabs, and I simply need it when the go from the tab labled
"Pricing" to any of the other 7 tabs..

Any idea how I might accomplish this?

I'm not finding any information on how to do this, just information that
says you can enter pop-up messages.

Any help would be greatly appreciated!



NANGO

VBA pop-up message
 
Thank you so much, those were wonderful directions!

"AKphidelt" wrote:

Hey Nango, it's me again, lol. Try something like this
This one could get a little complicated... first off
Go to Tools--- Macro--- Visual Basic Editor

To the left you'll see a project explorer, if not select View---Project
Explorer
Then find your workbook, double click on the Sheet "Pricing"

A module will pop up, and the top left corner will have a drop down box that
says "(General)". Change this to worksheet.

You should see this pop up

Private Sub Worksheet_SelectionChange(ByVal Target As Range)


End Sub

In the top right corner, select from the drop down list "Deactivate"

So now you'll see this

Private Sub Worksheet_Deactivate()

End Sub

In between those lines... enter the code

Response = MsgBox("Did you remember to mark-up your quote?", vbYesNo)

If Response = vbYes Then GoTo GoodToGo

Sheets("Pricing").Activate

GoodToGo:
End Sub

"NANGO" wrote:

I'd like to have a pop-up message that says "Did you remember to mark-up your
quote?", and if they have they click "Yes" and can move on, and if not "No"
forces them to stay on that tab.

There are 8 total tabs, and I simply need it when the go from the tab labled
"Pricing" to any of the other 7 tabs..

Any idea how I might accomplish this?

I'm not finding any information on how to do this, just information that
says you can enter pop-up messages.

Any help would be greatly appreciated!




All times are GMT +1. The time now is 07:17 PM.

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