コメントの枠を自動サイズ調整にしていても


↑htmlで保存すると表示ウインドウの33%になってしまう

↑のようにしたい時
ソースファイルの上の方
if (msoBrowserCheck()) {
document.styleSheets.dynCom.addRule(".msocomspan1","position:absolute");
document.styleSheets.dynCom.addRule(".msocomspan2","position:absolute");
document.styleSheets.dynCom.addRule(".msocomspan2","left:-1.5ex");
document.styleSheets.dynCom.addRule(".msocomspan2","width:2ex");
document.styleSheets.dynCom.addRule(".msocomspan2","height:0.5em");
document.styleSheets.dynCom.addRule(".msocomanch","font-size:0.5em");
document.styleSheets.dynCom.addRule(".msocomanch","color:red");
document.styleSheets.dynCom.addRule(".msocomhide","display: none");
document.styleSheets.dynCom.addRule(".msocomtxt","visibility: hidden");
document.styleSheets.dynCom.addRule(".msocomtxt","position: absolute");
document.styleSheets.dynCom.addRule(".msocomtxt","top:-10000");
document.styleSheets.dynCom.addRule(".msocomtxt","left:-10000");
document.styleSheets.dynCom.addRule(".msocomtxt","width: 33%");
document.styleSheets.dynCom.addRule(".msocomtxt","background: infobackground");
document.styleSheets.dynCom.addRule(".msocomtxt","color: infotext");
document.styleSheets.dynCom.addRule(".msocomtxt","border-top: 1pt solid threedlightshadow");
document.styleSheets.dynCom.addRule(".msocomtxt","border-right: 2pt solid threedshadow");
document.styleSheets.dynCom.addRule(".msocomtxt","border-bottom: 2pt solid threedshadow");
document.styleSheets.dynCom.addRule(".msocomtxt","border-left: 1pt solid threedlightshadow");
document.styleSheets.dynCom.addRule(".msocomtxt","padding: 3pt 3pt 3pt 3pt");
document.styleSheets.dynCom.addRule(".msocomtxt","z-index: 100");
}
document.styleSheets.dynCom.addRule(".msocomtxt","width: 33%");
の一行消せば
↓内容に合わせて自動サイズ調整してくれます

|
Sub test02()
Dim lRow As Long
Dim i As Long
lRow = Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False
For i = lRow To 2 Step -1
If VarType(Cells(i, 1)) = vbEmpty Then
Range(i & ":" & i).Delete
End If
Next i
Application.ScreenUpdating = True
End Sub |