最近,我将我的项目提交到Swift3.0。并修复Xcode8.0上的升级问题。一些奇怪的警告信息显示在Xcode7中没有发生。
Sub Columns2ToRows()
Dim arData()
Dim colCount As Long, x As Long
colCount = Columns(Columns.Count).End(xlToLeft).Column
ReDim arData(0)
For x = 1 To colCount Step 2
ReDim Preserve arData(Int(x / 2))
arData(Int(x / 2)) = Array(Cells(1, x).Value, Cells(1, x + 1).Value)
Next
Rows(1).ClearContents
arData = Application.Transpose(arData)
arData = Application.Transpose(arData)
Range("A1").Resize(UBound(arData), 2) = arData
End Sub
任何专家都知道如何修复它?先谢谢你。