Answer the question
In order to leave comments, you need to log in
Customize ActiveX in Excel?
Kind time of the day, habrets, tell me, please. There is a connection from Excel to Access.
On the computer on which the VBA code was written, everything works, on others it gives an error
Sub Получить_данные_о_программе()
Dim tbl As Recordset
Dim SQLr As String
Dim dbs As Database
Dim lists_count As Long
ActiveSheet.Protect Password:="123698745", UserInterfaceOnly:=True
Sheets("Главная панель").Rows("17:100000").Delete shift:=xlUp
lists_count = Int(Sheets("Главная панель").Range("A1").Text)
Set dbs = DAO.OpenDatabase("\\srv02\_tp\Shilov\BD\db.mdb")
SQLr = "SELECT f_name FROM win32_applications WHERE computer_name = '" & Sheets("Данные").Cells(lists_count + 1, 8).Text & "'"
Set tbl = dbs.OpenRecordset(SQLr)
Sheets("Главная панель").Cells(17, 1).CopyFromRecordset tbl
tbl.Close
Set tbl = Nothing
dbs.Close
Set dbs = Nothing
End Sub
Answer the question
In order to leave comments, you need to log in
I will assume that on other PCs there is a 64-bit version of MS Office, and on your x86. There are no DAO libraries for x64.
Is the "Microsoft office xx database engine object library " library connected?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question