Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Excel msgbox when cell range is clicked

I want to have a msgbox appear when any cell in the workbook is selected.
How is this done.
--
Thanks,
Chad
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Excel msgbox when cell range is clicked

Hi,

Di you really mean any cell!! If you do then right click your worksheet,
view code and paste this in.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox "You just clicked " & Target.Address
End Sub

Or for when you click in a certain range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
MsgBox "You just clicked " & Target.Address
End If
End Sub

Mike

"SoggyCashew" wrote:

I want to have a msgbox appear when any cell in the workbook is selected.
How is this done.
--
Thanks,
Chad

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Excel msgbox when cell range is clicked

Seems rather annoying to me but add this code to Thisworkbook module.

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
ByVal Target As Range)
MsgBox "annoying message"
End Sub


Gord Dibben MS Excel MVP

On Thu, 6 Nov 2008 01:07:00 -0800, SoggyCashew
wrote:

I want to have a msgbox appear when any cell in the workbook is selected.
How is this done.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I pop up a picture when a cell is clicked on Excel? Hamlet Excel Discussion (Misc queries) 2 August 29th 08 08:16 PM
How can I detect that an excel cell has been clicked Ballantine Excel Discussion (Misc queries) 5 August 14th 08 10:09 AM
HOW DO I GET AN X IN A CELL IN EXCEL TO COME & GO WHEN CLICKED carbetboy Excel Discussion (Misc queries) 3 March 22nd 08 11:21 PM
Right clicked range highlights in Excel would add the "$" to func ebeiss Excel Worksheet Functions 0 July 24th 06 07:20 PM
Can I format a cell to fill red when clicked with mouse (Excel)? mike.wilson Excel Worksheet Functions 4 May 2nd 05 08:01 AM


All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"