+ Reply to Thread
Results 1 to 7 of 7

Refrence cells and manipulation

  1. #1
    Registered User
    Join Date
    02-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    70

    Red face Refrence cells and manipulation

    Hi everybody I have been working on a project and I was satisfied with what i got so far, but again i have hit rockbottom now the issue is that i have problem making a reference for A1 such as A1 has a formula like
    A1=L1 (this is simple)
    and before this i have already had a code which is below

    Please Login or Register  to view this content.
    So as you can see that in the VBA code above i am using A column as the dynamic value. This is only for testing purposes but once this is working i will have a Dynamic Data Exchange.
    Just for those who can make sense out of this whole mess i am basically a trader so i am using MetaTrader to make this dynamic, so anyways as explained the code works fine if A which is the dynamic cell but if it has a formula like
    A1=L1
    Then L1 has changed to 32 it is reflecting in A1 perfectly but the A1 doesnot manipulate the value and go according to the code above which was working fine with out any referencing
    Last edited by jackandjill; 05-09-2010 at 02:18 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Refrence cells and manipulation

    Hello jackandjill,

    could you try explaining again, please? The above is really rather hard to read. Use a few full stops every now and then to mark the end of a sentence and the beginning of a new one. Describe what you want to achieve. What is the required outcome? Where do you want this to happen?

    cheers

  3. #3
    Registered User
    Join Date
    02-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: Refrence cells and manipulation

    Hi everybody I have been working on a project and I was satisfied with what i got so far, but again i have hit rockbottom now the issue is that i have problem making a reference for A1 such as A1 has a formula like
    A1=L1 (this is simple)
    and before this i have already had a code which is below

    Please Login or Register  to view this content.
    So as you can see that in the VBA code above i am using A column as the dynamic value. This is only for testing purposes but once this is working i will have a Dynamic Data Exchange.
    Just for those who can make sense out of this whole mess i am basically a trader so i am using MetaTrader to make this dynamic, so anyways as explained the code works fine if A which is the dynamic cell but if it has a formula like
    A1=L1
    Then L1 has changed to 32 it is reflecting in A1 perfectly but the A1 doesnot manipulate the value and go according to the code above which was working fine with out any referencing

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Refrence cells and manipulation

    Describe what you want to achieve. What is the required outcome? Where do you want this to happen?
    I still can't figure out the meaning of this:
    Then L1 has changed to 32 it is reflecting in A1 perfectly but the A1 doesnot manipulate the value and go according to the code above which was working fine with out any referencing

  5. #5
    Registered User
    Join Date
    02-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    70

    Red face Re: Refrence cells and manipulation

    Then L1 has a value imported from another application (DDE, dynamic data exchange) say it is 32 . So according to the reference formula placed in A1 which is A1=L1 the value in L1 which is 32 is reflecting in A1 perfectly .
    Now the issue is A1 value is not being manipulated according to the code below, IF A1 has a reference formula
    The same code works fine if A1 has no reference formula, this is the main problem

    Please Login or Register  to view this content.
    Last edited by jackandjill; 05-09-2010 at 03:41 AM.

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Refrence cells and manipulation

    Quote Originally Posted by jackandjill
    This is only for testing purposes but once this is working i will have a Dynamic Data Exchange.
    DDE Updates do not invoke the change event given they are to all intents and purposes formulae.

    It follows that the Change Event is not really viable - you would need to use the Calculate event at which point you lose "Target".
    (A calculation can be invoked by all manner of actions - not simply a DDE update so trapping the fact that the DDE update invoked the calculation is non-trivial [IMO])

    It goes without saying that the complexity of trapping DDE changes will vary based on

    a) quantity

    b) frequency of update

    If you google the topic you will find plenty of info I'm sure - I'm afraid my knowledge on the topic is very limited (ie working with one or two is not too difficult based on Static variables etc but en masse it's a very different situation).


    EDIT:

    think of the Change Event as only handling changes to Constants ... the cells you're referencing contain Formulae rather than Constants and as such a re-calculation does not invoke the Change event.
    Last edited by DonkeyOte; 05-09-2010 at 03:51 AM.

  7. #7
    Registered User
    Join Date
    02-13-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    70

    Re: Refrence cells and manipulation

    Yes that is indeed the problem i see but i have a somewhat close link to the problem at this post
    http://www.ozgrid.com/forum/showthread.php?t=15366
    Last edited by teylyn; 05-09-2010 at 05:32 AM. Reason: removed php tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1