modaddin.bas

来自「很好用的Access工具」· BAS 代码 · 共 24 行

BAS
24
字号
Attribute VB_Name = "modAddIn"
' ==============================================================
' Module:       modAddIn
' Purpose:      Single procedure to add project to vbaddin.ini
' Execute:      From immediate window 'AddToINI'
' ==============================================================

Option Explicit
Declare Function WritePrivateProfileString& Lib "Kernel32" Alias "WritePrivateProfileStringA" (ByVal AppName$, ByVal KeyName$, ByVal keydefault$, ByVal FileName$)

'====================================================================
'this sub should be executed from the Immediate window
'in order to get this app added to the VBADDIN.INI file
'====================================================================
Sub AddToINI()
    Dim ErrCode As Long

    ErrCode = WritePrivateProfileString("Add-Ins32", "DatabaseCoder.Connect", "0", "vbaddin.ini")
    MsgBox "qbd DatabaseCoder has been added to the Add-Ins32.ini file" & vbCrLf _
    & "You should now select 'Make dbCoderAddIn.dll from the File menu."
    
End Sub

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?