📄 数据导入窗口.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form 数据导入窗口
BackColor = &H00FFFFC0&
Caption = "数据导入窗口"
ClientHeight = 6225
ClientLeft = 60
ClientTop = 345
ClientWidth = 8265
LinkTopic = "Form1"
ScaleHeight = 10380.79
ScaleMode = 0 'User
ScaleWidth = 12703.84
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame3
BackColor = &H00FFFFC0&
Caption = "证书编号更改功能"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1439
Left = 315
TabIndex = 14
Top = 4620
Width = 7680
Begin VB.CommandButton Command7
Caption = "确定"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 5985
TabIndex = 9
Top = 315
Width = 1590
End
Begin VB.TextBox Text2
DataSource = "Adodc1"
BeginProperty Font
Name = "Times New Roman"
Size = 14.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 2520
TabIndex = 8
Top = 315
Width = 3270
End
Begin VB.Label Label2
BackColor = &H00FFFFC0&
Caption = "注意:该功能只有管理员有权设置,请切换用户!"
BeginProperty Font
Name = "宋体"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 435
Left = 420
TabIndex = 16
Top = 840
Width = 7155
End
Begin VB.Label Label1
BackColor = &H00FFFFC0&
Caption = "请输入证书编号:"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 315
TabIndex = 15
Top = 420
Width = 2325
End
End
Begin VB.Frame Frame2
BackColor = &H00FFFFC0&
Caption = "记录浏览"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 4215
Left = 4200
TabIndex = 12
Top = 315
Width = 3795
Begin VB.TextBox Text1
BackColor = &H8000000A&
Height = 3060
Left = 105
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 13
TabStop = 0 'False
Top = 420
Width = 3585
End
Begin VB.CommandButton Command4
Caption = "下条记录"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 105
TabIndex = 6
Top = 3570
Width = 1800
End
Begin VB.CommandButton Command5
Caption = "返回首条"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 1995
TabIndex = 7
Top = 3570
Width = 1695
End
End
Begin VB.Frame Frame1
BackColor = &H00FFFFC0&
Caption = "系统功能"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 4215
Left = 315
TabIndex = 11
Top = 315
Width = 3795
Begin VB.CommandButton Command9
Caption = "指示表检定"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 315
TabIndex = 17
Top = 420
Width = 3165
End
Begin VB.CommandButton Command8
Caption = "切换用户"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 315
TabIndex = 3
Top = 2310
Width = 3165
End
Begin VB.CommandButton Command6
Caption = "关闭备份文件"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 315
TabIndex = 4
Top = 2940
Width = 3165
End
Begin VB.CommandButton Command1
BackColor = &H00FF8080&
Caption = "打开备份文件"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 315
TabIndex = 1
Top = 1050
Width = 3165
End
Begin VB.CommandButton Command2
BackColor = &H0080FF80&
Caption = "另存为Excel文件"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 315
TabIndex = 2
Top = 1680
Width = 3165
End
Begin VB.CommandButton Command3
Caption = "退出系统"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 540
Left = 315
TabIndex = 5
Top = 3570
Width = 3165
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 5250
Top = 525
Visible = 0 'False
Width = 1830
_ExtentX = 3228
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=JDY_DB.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=JDY_DB.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "JDY"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.ComboBox Combo1
Appearance = 0 'Flat
DataField = "型号规格"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Index = 3
ItemData = "数据导入窗口.frx":0000
Left = 1260
List = "数据导入窗口.frx":0002
TabIndex = 10
Top = 2310
Visible = 0 'False
Width = 1860
End
Begin VB.ComboBox Combo1
Appearance = 0 'Flat
DataField = "制造厂"
DataSource = "Adodc1"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Index = 4
ItemData = "数据导入窗口.frx":0004
Left = 4515
List = "数据导入窗口.frx":0006
TabIndex = 0
Top = 1995
Visible = 0 'False
Width = 1755
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 3465
Top = 630
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
End
Attribute VB_Name = "数据导入窗口"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim fso As New FileSystemObject, fill As File, ts As TextStream, ts1 As TextStream
Dim tlen As Long
Dim s As String
Dim sa As String
Private Sub Command1_Click()
CommonDialog1.CancelError = True
On Error GoTo errhandler
CommonDialog1.Filter = "All File(*.*)|*.*|Text_Files(*.txt)"
CommonDialog1.FilterIndex = 2
CommonDialog1.ShowOpen
Command2.Enabled = True
Command4.Enabled = True
Command5.Enabled = True
Command6.Enabled = True
Set fill = fso.GetFile(CommonDialog1.FileName)
Set ts = fill.OpenAsTextStream(ForReading)
Set ts1 = fill.OpenAsTextStream(ForReading)
s = ts.ReadLine
s = s + ",#"
Text1.Text = s
tlen = 1
sa = ts1.ReadLine
Do While ts1.AtEndOfStream = False
sa = ts1.ReadLine
tlen = tlen + 1
Loop
Exit Sub
errhandler:
Exit Sub
End Sub
Private Sub Command2_Click()
Dim xlapp As Excel.Application
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -