返回狼盟编程首页
编程搜索 [狼盟旧档]
论坛统计


请输入搜索关键字:
├─◆ 狼盟首页 > 查看贴子 > 详细信息

楼主

VB6开发EXCEL应用


用VB6开发Excel应用:Dim XLsheet As Object

Set XLsheet=GetObject("C:discount.xls")

XLsheet.Application.Visible=True

XLsheet.Cells(3,3)=Text1.Text ,运行到该语句时,Text1.Text的值无法付给Excel,为何?请大侠指点,谢谢!







万木春 [ 1 楼 ]
2003-01-16 15:09:00
试试以下代码:
Set XLsheet = CreateObject("Excel.Application")
    XLsheet.Workbooks.Open "D:discount.xls"
    XLsheet.Visible = True
XLsheet.Worksheets(1).Range("B2").formulaR1C1 = Text1.Text 

八蒂 [ 2 楼 ]
2003-01-16 20:38:00
谢谢大侠!问题解决了!