Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在为一堆列创建列标题。我想像下面那样做它们 - 但我无法正确使用语法。任何人都可以帮忙吗?
Range("AB1:AE1").Value = ("UnitPriceUSD","TotalCostUSD","UnitPrice", "TotalCost")
试试这个。
Dim arr As Variant arr = Array("UnitPriceUSD", "TotalCostUSD", "UnitPrice", "TotalCost") Range("AB1:AE1").Value = arr
或者更简单:
Range("AB1:AE1").Value = Array("UnitPriceUSD", "TotalCostUSD", "UnitPrice", "TotalCost")