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.
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>
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.
- Author: admin
- Category: Category
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.
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>
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.