+ Reply to Thread
Results 1 to 4 of 4

Actualize Data on "Table Request"

  1. #1
    Registered User
    Join Date
    12-02-2009
    Location
    vienna, austria
    MS-Off Ver
    Excel 2003
    Posts
    5

    Actualize Data on "Table Request"

    Hey folks...

    is it possibhle to create something like a VBA code that enables to, if, e.g. Field A1 contains "100" to Update all the SQL entries? Or is it only possible if I create SQL entries by VBS itself and not by the data manager?

    So instead of clicking "Refresh All Data" I want to update it by triggering a condition. Is this possible in any way?


    Edit: i have already solved half of it. I now have a macro that refreshes all connections, but is there a possibility to say something like "=IF(G5=1;CallMyMacro;100) ?

    Cheers,
    Mike
    Last edited by proZero; 12-09-2009 at 05:07 AM.

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

    Re: Actualize Data on "Table Request"

    Not entirely sure I follow but in theory you could use the change event on A1 to in turn activate the refresh all ... the key will be by what means the value in A1 is being altered - manually or by formula - if the latter: what is the formula ?

  3. #3
    Registered User
    Join Date
    12-02-2009
    Location
    vienna, austria
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Actualize Data on "Table Request"

    i try to figure out if there is a workaround about a problem i have with another software that gets data from excel. it would be nice if the data is updated if I, for instance, change the value in A1. Everytime it changes, i want the Connection(s) to be Updated.

    I just found the Code for Updating Connections in a VBA reference

    ActiveWorkbook.Connections(CONNECTIONNAME).Refresh
    Basically the Value gets changed manually, but not by physically entering it into the field, but by another software. Theoretically, it can also be changed by a Formula that depends on another field if that makes a difference...

    you could use the change event on A1 to in turn activate the refresh all
    How that?

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

    Re: Actualize Data on "Table Request"

    Quote Originally Posted by proZero
    Basically the Value gets changed manually, but not by physically entering it into the field, but by another software
    I'm afraid I don't understand what the above means - you mean it is itself populated via an external query or it is populated by VBA ?

    We need to understand which event you can use to trap the update in A1 and in turn refresh all other queries as and when appropriate.

    In basic terms (using the manual change event) one route could be as basic as:

    Please Login or Register  to view this content.

+ 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