module1.bas
来自「本源程序是指法练习的程序」· BAS 代码 · 共 18 行
BAS
18 行
Attribute VB_Name = "Module1"
'Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'Public Const SW_MAXIMIZE = 3
'Declare Function GetWindowsDirectory Lib "kernel32" Alias "GetWindowsDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
'Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Public Sub topdata(conn)
Dim strpath As String
strpath = App.Path
If Right(strpath, 1) <> "/" Then
strpath = strpath & "/"
End If
strpath = strpath & "top.mdb"
Set conn = New ADODB.Connection
conn.Open "driver={Microsoft Access Driver (*.mdb)};pwd=781116;dbq=" & strpath
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?