[英]Excel VBA - Calculate column width in inches
我正在嘗試確定以英寸為單位的列的寬度。 這個公式將寬度設置為5英寸,但我看不到C列的英寸寬...
Columns("D:D").ColumnWidth = Application.InchesToPoints(5) * (Columns("D:D").ColumnWidth / Columns("D:D").Width)
任何幫助表示贊賞。
將列寬除以Application.InchesToPoints(1)(基本上是72)。
MsgBox Columns("C").Width / Application.InchesToPoints(1)
“ Columnwidth”不是以磅為單位,“ Width”是以磅為單位。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.