Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Activate code in cell

Is it possible to activate code when someone clicks in a cell?

Essentially I need a calendar pop up to come up when I click in particular
cells.

Thanks
--
Steve R
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Activate code in cell

Hello Steve,

maybe this event?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
MsgBox Target.Top
End Sub

But I dont know how to get a calendar...

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 233
Default Activate code in cell

I would use the Worksheet_BeforeDoubleClick.

This way users can enter a date the fast way, and call up your calendar
control

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel
As Boolean)
If Target.Cells.Count = 1 Then
If Target.NumberFormat = "mm/dd/yy" Then 'check for number
format
Show Calendar

Cancel = True
End If
End If
End Sub

Note you could check for a specific number format, but you could also
check for cell validation being date validation. You could also check
for a certain cell address as well.

DM Unseen

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Activate code in cell

Look here Steve
http://www.rondebruin.nl/calendar.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steve" wrote in message ...
Is it possible to activate code when someone clicks in a cell?

Essentially I need a calendar pop up to come up when I click in particular
cells.

Thanks
--
Steve R



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Activate code in cell

Thanks to all, I will try them all out and let you know.
--
Steve R


"Ron de Bruin" wrote:

Look here Steve
http://www.rondebruin.nl/calendar.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steve" wrote in message ...
Is it possible to activate code when someone clicks in a cell?

Essentially I need a calendar pop up to come up when I click in particular
cells.

Thanks
--
Steve R






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Activate code in cell

Works a treat

Thank you very much
--
Steve R


"Ron de Bruin" wrote:

Look here Steve
http://www.rondebruin.nl/calendar.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Steve" wrote in message ...
Is it possible to activate code when someone clicks in a cell?

Essentially I need a calendar pop up to come up when I click in particular
cells.

Thanks
--
Steve R




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
Run Code On Activate Theresa Excel Worksheet Functions 5 December 18th 07 05:47 AM
what is code to activate a combo box in control toolbox Pogo Excel Discussion (Misc queries) 1 July 23rd 06 10:41 AM
How to activate "New" tab in Dataform through VB Code shajueasow Excel Discussion (Misc queries) 2 May 1st 05 01:15 PM
Macro to activate VB Code Larry Excel Programming 8 October 14th 04 09:30 PM
Is it possible to activate a txt document in excel code? Together[_10_] Excel Programming 1 March 4th 04 09:20 AM


All times are GMT +1. The time now is 01:17 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"