+ Reply to Thread
Results 1 to 6 of 6

Macro from 2010 not working correctly in 2013

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Macro from 2010 not working correctly in 2013

    I have tested the majority of the code from my Office 2010 macros on a Office 2013 machine, but one part seems to need updating.

    Please Login or Register  to view this content.
    It breaks at the ".Refresh BackgroundQuery:=False" line, which means it isn't updating/pulling the data.

    I had read that if you remove the 'ODBC;' part from the query language it would work but that turned out untrue.

    Can anyone assist?

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro from 2010 not working correctly in 2013

    Hello Phixer,

    It is not uncommon for Excel to change the connection strings between releases. You can verify the connection string syntax is correct at www.connectionstrings.com.

    Clcik on the Excel link on the right side.

    A new page will load. Look for the heading "Connect" on the right. Click Excel 2013.

  3. #3
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: Macro from 2010 not working correctly in 2013

    None of those seem to apply to what I am doing, but I will admit I am not big on SQL.

    Are you talking about changing the ODBC Query string, or the VB Code?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Macro from 2010 not working correctly in 2013

    Hello Phixer,

    I was referring to the VBA syntax for the SQL connection string. I only suggested this because the was no change to the Refresh method of a QueryTable. The method is the same in both 2010 and 2013.

  5. #5
    Forum Guru jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro from 2010 not working correctly in 2013

    Hi Phixer

    Record the import (in 2013). This will give you the proper Syntax. Modify the recorded Code as required.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Registered User
    Join Date
    04-10-2014
    Location
    Tallahassee, FL
    MS-Off Ver
    Excel 2010
    Posts
    98

    Re: Macro from 2010 not working correctly in 2013

    Unfortunately, I don't have access to a machine that I can do that, but I am expected to write code for it for others that do, even if I cannot use their computers to find out how.

    When I find out the proper code, I will post it.

+ 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. VBA Working in Excel 2010 and not 2013
    By Jason*** in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-04-2014, 11:28 AM
  2. [SOLVED] Excel 2010 to Excel 2013 Eroor? PivotTable, ListBox VBA not working.
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 07:49 AM
  3. [SOLVED] Macro works in 2010&2013 but not Excel 2003
    By Mattiac in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-06-2014, 03:12 AM
  4. 2010 macro not working in 2013 via button
    By PaulieNZ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-01-2013, 01:27 PM
  5. 2010 macro runs slowly in 2013
    By PaulieNZ in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-24-2013, 09:00 PM

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