返回列表 上一主題 發帖

[分享] 在 win 7 (x64) 中 rows 與 columns 的最大值

[分享] 在 win 7 (x64) 中 rows 與 columns 的最大值

Sub 欄列最大值測試()
    Dim rows_count As Long
    Dim column As Long
    rows_count = ActiveSheet.Rows.Count           ' rows_count = 1048576
    column_count = ActiveSheet.Columns.Count  ' column_count = 16384
End Sub

執行後會看到 rows_count = 1048576 不是65536,而column_count 的值是:16384
以上值是在Win 7 (x64)下顯示出來的, rows_count 一定要設定成 Long 才不會出錯.
V98

office版本的差異,非關作業系統。
office2007的Excel 是1048576列*16384欄
在這之前是65536列*256欄

TOP

謝謝凸槌前輩,我以為是(X64)的關係,謝謝!!
V98

TOP

        靜思自在 : 發脾氣是短暫的發瘋。
返回列表 上一主題