VBA代码range出现方法range作用于对象global时失败如何处理?
求大神帮忙哦!卡了好几天了!新人小白!(q305990996)Sub开单计算汇总保存保存练习3()OnErrorGoTo100DimcsAsRange,a%IfSheet...
求大神帮忙哦!卡了好几天了!新人小白!(q305990996)Sub 开单计算汇总保存保存练习3()On Error GoTo 100Dim cs As Range, a%If Sheet2.[f:f].Find([b2]) = Sheet1.[b2] ThenMsgBox "数据已经保存过了"Else100:Set cs = Sheet2.Cells.Find("*", , xlFormulas, , , xlPrevious)a = Application.CountA(Sheet2.[a:a])If cs.Row = 4 Then MsgBox "没有填写内容": EndRange([a4], cs).Copy Sheet2.Cells(a + 1, 1)Sheet2.Cells(a + 1, "f").resize(cs.Row - 3) = Sheet1.[b2]Sheet2.Cells(a + 1, "g").resize(cs.Row - 3) = Sheet1.[e2]Sheet2.Cells(a + 1, "h").resize(cs.Row - 3) = Now()MsgBox "保存成功"End IfEnd Sub
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询