+ Reply to Thread
Results 1 to 4 of 4

VBA Update from Excel to SQL Table Contents.

  1. #1
    Registered User
    Join Date
    12-26-2019
    Location
    australia
    MS-Off Ver
    2016
    Posts
    5

    VBA Update from Excel to SQL Table Contents.

    Hi.

    I currently have a VBA Script that will create new records within a SQL table directly from excel.

    What I was hoping if there was a way to modify the below so it can change from a create to a modify/update of exisitng records in the SQL table.

    The unique key will be PP_REFERNCE in all cases

    So for example what the front end user will do is populate the PP_REFERENCE ID in cell A2 and then update the cells that they want changed in the SQL table.


    PP_REFERENCE DIRECTOR_NAME DIRECTOR_STATUS

    1234 DAVE APPROVED
    4567 MARK PENDING

    So what ever was in DIRECTOR_NAME before will now be replaced by the above from excel in the existing SQL table against the PP_REFERENCE


    Please Login or Register  to view this content.
    Last edited by Pepe Le Mokko; 12-27-2019 at 03:42 AM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: VBA Update from Excel to SQL Table Contents.

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    I did it for you this time. Please read forum rules. Thanks

  3. #3
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: VBA Update from Excel to SQL Table Contents.

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however it has been brought to our attention that the same query has been posted on one or more other forums and you have not provided the required cross-post link(s) here.

    Please see Forum Rule #3 about cross-posting and adjust accordingly. Read this to understand why we (and other sites like us) consider this to be important.

    (Note: this requirement is not optional. No help to be offered until the link is provided.)

  4. #4
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,446

    Re: VBA Update from Excel to SQL Table Contents.

    Cross posted at https://chandoo.org/forum/threads/vb...ontents.43322/
    and at
    https://www.mrexcel.com/board/thread...tents.1118903/

    I have added the links I know of as you are new here. However, you will have to provide any other links ( and there seem to be quite a few around)
    Last edited by Pepe Le Mokko; 12-27-2019 at 10:27 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Trying to update an access table from Excel based on unique ID. rst.Update not working
    By Newbie0924 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2015, 04:15 PM
  2. Replies: 10
    Last Post: 09-07-2014, 11:54 PM
  3. Replies: 1
    Last Post: 08-04-2014, 09:51 AM
  4. Changing Word styles in Excel VBA to update table of contents
    By Bonnister in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-10-2013, 10:45 AM
  5. Replies: 2
    Last Post: 06-16-2013, 02:58 PM
  6. Can I use cell contents to update footers in excel?
    By GregW in forum Excel General
    Replies: 2
    Last Post: 08-15-2005, 02:05 PM
  7. [SOLVED] EXCEL Table of Contents
    By robin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-05-2005, 05:06 PM

Tags for this Thread

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