标题:cdata该怎么定义?
取消只看楼主
linfeng5329
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2007-9-6
 问题点数:0 回复次数:0 
cdata该怎么定义?

Option Explicit
Dim appexcel As New Excel.Application

Private Sub Command1_Click()
Dim icol As Integer, irow As Integer
Dim wsheet As Worksheet
Dim wbook As Workbook

Set wbook = appexcel.Workbooks.Add
Set wsheet = appexcel.Sheets(1)
wsheet.Cells(1, 1).Value = "1st Quarter"
wsheet.Cells(2, 2).Value = "2nd Quarter"
appexcel.Visible = True
wsheet.SaveAs "c:\test.xls"
appexcel.Quit

appexcel.Range("A2:E3").Select
Set cdata = appexcel.Selection
For icol = 1 To 5
For irow = 1 To 2
Text1.Text = Text1.Text & Chr(9) & cdata(irow, icol)
Next
Text1.Text = Text1.Text & vbCrLf
Next
End Sub

运行就说变量未定义
cdata 该怎么定义?

[此贴子已经被作者于2007-9-9 10:35:09编辑过]

搜索更多相关主题的帖子: cdata 定义 
2007-09-09 10:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-168695-1-1.html




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

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