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

📄 dde.frm

📁 修改读取office excel 数据
💻 FRM
字号:
VERSION 5.00
Begin VB.Form DDE 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "从 Excel 中获取数据"
   ClientHeight    =   2415
   ClientLeft      =   45
   ClientTop       =   345
   ClientWidth     =   4680
   Icon            =   "DDE.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2415
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "从 Excel 中获取数据"
      Height          =   510
      Left            =   1320
      TabIndex        =   3
      Top             =   1560
      Width           =   1920
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1380
      Locked          =   -1  'True
      TabIndex        =   1
      Text            =   "Manuall"
      Top             =   765
      Width           =   2910
   End
   Begin VB.TextBox Text2 
      Height          =   465
      HideSelection   =   0   'False
      Left            =   1365
      LinkItem        =   "R1C1"
      LinkTopic       =   "Excel|Sheet1"
      Locked          =   -1  'True
      TabIndex        =   0
      Text            =   $"DDE.frx":038A
      Top             =   1590
      Width           =   1815
   End
   Begin VB.Label Label2 
      Caption         =   "打开一个 Excel 文件,然后在第一格中输入数据,然后单击获取按钮."
      Height          =   510
      Left            =   375
      TabIndex        =   4
      Top             =   135
      Width           =   3660
   End
   Begin VB.Label Label1 
      Caption         =   "A1"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   360
      TabIndex        =   2
      Top             =   885
      Width           =   945
   End
End
Attribute VB_Name = "DDE"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居汉化收藏整理
'发布日期:05/04/27
'描  述:从 Excel 中获取数据示例
'网  站:http://www.mndsoft.com/
'e-mail:mnd@mndsoft.com
'OICQ  : 88382850
'****************************************************************************

Private Sub Command1_Click()
   Dim CurRow As String
   Static Row   ' Worksheet row number.
   Row = Row + 1   ' Increment Row.
   If Row = 1 Then   ' First time only.
      ' Make sure the link isn't active.
      Text1.LinkMode = 0
      ' Set the application name and topic name.
      Text1.LinkTopic = "Excel|Sheet1"
      Text1.LinkItem = "R1C1"   ' Set LinkItem.
      Text1.LinkMode = 1   ' Set LinkMode to Automatic.
   Else
      ' Update the row in the data item.
      CurRow = "R" & Row & "C1"
      Text1.LinkItem = CurRow   ' Set LinkItem.
   End If
End Sub

⌨️ 快捷键说明

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