B
Bill Sturdevant
In Access 2007, I create an Excel 2007 spreadsheet. I am successfully able
to add comments to cells with this code:
xlsheet.Cells(J, I + 1).Interior.ColorIndex = 4
xlsheet.Cells(J, I + 1).AddComment "Blah blah blah."
xlsheet.Cells(J, I + 1).Comment.Visible = False
I am successfully able to control the font properties of those comments with
this code:
For Each x In xlsheet.Comments
With x.Shape.TextFrame.Characters.Font
.Name = "Calibri"
.Size = 8
.Bold = False
End With
Next x
But, how do I control the SIZE of the comment boxes?
I have tried this code:
xlsheet.Cells(J, I + 1).Select
Selection.ShapeRange.ScaleHeight 2, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 2, msoFalse, msoScaleFromTopLeft
But, it fails with "Runtime error 438: Object doesn't support this property
or method".
I have references to Excel 12.0 and Office 12.0 in my Access ACCDB.
to add comments to cells with this code:
xlsheet.Cells(J, I + 1).Interior.ColorIndex = 4
xlsheet.Cells(J, I + 1).AddComment "Blah blah blah."
xlsheet.Cells(J, I + 1).Comment.Visible = False
I am successfully able to control the font properties of those comments with
this code:
For Each x In xlsheet.Comments
With x.Shape.TextFrame.Characters.Font
.Name = "Calibri"
.Size = 8
.Bold = False
End With
Next x
But, how do I control the SIZE of the comment boxes?
I have tried this code:
xlsheet.Cells(J, I + 1).Select
Selection.ShapeRange.ScaleHeight 2, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 2, msoFalse, msoScaleFromTopLeft
But, it fails with "Runtime error 438: Object doesn't support this property
or method".
I have references to Excel 12.0 and Office 12.0 in my Access ACCDB.