我想取出spread控件某一行的记录,该怎么写呢?
解决方案 »
- 执行程序提示 windows 正在设置 Micrsoft office professional Edition 2003,请稍后
- 仪表采集数据的问题。MSCOMM控件
- 请问那位哥哥(姐姐)知道如何用VB程序修改虚拟目录下的实际路径?
- 请问两个Access数据库间的表如何复制,急!在线等...
- 能修改statusbar背景颜色嘛?能用图片代替嘛?
- mscomm如何接收彩信图片并把该彩信图片保存到本地电脑
- 令人郁闷的SQL问题
- 我使用shell_notifyicon函数使得正在运行的程序以小图标的形式显示在右下角的状态栏上,程序窗体被隐藏,怎样才能通过状态栏上的图标来关闭程序?
- 急 如何更改窗体的图标?
- 请教:为什么在picturebox中,它的底部有一部分不能显示出来?
- vb 中关于winsocket
- 大家好!我是VB处学者,我想做一个关于成语的连接的程序!请各位高手指教
示例中有 RetrieveData中
'参数vSign是取ComboBox
'型列中数据值时所用,如ComboBox中的
'显示内容为"Y-是",但要取"Y",则vSign为"-"
Public Function CellGetValue(ByVal vSpread As vaSpread, ByVal vRow As Integer, _
ByVal vCol As Integer, Optional ByVal vExtended As Boolean = False, _
Optional ByVal vSign As String = "") As Variant Dim nRow As Integer, nCol As Integer, nPos As Integer
If vRow < -1 Or vCol < -1 Then Exit Function
With vSpread
nRow = .Row
nCol = .Col
.Row = vRow
.Col = vCol
Select Case .CellType
Case eCellType.TYPE_DATE
If .Value = "" Then
CellGetValue = CDate("1990-01-01")
Else
CellGetValue = .Text
End If
Case eCellType.TYPE_EDIT, eCellType.TYPE_STATIC_TEXT
If .Value = "" Then
CellGetValue = ""
Else
CellGetValue = .Value
End If
Case eCellType.TYPE_FLOAT, eCellType.TYPE_INTEGER
If .Value = "" Then
If vExtended = True Then
CellGetValue = Null
Else
CellGetValue = 0
End If
Else
CellGetValue = .Value
End If
Case eCellType.TYPE_COMBOBOX
If vExtended Then
'CellGetValue = IIf(.Value = "", -1, .Value)
nPos = InStr(1, .Text, vSign)
If nPos <= 1 Then nPos = 2
CellGetValue = Mid(.Text, 1, nPos - 1)
Else
CellGetValue = .Text
End If
Case eCellType.TYPE_BUTTON, eCellType.TYPE_CHECKBOX
If .Value = "" Then
CellGetValue = -1
Else
CellGetValue = .Value
End If
Case eCellType.TYPE_TIME
CellGetValue = .Text
Case eCellType.TYPE_PIC, eCellType.TYPE_PICTURE, eCellType.TYPE_OWNER_DRAWN
Case Else
CellGetValue = .Value
End Select
End With
End Function