+ Reply to Thread
Results 1 to 5 of 5

Help editing VBA code that uses MySQL queries to show also column names

  1. #1
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Help editing VBA code that uses MySQL queries to show also column names

    Dear all,

    I'm using one old excel file with a VBA code that allows to do MySQL queries on other excel files.

    The file works great, but whenever I do queries, the pasted data does not contain the column names, which I would like to have. Can someone help me out on editing this code to whenever I do queries I get also the column names please?

    Here is the code that I'm using, and I will also attach the file and one example database file too.

    MODULE:
    Please Login or Register  to view this content.
    WORKSHEET
    Please Login or Register  to view this content.
    Thank you all for any help!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,133

    Re: Help editing VBA code that uses MySQL queries to show also column names

    In your procedure named listar_dados add the following lines in red color;

    Please Login or Register  to view this content.
    Last edited by Haluk; 01-22-2020 at 01:32 PM.

  3. #3
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Help editing VBA code that uses MySQL queries to show also column names

    Dear Haluk,

    Thank you so much!!!! These 3 lines of code solves my problem!!!! Thank you so much for your time and help!!!

  4. #4
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Help editing VBA code that uses MySQL queries to show also column names

    ropbasuel, Excuse me, It is not MySQL. SQL only

  5. #5
    Forum Contributor
    Join Date
    05-09-2013
    Location
    london
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Help editing VBA code that uses MySQL queries to show also column names

    Quote Originally Posted by BMV View Post
    ropbasuel, Excuse me, It is not MySQL. SQL only
    I'm sorry BMV you are completely right! This is not MySQL, it's SQL only!

    Thank you for the correction!

+ 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. how to trace errors involving data queries to web and MySql?
    By jrtaylor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2018, 12:56 PM
  2. editing mysql navigation to include multiple tables from one db
    By jrtaylor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2018, 11:12 AM
  3. Does My VBA Code To Refresh CSV Power Query Connections Need To Change for MySQL Queries?
    By beaglesBuddy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2017, 02:57 PM
  4. CHALLENGE: MySQL, SQL, Excel Queries to My Book
    By ELeGault in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-31-2015, 11:48 PM
  5. Using Excel as a display for MYSQL data , and saving queries
    By james flowers in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-13-2014, 03:12 AM
  6. Show query column names behind pivot table field names
    By gbritton in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 11-18-2013, 03:17 PM
  7. Editing code to show common four-word combinations in a column
    By Glayva in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-07-2011, 09:06 AM

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