Solved

View Messagebox in Excel

Posted on 2003-11-10
3
200 Views
Last Modified: 2010-05-03
I have an Excel workbook that has several worksheets.  I would like to have a Textbox of some sort pop up and alert the user that they need to review the information that is typed on that spreadsheet.


So basically, my question is: how do I get a popup box to pop up when the user click on a particular worksheet's tab.  I'm new to VB so please bear with me.

Thanks in advance for your help!!!
Sean
0
Comment
Question by:eeboater
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
mgroyal earned 90 total points
ID: 9718972
Just open the vb-editor in excel and put this code in it...

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    MsgBox ("this is my message")
End Sub

Cheers *mg
0
 

Author Comment

by:eeboater
ID: 9723610
That worked great!!  Just curious, that message box appeared when all the worksheets were selected.  How can I tweak that code so that it only appears when one particular worksheet is selected.

For example, i have 4 tabs, names, addresses, phones and dates.  I want the message to appear when I select the Addresses tab/worksheet. And not have the message appear when all other tabs/worksheets are selected.

Thanks again!!!
Sean
0
 

Author Comment

by:eeboater
ID: 9723740
I figured it out, I just put an IF statement identifying the worksheet.  If the proper worksheet is there, then it displays the message.

Thanks,
Sean
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question