| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 517 人关注过本帖
标题: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
快速回复:cdata该怎么定义?
数据加载中...
 
   



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

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