ExcelからMS-Accessのデータを簡易取り出し。
dbPath = "xxx.accdb" Set dbe = CreateObject("DAO.DBEngine.120") Set Db = dbe.Workspaces(0).OpenDatabase(dbPath, False) Sql = "select x from xxxx where xx ="x" Set dbRes = Db.OpenRecordset(Sql) wkCMT = dbRes("x").Value dbRes.Close Db.Close Set Db = Nothing Set dbe = Nothing