Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Macro: automatically initiating upon cell click

Hi - a newbie question:
I have a calendar macro which I want to kick off when a cell in the date
column on my worksheet is selected.

How do I do this, so the user of the sheet won't need to do anything more
than click on the cell, and then select the date from the popup?

Many, many thanks!
Ted
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Macro: automatically initiating upon cell click

This uses column E:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Columns("E")) Is Nothing Then
Exit Sub
End If
Application.EnableEvents = False
MsgBox ("Hello")
Application.EnableEvents = True
End Sub

Paste the sub into worksheet code. When you click on any cell in column E
the macro will fire. Adapt as you like.

REMEMBER: Worksheet code.
--
Gary's Student


"pmp613" wrote:

Hi - a newbie question:
I have a calendar macro which I want to kick off when a cell in the date
column on my worksheet is selected.

How do I do this, so the user of the sheet won't need to do anything more
than click on the cell, and then select the date from the popup?

Many, many thanks!
Ted

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
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Protect Workbook vs Worksheet?? Dan B Excel Worksheet Functions 3 November 7th 05 09:02 PM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 06:09 AM.

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

About Us

"It's about Microsoft Excel"