Excel AfterUpdate...like Access?

B

Bob Barnes

I'm an Access Programmer, using automation to populate Excel data.

From within Access, as part of an AfterUpdate, I have...
where DSupply, GPrev and GDiff are Controls on an Access Form.

Will Excel allow Events on Named Cells ??

TIA - Bob

If Not IsNull(DSupply) Then
'7/2/09 - for meter turnover (Jeff said all meters have min of 4-characters)
If (GDiff < 0 And Abs(GDiff) > 9000) Then
If Len(GPrev) = 4 Then
I = (10000 - GPrev)
ElseIf Len(GPrev) = 5 Then
I = (100000 - GPrev)
ElseIf Len(GPrev) = 6 Then
I = (1000000 - GPrev)
ElseIf Len(GPrev) = 74 Then
I = (10000000 - GPrev)
End If
GDiff = DSupply + I
Else
GDiff = (DSupply - GPrev)
End If
If GDiff < 0 Then
GDiff.BackColor = 255
Else
GDiff.BackColor = 16777215
End If
End If
 
B

Bob Barnes

Thank you.

Within the Worksheet_Change, would that Procedure cover "all possible"
changes in cells? For the Excel file we using, it's "only" 72 cells, but
that's a bunch of coding in a single Event (Worksheet_Change)?

In Access, I'll run "AfterUpdate" on separate Controls (on the Access Form,
there's only 12 Controls for 6 different Day Periods...then those 72 values
are automated into Excel).

Rather than have a simple in Excel...
=IF(LEN(F8)=0,"",F8-E8) in Cell F10, we need to run code similar to the
"AfterUpdate" I had in my initial Post.

Yoour thoughts?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top