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: 265
Default circular reference in VB

Hi, I have a stock program, I want the posibility that if someone put in some
cell (lets say a1) a code, in the other cell appears the description (lets
say b2). until this point everithing is easy (just adding a lookup function
in cell b2) the problem is that I want that if the user type the description
in the description cell (b1) the code appears (in cell a1), I thougt to use
the following code :

Private Sub Worksheet_Change(ByVal Target As Range)
if target.address="$A$1" then
cells(1,2)= "vlookup(....................................
end if

if target.address="$b$1" then
cells(1,2)= "vlookup(....................................
end if

End Sub

it works just fine, the problem is that THE CODE IS EXECUTED FOR EVER, it
dosn't stop, I know exactly why it dosn't stop (because it create a circualr
reference and it's executed when a dependient cell of it self changes), but I
have no idea how to do what I want, any suggestions??????
 
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
circular reference circular reference Excel Worksheet Functions 2 August 9th 08 10:05 PM
Circular reference reno Excel Discussion (Misc queries) 2 August 27th 07 10:34 PM
Circular Reference Jim Excel Discussion (Misc queries) 2 August 27th 07 05:22 PM
Circular reference help! nick Excel Discussion (Misc queries) 4 March 7th 06 08:07 PM
Circular Reference MahaRaj® Excel Programming 3 October 19th 04 11:32 PM


All times are GMT +1. The time now is 10:42 PM.

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

About Us

"It's about Microsoft Excel"