1.安装数据库 2.创建数据源 Private Sub Worksheet_Change(ByVal Target As Range) Then Call mySQL End If End Sub Public Function mySQL() strconnt = "" Set connt = CreateObject("ADODB.Connection") Dim sevip, Db, user, pwd As String '设服务器地址 所连数据,及登录用户…
原文:VBA读取word中的内容到Excel中 Public Sub Duqu() Dim myFile As String Dim docApp As Word.Application Dim docRange As Word.Range myFile = ThisWorkbook.Path & "\Word文档的名字" '指定Word文档 Set docApp = New Word.Application docApp…