工作薄的某个工作表怎么表示?如工作薄为PriceList有两个工作表sheet1和sheet2.下面的代码第二行有错,Found为空值,事实上不是,什么原因呢?
Private Function GetPriceInt(PriceList As Worksheet, Item As Range)
Set Found = PriceList.Worksheets(1).Cells(1, 1).EntireColumn.Find(Item)
If Not Found Is Nothing Then
GetPriceInt = Found.Offset(0, 1)
Else
GetPriceInt = 0
End IfEnd Function
Private Function GetPriceInt(PriceList As Worksheet, Item As Range)
Set Found = PriceList.Worksheets(1).Cells(1, 1).EntireColumn.Find(Item)
If Not Found Is Nothing Then
GetPriceInt = Found.Offset(0, 1)
Else
GetPriceInt = 0
End IfEnd Function
解决方案 »
- 求免费数据库
- ■■■■ 怎么知道当前的打印任务已经结束呢? 在线等待,即解即结! ■■■■
- Activereport2.0报表格式修改的问题!!,求高手相助!!
- (老四提问)求教设计数据库的步骤和界面设计
- datagrid控件的问题,为什么会丢失最后修改的数据?
- VB如何调用标准模块里面的内容啊,最好简单易懂,我笨- -
- 如何使用DMO
- 百分相赠,datagrid查询
- ActiveReport 中如何显示中文?
- 把窗体的Borderstyle设为None,自己画控制栏,窗体最小化后如何还原???
- excel 插入行
- VB调用vc写的dll,调用函数要将一接口指针传递dll,传递参数过来的参数不对,不知为何,有知道者请告之,谢谢!
Set Found = PriceList.Worksheets(1).Cells(1, 1).EntireColumn.Find(Item)
If Not Found Is Nothing Then
GetPriceInt = Found.Offset(0, 1)
Else
GetPriceInt = 0
End If End Function
Private Function GetPriceInt(PriceList As Worksheet, Item As Range)'Private Function GetPriceInt(PriceList As WorkBook, Item As Range)
'工作本是 WorkBook. Worksheet 就是工作表.所以,后面的都错了,不用说了.
Set Found = PriceList.Worksheets(1).Cells(1, 1).EntireColumn.Find(Item)
If Not Found Is Nothing Then
GetPriceInt = Found.Offset(0, 1)
Else
GetPriceInt = 0
End If End Function