Thread: Macro and Text
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
LDanix LDanix is offline
external usenet poster
 
Posts: 19
Default Macro and Text

Which parts of the code do I need to enter the data from my sheet rather than
what is currently there?

"Bob Phillips" wrote:

An example

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Target.Address = "$F$5" Then
Call myMacro
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


"LDanix" wrote in message
...
Where do I enter all this?

"Lonnie M." wrote:

Hi, you could use procedures like this. It will pass the cell address,
which you could then test and run macros accordingly.

Worksheet_SelectionChange(ByVal Target As Excel.Range, Cancel As
Boolean)
Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As
Boolean)

HTH--Lonnie M.