运行vba宏时出现编译错误。错误在线:
For Each workcell In Intersect(ws.UsedRange, ws.Columns(4)) 'Go down the
cells in Column D
If InStr(workcell.Value, ";") > 0 Then 'split
str = Split(workcell.Value, ";")
For r = LBound(str) To UBound(str)
If inStr(";" & Trim(str(r)) & ";") < 1 Then
if instr(";" & trim(str(r)) & ";") = 0 then
output = output & Trim(str(r)) & ";" 'Add the number and ";" to the end of the string
End If
Next r
Erase str 'Tidy up array, ready to recycle
End If
变量:
DrawText
代码:
TextRectForBounds