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

📄 +

📁 VB开发的ERP系统
💻
字号:
VERSION 5.00
Begin VB.Form frm_rowcol 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "输入Excel行列值"
   ClientHeight    =   2805
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4950
   Icon            =   "设置EXCEL行列数.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2805
   ScaleWidth      =   4950
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text2 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   1
      EndProperty
      Height          =   270
      Left            =   840
      MaxLength       =   2
      TabIndex        =   1
      Top             =   1335
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      BeginProperty DataFormat 
         Type            =   1
         Format          =   "0"
         HaveTrueFalseNull=   0
         FirstDayOfWeek  =   0
         FirstWeekOfYear =   0
         LCID            =   2052
         SubFormatType   =   1
      EndProperty
      Height          =   270
      Left            =   840
      MaxLength       =   2
      TabIndex        =   0
      Top             =   945
      Width           =   1575
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消(&C)"
      Height          =   300
      Left            =   3720
      TabIndex        =   3
      ToolTipText     =   "缺省值为:20行15列"
      Top             =   2430
      Width           =   1120
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定(&O)"
      Height          =   300
      Left            =   2490
      TabIndex        =   2
      ToolTipText     =   "使行列值置为您设定的值"
      Top             =   2430
      Width           =   1120
   End
   Begin VB.Frame Frame1 
      Caption         =   " 您打开的文件行列数为"
      Height          =   1575
      Left            =   90
      TabIndex        =   4
      Top             =   720
      Width           =   4755
      Begin VB.Label Label2 
         Height          =   285
         Left            =   300
         TabIndex        =   7
         Top             =   1140
         Width           =   4365
      End
      Begin VB.Label Label5 
         Caption         =   "列数:"
         Height          =   255
         Left            =   255
         TabIndex        =   6
         Top             =   735
         Width           =   525
      End
      Begin VB.Label Label4 
         Caption         =   "行数:"
         Height          =   225
         Left            =   255
         TabIndex        =   5
         Top             =   360
         Width           =   615
      End
   End
   Begin VB.Label Label3 
      Caption         =   "(说明:用EXCEL打开此文件,看看其所需行列值)"
      ForeColor       =   &H00C00000&
      Height          =   195
      Left            =   120
      TabIndex        =   9
      Top             =   30
      Width           =   3825
   End
   Begin VB.Label Label1 
      Caption         =   "请输入您打开的Excel文件的最大行列值:"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   390
      Width           =   3285
   End
End
Attribute VB_Name = "frm_rowcol"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'***********************************************
'*    模 块 名 称 :设置EXCEL行列
'*    功 能 描 述 :
'*    程序员姓名  :奚俊峰
'*    最后修改人  :奚俊峰
'*    最后修改时间:2002/01/21
'***********************************************


Private Sub Command1_Click()
    If Text1.Text = "" Or Val(Text1.Text) > 55 Then
        MsgBox "请输入行数值!" & vbCrLf & "不能大于55", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
        Text1.SetFocus
        Exit Sub
    End If
    If Text2.Text = "" Or Val(Text2.Text) > 30 Then
        MsgBox "请输入列数值!" & vbCrLf & "不能大于30", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
        Text2.SetFocus
        Exit Sub
    End If
    song_row = Val(Text1.Text) + 1
    song_col = Val(Text2.Text) + 1
    Unload Me
End Sub

Private Sub command2_Click()
    Unload Me
End Sub

Private Sub Text1_Change()
    Dim temp_validate
    If Len(Text1.Text) > 0 Then
        If Not IsNumeric(Right(Text1.Text, 1)) Then
            MsgBox "请输入数字!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
            Text1.SelStart = 0
            Text1.SelLength = Len(Text1.Text)
            Text1.SetFocus
        End If
    End If
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If Not IsNumeric(Text1.Text) Then
            MsgBox "请输入数字!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
            Text1.SelStart = 0
            Text1.SelLength = Len(Text1.Text)
            Text1.SetFocus
        Else
            Text2.SetFocus
        End If
    End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        If Not IsNumeric(Text2.Text) Then
            MsgBox "请输入数字!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
            Text2.SelStart = 0
            Text2.SelLength = Len(Text1.Text)
            Text2.SetFocus
        Else
            Command1.SetFocus
        End If
    End If
End Sub

Private Sub Text1_LostFocus()
    If Len(Text1.Text) > 0 Then
        
        If Not IsNumeric(Right(Text1.Text, 1)) Then
            MsgBox "请输入数字!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
            Text1.SelStart = 0
            Text1.SelLength = Len(Text1.Text)
            Text1.SetFocus
        End If
        
    End If
    
End Sub

Private Sub Text2_LostFocus()
    If Len(Text2.Text) > 0 Then
        If Not IsNumeric(Right(Text2.Text, 1)) Then
            MsgBox "请输入数字!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
            Text2.SelStart = 0
            Text2.SelLength = Len(Text1.Text)
            Text2.SetFocus
        End If
    End If
    
End Sub

Private Sub Text2_Change()
    Dim temp_validate
    If Len(Text2.Text) > 0 Then
        If Not IsNumeric(Right(Text2.Text, 1)) Then
            MsgBox "请输入数字!", vbInformation + vbOKOnly, "百利/ERP5.0-电子报表"
            Text2.SelStart = 0
            Text2.SelLength = Len(Text1.Text)
            Text2.SetFocus
        End If
    End If
End Sub

'用excel打开此文件,看看其所需行列值

⌨️ 快捷键说明

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