?? frmdataenv.frm
字號(hào):
VERSION 5.00
Begin VB.Form frmDataEnv
Caption = "轉(zhuǎn)換Access數(shù)據(jù)庫(kù)"
ClientHeight = 4200
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 4200
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text3
Height = 375
Left = 240
TabIndex = 6
Text = "Employees"
Top = 3000
Width = 4335
End
Begin VB.TextBox Text2
Height = 375
Left = 120
TabIndex = 4
Text = "D:\Microsoft Visual Studio\VB98\NWind.mdb"
Top = 1920
Width = 4335
End
Begin VB.TextBox Text1
Height = 375
Left = 120
TabIndex = 2
Text = "C:"
Top = 840
Width = 3855
End
Begin VB.CommandButton Command1
Caption = "轉(zhuǎn)換"
Height = 375
Left = 2760
TabIndex = 0
Top = 3600
Width = 1815
End
Begin VB.Label Label3
Caption = "轉(zhuǎn)換對(duì)象名稱:"
Height = 375
Left = 120
TabIndex = 5
Top = 2400
Width = 1335
End
Begin VB.Label Label2
Caption = "源文件路徑:"
Height = 255
Left = 120
TabIndex = 3
Top = 1440
Width = 1215
End
Begin VB.Label Label1
Caption = "輸出路徑"
Height = 375
Left = 120
TabIndex = 1
Top = 240
Width = 1575
End
End
Attribute VB_Name = "frmDataEnv"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim acApp As Access.Application
Dim strSourcePath As String
Dim strReportPath As String
Dim strObjectName As String
strSourcePath = Text2.Text
strReportPath = Text1.Text
strObjectName = Text3.Text
Set acApp = GetObject(strSourcePath, "Access.Application")
'打開(kāi)數(shù)據(jù)庫(kù)
acApp.DoCmd.OutputTo acOutputTable, strObjectName, acFormatXLS, strReportPath
'轉(zhuǎn)換指定表為Excel文件并存儲(chǔ)到指定的目錄
acApp.CloseCurrentDatabase
Set acApp = Nothing
End Sub
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -