Tag: 用户inputinput

input框取消excel vba

这段代码复制一个excel数据块(Col A到Col BH),并提示用户select复制模板需要粘贴的行。 代码似乎工作得很好(随意清理/优化任何代码),我的问题是每当用户点击取消时,他们需要select行我得到一个错误“运行时错误13types不匹配”。 如果select取消,是否有结束macros? Sub CopyTemplate() Worksheets("HR-Calc").Activate Dim rng As Variant Dim trng As Range Dim tco As String Dim hi As String Dim de As String 'Use the InputBox select row to insert copied cells Set rng = Application.InputBox("select row to paste into", "Insert template location", Default:=ActiveCell.Address, Type:=8) startrow = rng.Row ' MsgBox […]