⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mod_main.bas

📁 很经典的抽奖程序
💻 BAS
字号:
Attribute VB_Name = "Mod_Main"
Option Explicit

Public IntTotalPersonCount As Long                  '记录注册的总人数
Public CnnDSN As New ADODB.Connection               '定义一个全局的连接
Public strFilePath As String                        '取表文件的路径

'*********************************************************************
'名称:
'目的:
'输入:
'返回:
'说明:
'*********************************************************************
Sub Main()
Dim apppath As String
Dim dbfilename As String
Dim connectstring As String
Dim DB_USERID As String
Dim DB_PWS As String
Set CnnDSN = New ADODB.Connection
If Right(App.Path, 1) = "\" Then
                apppath = App.Path
        Else
                apppath = App.Path & "\"
End If
dbfilename = apppath & "Lottery_Table.mdb"
connectstring = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
                dbfilename & ";Persist Security Info=False;"
                
                On Error Resume Next
                With CnnDSN
                        .CursorLocation = adUseClient
                        
                        .open connectstring, DB_USERID, DB_PWS
                End With
                
'显示欢迎接界面
'Set frm = New frmSplash
'frm.Show
'DoEvents

'frmMain.AddNodes
index.Show
'Unload frm
End Sub

⌨️ 快捷键说明

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