View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Is there a step by step procedure on macros?

The Worksheet_Change event doesn't belong in the ThisWorkbook module.

Worksheet_Change belongs behind the worksheet that's getting the change.

There is a Workbook_SheetChange event, though. (But I bet you're looking at one
sheet. So I bet this doesn't apply in your case.)

Bill wrote:

This is the macro and it is in the this workbook module
Private Sub Worksheet_Change(ByVal Target As Range)
If Target(1, 1).Address = "$C$5" Then
With Worksheets("LogSheet")
.Cells(.Rows.Count, 1).End(xlUp)(2, 1).Value = Target(1, 1).Value
End With
End If
End Sub

"Dave Peterson" wrote:

Go into the VBE and click inside the procedure.
Hit F8 to step through the code.

If this doesn't help, you may want to post the code (like Toppers suggested) and
post more details--where is the code located, how you start the macro.

And make sure you've enabled macros when you opened the workbook.

Bill wrote:

I have a amcro and cannot get it to run, I have come to the conclusion that I
must be doing something basic wrong. Our company tech. support cannot see
anything wrong, so it must be something overlooked.


--

Dave Peterson


--

Dave Peterson