| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 864 人关注过本帖
标题:runtime erroe: 1004 application defined or object defined error
取消只看楼主 加入收藏
milkar
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-10-13
收藏
 问题点数:0 回复次数:1 
runtime erroe: 1004 application defined or object defined error
运行 下列程序段出现的错误:

Private Sub CommandButtonItem1_Click()
Dim item As Long
Dim rowInQuotationsheetBegin As Long
Dim rowInQuotationsheetEnd As Long

item = Worksheets("Sheet1").TextBoxItem1.Value


For i = 8 To 4000

If item = Worksheets("all").Cells(i, 6).Value Then
rowInQuotationsheetBegin = i
For j = i + 1 To i + 20

If Worksheets("all").Cells(j, 5).Value = "ITEM NO." Then
rowInQuotationsheetEnd = j - 1
Sheets("all").Select
Application.CutCopyMode = False
Rows("8:23").Select
'Rows([rowInQuotationsheetBegin : rowInQuotationsheetEnd]).Select
Selection.Copy
Sheets("QUOTATIONSHEET").Select
ActiveSheet.Paste
End If
Next j

End If

Next i

End Sub

还有我设了Dim rowInQuotationsheetBegin As Long
Dim rowInQuotationsheetEnd As Long来进行copy的动作但是rows或range要怎样应用变量名呢?

谢谢。
搜索更多相关主题的帖子: object defined application erroe 
2007-10-19 07:11
milkar
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2007-10-13
收藏
得分:0 
ding zi ding

2007-10-19 14:14
快速回复:runtime erroe: 1004 application defined or object defined error
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029588 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved