以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 在操作excel vba时出现:异常来自 HRESULT:0x800A03EC (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=169520) |
-- 作者:cnsjroom -- 发布时间:2021/6/19 14:11:00 -- 在操作excel vba时出现:异常来自 HRESULT:0x800A03EC .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 麻烦老师看看是不是红色部分有问题呢 |
-- 作者:有点蓝 -- 发布时间:2021/6/19 14:59:00 -- Dim Rg As MSExcel.Range = Ws.Cells(cint(t3.value),cint(t4.value)).offset(-1) |