Foxtable(狐表)用户栏目专家坐堂 → 在操作excel vba时出现:异常来自 HRESULT:0x800A03EC


  共有2842人关注过本帖树形打印复制链接

主题:在操作excel vba时出现:异常来自 HRESULT:0x800A03EC

帅哥哟,离线,有人找我吗?
cnsjroom
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1571 积分:11238 威望:0 精华:0 注册:2021/1/17 17:06:00
在操作excel vba时出现:异常来自 HRESULT:0x800A03EC  发帖心情 Post By:2021/6/19 14:11:00 [只看该作者]

.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.5.29.8
错误所在事件:窗口,窗口1,切换空值,Click
详细错误信息:
异常来自 HRESULT:0x800A03EC


代码:
Dim t3 As WinForm.TextBox = e.Form.Controls("TextBox3")
Dim t4 As WinForm.TextBox = e.Form.Controls("TextBox4")
Dim t5 As WinForm.TextBox = e.Form.Controls("TextBox5")
Dim t6 As WinForm.TextBox = e.Form.Controls("TextBox6")
Dim App As New MSExcel.Application
For Each File As String In FileSys.GetFiles(t5.value)
    MessageBox.Show(file)
    Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(file)
    Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
    Dim Rg As MSExcel.Range = Ws.Cells(t3.value,t4.value).offset(-1)
    Rg.Value = t6.value
    MessageBox.Show(t6.value)
    App.Visible = False
    wb.save
    App.Quit
    Output.Show(File)
    Dim tx As WinForm.TextBox = e.Form.Controls("TextBox1")
    tx.text = FileSys.Getname(file)
Next

麻烦老师看看是不是红色部分有问题呢

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:106629 积分:542322 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/6/19 14:59:00 [只看该作者]

Dim Rg As MSExcel.Range = Ws.Cells(cint(t3.value),cint(t4.value)).offset(-1)

 回到顶部