Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Prompting users with a message box on certain cells

I am looking for a macro to do the following:

As soon as a User clicks on cells B18 or B24 or B37

a message box should pop up with my message (I already have the message code)

I just need the code to tell it when a user selects one of the above
mentioned cells

--
thanx
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Prompting users with a message box on certain cells

One easy alternative for the desired functionality is via:
Data Validation Input message tab
The message will display when the cell is selected
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"tommy" wrote:
I am looking for a macro to do the following:

As soon as a User clicks on cells B18 or B24 or B37

a message box should pop up with my message (I already have the message code)

I just need the code to tell it when a user selects one of the above
mentioned cells


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default Prompting users with a message box on certain cells

Hi Tommy
Did you know you can get the same result with DataValidation
goto Input message and type your message. Also you got InsertComment.
Without a Macro
HTH
John

"tommy" .(donotspam) wrote in message
...
I am looking for a macro to do the following:

As soon as a User clicks on cells B18 or B24 or B37

a message box should pop up with my message (I already have the message
code)

I just need the code to tell it when a user selects one of the above
mentioned cells

--
thanx


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Prompting users with a message box on certain cells

To All,
I'm sorry
I forgot to mention that Data Validation is not an option since I am already
using it as a drop down list on the mentioned cells
--
thanx


"Max" wrote:

One easy alternative for the desired functionality is via:
Data Validation Input message tab
The message will display when the cell is selected
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,500 Files:370 Subscribers:66
xdemechanik
---
"tommy" wrote:
I am looking for a macro to do the following:

As soon as a User clicks on cells B18 or B24 or B37

a message box should pop up with my message (I already have the message code)

I just need the code to tell it when a user selects one of the above
mentioned cells


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Prompting users with a message box on certain cells

Sorry,
but I dont want to use Insert Comment or Data Validation

I want the message box to pop up since it forces the user to read and click OK
--
thanx


"John" wrote:

Hi Tommy
Did you know you can get the same result with DataValidation
goto Input message and type your message. Also you got InsertComment.
Without a Macro
HTH
John

"tommy" .(donotspam) wrote in message
...
I am looking for a macro to do the following:

As soon as a User clicks on cells B18 or B24 or B37

a message box should pop up with my message (I already have the message
code)

I just need the code to tell it when a user selects one of the above
mentioned cells

--
thanx





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Prompting users with a message box on certain cells

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const sINPUTS As String = "B18,B24,B37"
If Not Intersect(Target, Me.Range(sINPUTS)) Is Nothing Then
MsgBox "your message"
End If
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that module.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP

On Thu, 29 Jan 2009 16:49:01 -0800, tommy
.(donotspam) wrote:

Sorry,
but I dont want to use Insert Comment or Data Validation

I want the message box to pop up since it forces the user to read and click OK


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Prompting users with a message box on certain cells

thanx, this worked

BUT, I need a total of 31 lines/sentences to complete my message

the last 7 lines are on the same line as the 7 previous lines

how do I extend the message box
--
thanx


"Gord Dibben" wrote:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const sINPUTS As String = "B18,B24,B37"
If Not Intersect(Target, Me.Range(sINPUTS)) Is Nothing Then
MsgBox "your message"
End If
End Sub

Right-click on the sheet tab and "View Code". Copy/paste into that module.

Alt + q to return to the Excel window.


Gord Dibben MS Excel MVP

On Thu, 29 Jan 2009 16:49:01 -0800, tommy
.(donotspam) wrote:

Sorry,
but I dont want to use Insert Comment or Data Validation

I want the message box to pop up since it forces the user to read and click OK



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Prompting users with a message box on certain cells

What happened to....................?

" (I already have the message code) "

I suppose you could add a bunch of linefeeds like

MsgBox "this is the first line of the message" & vbCrLf _
& "this is the second line of the message" & vbCrLf _
& "this is the third line" etc.

Would be far easier to place the message in a textbox on a UserForm which
loads when the correct cell(s) are selected.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const sINPUTS As String = "B18,B24,B37"
If Not Intersect(Target, Me.Range(sINPUTS)) Is Nothing Then
UserForm1.Show
End If
End Sub

Users read the message then hit the close "x" on the UserForm


Gord

On Thu, 29 Jan 2009 18:07:01 -0800, tommy
.(donotspam) wrote:

thanx, this worked

BUT, I need a total of 31 lines/sentences to complete my message

the last 7 lines are on the same line as the 7 previous lines

how do I extend the message box


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
Some users sharing a workbook getting read only message owl37 Excel Discussion (Misc queries) 1 August 4th 06 04:13 PM
"File Is Locked" Error Message (not by other users) DS Excel Discussion (Misc queries) 3 July 18th 06 05:26 PM
Locking cells only for certain users [email protected] Excel Discussion (Misc queries) 1 January 16th 06 03:39 PM
Can anyone recommend a good Forum/Message board for SQL users? shadestreet Excel Discussion (Misc queries) 0 October 5th 05 08:28 PM
Prompting users for data entry in a worksheet MG Excel Discussion (Misc queries) 1 September 7th 05 01:34 PM


All times are GMT +1. The time now is 03:55 AM.

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"