Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default defining an event procedure (lostfocus) that works on a column range

I am trying to write an event procedure that works for an
entire column (lostfocus).

private sub a_LostFocus() works when I run the program
but not generally in excel
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default defining an event procedure (lostfocus) that works on a column range

juhlott,

You could use the selection change event, along the lines of this, to show
when at least one cell in column A is not selected:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Range("A:A"), Target) Is Nothing Then Exit Sub
MsgBox "You haven't selected a cell in column A"
End Sub

HTH,
Bernie
MS Excel MVP

"juhlott" wrote in message
...
I am trying to write an event procedure that works for an
entire column (lostfocus).

private sub a_LostFocus() works when I run the program
but not generally in excel



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
Defining Named Range for Lastrow in a specific column Barb Reinhardt Excel Discussion (Misc queries) 5 May 9th 07 08:55 PM
workbook_Open event Procedure peerless Excel Discussion (Misc queries) 1 May 22nd 06 10:21 PM
workbook_Open event Procedure peerless Excel Discussion (Misc queries) 0 May 22nd 06 10:16 PM
Same event procedure for multiple controls Mikhail Excel Programming 1 October 13th 03 03:23 PM
OnTime event not firing in Workbook_Open event procedure GingerTommy Excel Programming 0 September 24th 03 03:18 PM


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