Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-12-2012, 02:32 AM
gsrikanth gsrikanth is offline macro not working (on click increment) Windows XP macro not working (on click increment) Office XP
Competent Performer
macro not working (on click increment)
 
Join Date: Dec 2011
Posts: 133
gsrikanth is on a distinguished road
Default macro not working (on click increment)


Code:
Option Explicit
  Public ClickCount As Double
  Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If Target.Cells.Count > 1 Then Exit Sub
  ClickCount = ClickCount + 1
 Target.Value = ClickCount
  End Sub
Reply With Quote
  #2  
Old 07-12-2012, 07:40 AM
Colin Legg's Avatar
Colin Legg Colin Legg is offline macro not working (on click increment) Windows 7 32bit macro not working (on click increment) Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

It works for me. You must make sure that the macro sits in a worksheet class module and that Application.EnableEvents is set to True.
__________________
Colin

RAD Excel Blog
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
macro not working (on click increment) "On Click" for a picture effect not working jhuth PowerPoint 3 05-07-2012 10:20 AM
macro not working (on click increment) on click increment gsrikanth Excel Programming 1 02-23-2012 08:19 AM
“Click & drag ” stopped working nicola65 Outlook 0 12-04-2011 06:35 PM
Word doc bug when closing from userform command button click macro Joe Patrick Word 1 07-05-2011 08:53 PM
macro not working (on click increment) Right click in Macro MShroff Word VBA 4 04-05-2011 09:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:00 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft