LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
gig gig is offline
external usenet poster
 
Posts: 9
Default Cell change event

I keep getting an error message when range("attn") is changed. If I
delete the vlookup formula line and put something like msgbox "hello"
it will work fine. But what puzzles me is that the same vlookup line
formula works in another program with no problems. Can anyone tell me
what I'm doing wrong?

Thanks,
Greg


Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Dim company As Range
Dim database As Range
Dim attn As Range

If Target.Address = Range("attn").Address Then

Range("company") = Application.WorksheetFunction.VLookup(Range("attn" ),
Range("database"), 2, False)
End If

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
cell change event gvm Excel Worksheet Functions 3 September 20th 05 04:50 AM
cell value change event alinasir Excel Worksheet Functions 1 August 30th 05 10:57 AM
CELL CHANGE EVENT Dan Excel Programming 3 March 3rd 05 10:07 AM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM
Cell Change Event Graham[_6_] Excel Programming 8 February 26th 04 04:27 PM


All times are GMT +1. The time now is 03:22 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"