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
Solved

View Messagebox in Excel

Posted on 2003-11-10
3
197 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
  • 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

861 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