Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell inspection
Hi, Im trying to drop into some VBA code but only if a specific cell i selected. I am placing the call on the sheet change event. I a assuming this is the correct way to do it. The pseudocode would be as follows: If cell x is selected then event endif How is this done in VBA for EXCEL? I am experienced in VBA for ACCESS but ECXEL is going to be a stee learning curve! Thanks everyone! :confused -- underhil ----------------------------------------------------------------------- underhill's Profile: http://www.excelforum.com/member.php...nfo&userid=478 View this thread: http://www.excelforum.com/showthread.php?threadid=27408 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cell inspection
Right-click the sheet tab and select View Code
Drop this code in: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Not Intersect(Target, Range("B4")) Is Nothing And Target.Cells.Count = 1 Then MsgBox "event code" End If End Sub The code ensures the cell count of the selection is just 1 cell (Target.Cells.Count = 1) It ensures the selection is at address B4 -- Rob van Gelder - http://www.vangelder.co.nz/excel "underhill" wrote in message ... Hi, Im trying to drop into some VBA code but only if a specific cell is selected. I am placing the call on the sheet change event. I am assuming this is the correct way to do it. The pseudocode would be as follows: If cell x is selected then event endif How is this done in VBA for EXCEL? I am experienced in VBA for ACCESS but ECXEL is going to be a steep learning curve! Thanks everyone! -- underhill ------------------------------------------------------------------------ underhill's Profile: http://www.excelforum.com/member.php...fo&userid=4786 View this thread: http://www.excelforum.com/showthread...hreadid=274084 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inspection report templates | Excel Worksheet Functions | |||
How do I build a Home Inspection form in Excel? | New Users to Excel | |||
Re-occuring Inspection Dates | Excel Worksheet Functions | |||
Final House Walkthrough inspection in Excel would be nice | Setting up and Configuration of Excel |