LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 852
Default Change_Event troubles, no error & no work.

I want to house two different change events in this macro.

The second one at the bottom seems to be okay.
It's the AW6:AW100 range I can't seem to figure out.

The "For Each c In AWrng" code works in a conventional macro but I need it to
run on a change within the range specified.

The values in column AW are an external download of dollar amounts, so paste special is not needed, and run from a conventional macro they transfer okay.

Looking for c not blank and c is greater than 0. The greater than 0 is the key here inasmuch as if the value is (1.00), by accounting formatting, then do not transfer the negative value, but it can change on its own to greater than 0 and that's when I need it to fire.

What I have does nothing so I am wondering if I have the wrong wording in the

"If Not Intersect(Target, Range("AW6:AW100")) Is Nothing _
Or Target.Cells.count 1 Then Exit Sub"

statement. I've tried it without the "Not" also, and no go. Also without the "cells.count 1"

Are both sets of the .Enable events FALSE/TRUE necessary?

Thanks.
Howard


Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
With Target
If Not Intersect(Target, Range("AW6:AW100")) Is Nothing _
Or Target.Cells.count 1 Then Exit Sub

For Each c In AWrng
If c.Offset(, -3) = "" Then
If c 0 Then
c.Offset(, -3) = c
End If
End If
Next
End With
Application.EnableEvents = True

Application.EnableEvents = False
With Target
If Not Intersect(Target, Range("BI48:BJ65")) Is Nothing Then
Cells(.Row, 46) = Cells(.Row, 49)
End If
End With
Application.EnableEvents = True
End Sub
 
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
No response to change_event Howard Excel Programming 4 October 26th 13 11:25 AM
OnTime Change_Event macro AND copy to sheet2 macro trouble Howard Excel Programming 7 June 3rd 13 01:59 PM
Combobox Change_Event JimRWR Excel Programming 10 April 23rd 07 08:58 PM
IF troubles JG Excel Worksheet Functions 6 December 24th 06 04:58 AM
Change_Event Hawk Excel Programming 4 October 16th 03 04:06 PM


All times are GMT +1. The time now is 08:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"