📄 frmfindwh.frm
字号:
Height = 225
Index = 0
Left = 2760
TabIndex = 29
Top = 1440
Width = 330
End
Begin VB.Label Label14
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "下边界"
Height = 225
Left = 120
TabIndex = 28
Top = 2520
Width = 540
End
Begin VB.Label Label13
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "右边界"
Height = 225
Left = 120
TabIndex = 27
Top = 2160
Width = 540
End
Begin VB.Label Label12
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "上边界"
Height = 225
Left = 120
TabIndex = 26
Top = 1800
Width = 540
End
Begin VB.Label Label11
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "左边界"
Height = 225
Left = 120
TabIndex = 25
Top = 1440
Width = 540
End
Begin VB.Label Label10
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "对齐方式"
Height = 225
Left = 120
TabIndex = 24
Top = 720
Width = 720
End
Begin VB.Label Label9
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "标题"
Height = 225
Left = 120
TabIndex = 23
Top = 360
Width = 360
End
Begin VB.Label Label8
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "文字边框"
Height = 225
Left = 120
TabIndex = 22
Top = 1080
Width = 720
End
End
Begin MSFlexGridLib.MSFlexGrid DataShow
Height = 5535
Left = 120
TabIndex = 15
Top = 3360
Width = 15015
_ExtentX = 26485
_ExtentY = 9763
_Version = 393216
Rows = 1
AllowUserResizing= 3
End
Begin VB.Frame Frame1
Caption = "条件设置"
Height = 3135
Left = 120
TabIndex = 0
Top = 120
Width = 5295
Begin vkUserContolsXP.vkCommand vkCommand3
Height = 375
Left = 3600
TabIndex = 7
Top = 2280
Width = 1455
_ExtentX = 2566
_ExtentY = 661
BackColorPushed1= 16514043
BackColorPushed2= 14474460
Caption = "关闭"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "frmFindWH.frx":03C2
End
Begin vkUserContolsXP.vkCommand vkCommand2
Height = 375
Left = 1920
TabIndex = 6
Top = 2280
Width = 1455
_ExtentX = 2566
_ExtentY = 661
BackColorPushed1= 16514043
BackColorPushed2= 14474460
Caption = "导出"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "frmFindWH.frx":075C
End
Begin vkUserContolsXP.vkCommand vkCommand1
Height = 375
Left = 240
TabIndex = 5
Top = 2280
Width = 1455
_ExtentX = 2566
_ExtentY = 661
BackColorPushed1= 16514043
BackColorPushed2= 14474460
Caption = "查询"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "frmFindWH.frx":0AF6
End
Begin VB.ComboBox Combo3
Height = 345
Left = 1080
Style = 2 'Dropdown List
TabIndex = 3
Top = 1080
Width = 2175
End
Begin VB.ComboBox Combo2
Height = 345
Left = 1080
Style = 2 'Dropdown List
TabIndex = 2
Top = 720
Width = 2175
End
Begin VB.ComboBox Combo1
Height = 345
Left = 1080
Style = 2 'Dropdown List
TabIndex = 1
Top = 360
Width = 2175
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "物品名称"
Height = 225
Left = 240
TabIndex = 18
Top = 1080
Width = 720
End
Begin VB.Label Label6
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "物品编号"
Height = 225
Left = 240
TabIndex = 17
Top = 720
Width = 720
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "仓库名称"
Height = 225
Left = 240
TabIndex = 16
Top = 360
Width = 720
End
End
Begin VB.ComboBox Combo5
Height = 345
Left = 7080
TabIndex = 21
Text = "Combo5"
Top = 4680
Visible = 0 'False
Width = 1215
End
Begin VB.ComboBox Combo4
Height = 345
Left = 7080
TabIndex = 20
Text = "Combo4"
Top = 5400
Visible = 0 'False
Width = 1215
End
End
Attribute VB_Name = "frmFindWH"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim strPrintSQL As String
Dim strCaption() As String
Dim bStopSave As Boolean
Public Sub SaveAsTXT(FileName As String)
On Error GoTo ErrFlag
Dim FileNO As Long
Dim StrTemp As String
Dim i As Long, j As Long
FileNO = FreeFile
Open FileName For Output As #FileNO
DataShow.Redraw = False
StrTemp = ""
For i = 0 To DataShow.Rows - 1
DataShow.Row = i
For j = 0 To DataShow.Cols - 1
DataShow.Col = j
StrTemp = StrTemp & DataShow.Text & vbTab
Next j
StrTemp = StrTemp
Print #FileNO, StrTemp
StrTemp = ""
DoEvents
Next i
DataShow.Redraw = True
Close (FileNO)
MsgBox "保存到文件[" & FileName & "]完毕", vbOKOnly + vbInformation
Exit Sub
ErrFlag:
DataShow.Redraw = True
MsgBox Err.Description, vbOKOnly + vbCritical
End Sub
Public Sub SaveAsXLS()
On Error GoTo ErrFlag
Dim i As Long, j As Long
Dim Excel_App As Object
Dim Excel_Sheet As Object
Dim FileName As String, bFileOpen As Boolean
Dim StrTemp As String
bFileOpen = False
With comdlgOpen
.Filter = "Excel File(*.XLS)|*.XLS|Text File(*.TXT)|*.TXT"
.flags = cdlOFNOverwritePrompt
.ShowSave
End With
FileName = comdlgOpen.FileName
If FileName = "" Then Exit Sub
If UCase(Right(FileName, 3)) = "TXT" Then
SaveAsTXT FileName
Exit Sub
End If
vkBar1.Value = 1
vkBar1.Visible = True
Set Excel_App = CreateObject("Excel.Application")
Call Excel_App.workbooks.Add
Set Excel_Sheet = Excel_App.ActiveSheet
bFileOpen = True
DataShow.Redraw = False
StrTemp = ""
For i = 0 To DataShow.Rows - 1
DataShow.Row = i
For j = 0 To DataShow.Cols - 1
DataShow.Col = j
StrTemp = StrTemp & DataShow.Text & vbTab
Next j
StrTemp = StrTemp & vbCrLf
Clipboard.Clear
Clipboard.SetText StrTemp
Excel_Sheet.cells(i + 1, 1).Select
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -