- ©«¤l
- 17
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 62
- ÂI¦W
- 0
- §@·~¨t²Î
- WinXP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- Tinwan
- µù¥U®É¶¡
- 2011-4-9
- ³Ì«áµn¿ý
- 2018-7-6
|
[µo°Ý] VBA ³sµ² Access ªº°ÝÃD½Ð±Ð
¦]¬°¯S®í¤u§@»Ý¨D¤@©wn¥ÎExcel »PAccess§@³sµ²¡A©Ò¥H§Ú¨Ì·Ó½d¨Ò¼g¤F¤@Ó´ú¸Õµ{§Ç¡A
¥¦·|§â¸ê®Æ¶K¦b Sheet ¤ºªºA2¡A§Ún¦p¦ó§âRUN¥X¨Óªº¤§®Æ©ñ¶iÅܼƤº?
§Ú³Ì¥Dnªº¥Øªº¬O ¥ÎEXCEL2007 ¶}Access2003ªº¸ê®Æ®w,±q¤¤¿z¿ï®×¥óª¬ºA='2'
ªºP1Á`®É¶¡§@¥[Á`
§Æ±æ¦³¤H¯àÀ°§Ú- Sub aa()
- Dim cnn As New ADODB.Connection
- Dim rst As New ADODB.Recordset
- cnn.Open "provider=Microsoft.jet.OLEDB.4.0;data source=" & ThisWorkbook.Path & "\CCBO.MDB"
- sq1 = "select AVG(P1Á`®É¶¡) from CCBO where ®×¥óª¬ºA='2'"
- [a2].CopyFromRecordset cnn.Execute(sql)
- cnn.Close
- Set cnn = Nothing
- End Sub
½Æ»s¥N½X |
|