0
我試圖使用問題總結2點的值在Excel宏
Dim test1 As Variant, test2 As Variant
test1 = UsedRows.Offset(i, 25).Value
test2 = UsedRows.Offset(i, 26).Value
ActiveCell.Offset(0, 4).Value = test1 + test2
總結在宏兩個格但即時得到一個類型不匹配錯誤。如果我將值設置爲test1或者test2,它會起作用,但當我嘗試將它們添加在一起時會中斷(提供類型不匹配錯誤)。我周圍搜索,但無法找到解決方案
在IDE把斷點(F9)...'線和胡佛用鼠標在你的'test1'&'test2'變量,以檢查它們的值。這些價值是什麼? –