[ITEM]
Vba Query Coding In Ms Excel For Mac Rating: 5,0/5 5980 votes

Big Update to the VB Editor for Mac. I know many Mac users have been waiting along time for this, and I'm excited to share that an update to the VB Editor is finally here! Microsoft just released a new build of Excel that contains a new VB Editor, which we use to write VBA macros in Excel. Rurouni kenshin ost 2 rar.

I was using ADODB code in Windows to fetch data from Mysql Database and it was working fine. However, I can not seem to get my Excel workbook (using ADODB) to work with Excel Mac 2011. After a lot of googling, I found an ODBC connector from Actual tech and I was able to fetch three rows using Microsoft Query. But I want this to be done using VBA code but have been unable to do so. Has anyone gotten this to work? If yes, can you please provide me with a sample code. Thanks in Advance !!

P.S: I know there is a similar existing question but the link provided in the answer is no longer working. hence, I have asked a new question

Also, If anyone needs the link to do it through Microsoft Query, here is the link:Generate a report from a database


Here is the code I use in Windows:

<code> Sub getMysqlDBdata()
DimCnAsObject
Dim sqlQa asstring
dim temparray1 as variant
Source = 'MySQL'
mysql_driver = 'MySQL ODBC 5.2 ANSI Driver'
sqlQa = 'select * from homeunion.propertydata;'
SetCn = CreateObject('ADODB.Connection')
Set rs = CreateObject('ADODB.Recordset')
Cn.Open'Driver={MySQL ODBC 5.2 ANSI Driver };Server= 127.0.01 ;Database= test;UID= root ;PWD= 12345'
rs.Open sqlQa, Cn, adOpenStatic
temparray1 = rs.GetRows()
rs.Close
Set rs = Nothing
EndSub</code>
For

Well, the short answer to your question is: NO, you can't make this code cross compatible for both windows and the Mac, because the Mac does not support query tables. However, it does support web queries. You can use conditional assembly to use eitherthe Mac code or Windows code; or use a runtime determination like application.operatingsystem to see which set of code to run.This may give you some help:http://www.dummies.com/how-to/content/using-a-web-query-to-load-tables-in-excel-2011-for.htmlBob.

[/ITEM]
[/MAIN]
Vba Query Coding In Ms Excel For Mac Rating: 5,0/5 5980 votes

Big Update to the VB Editor for Mac. I know many Mac users have been waiting along time for this, and I'm excited to share that an update to the VB Editor is finally here! Microsoft just released a new build of Excel that contains a new VB Editor, which we use to write VBA macros in Excel. Rurouni kenshin ost 2 rar.

I was using ADODB code in Windows to fetch data from Mysql Database and it was working fine. However, I can not seem to get my Excel workbook (using ADODB) to work with Excel Mac 2011. After a lot of googling, I found an ODBC connector from Actual tech and I was able to fetch three rows using Microsoft Query. But I want this to be done using VBA code but have been unable to do so. Has anyone gotten this to work? If yes, can you please provide me with a sample code. Thanks in Advance !!

P.S: I know there is a similar existing question but the link provided in the answer is no longer working. hence, I have asked a new question

Also, If anyone needs the link to do it through Microsoft Query, here is the link:Generate a report from a database


Here is the code I use in Windows:

<code> Sub getMysqlDBdata()
DimCnAsObject
Dim sqlQa asstring
dim temparray1 as variant
Source = 'MySQL'
mysql_driver = 'MySQL ODBC 5.2 ANSI Driver'
sqlQa = 'select * from homeunion.propertydata;'
SetCn = CreateObject('ADODB.Connection')
Set rs = CreateObject('ADODB.Recordset')
Cn.Open'Driver={MySQL ODBC 5.2 ANSI Driver };Server= 127.0.01 ;Database= test;UID= root ;PWD= 12345'
rs.Open sqlQa, Cn, adOpenStatic
temparray1 = rs.GetRows()
rs.Close
Set rs = Nothing
EndSub</code>
For

Well, the short answer to your question is: NO, you can't make this code cross compatible for both windows and the Mac, because the Mac does not support query tables. However, it does support web queries. You can use conditional assembly to use eitherthe Mac code or Windows code; or use a runtime determination like application.operatingsystem to see which set of code to run.This may give you some help:http://www.dummies.com/how-to/content/using-a-web-query-to-load-tables-in-excel-2011-for.htmlBob.