Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize commentbox in VB
How do I resize a comment box in VB?
When I record a macro I get : Range("C9").Select Range("C9").AddComment Range("C9").Comment.Visible = False Range("C9").Comment.Text Text:="Bladiblabla" Selection.ShapeRange.ScaleHeight 0.3, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleWidth 0.1, msoFalse, msoScaleFromTopLeft Running this code results in : Runtime error '438': Object doesn't support this property or method Anyone any idea? Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Resize commentbox in VB
Try
Sub AddComment() Dim ComBox As Comment On Error Resume Next Set ComBox = Range("C9").AddComment("Bladiblabla") On Error GoTo 0 If Not ComBox Is Nothing Then With ComBox ..Visible = False ..Shape.ScaleHeight 0.3, msoFalse, msoScaleFromTopLeft ..Shape.ScaleWidth 0.1, msoFalse, msoScaleFromTopLeft End With Set ComBox = Nothing End If End Sub -- Jacob (MVP - Excel) "Henk" wrote: How do I resize a comment box in VB? When I record a macro I get : Range("C9").Select Range("C9").AddComment Range("C9").Comment.Visible = False Range("C9").Comment.Text Text:="Bladiblabla" Selection.ShapeRange.ScaleHeight 0.3, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleWidth 0.1, msoFalse, msoScaleFromTopLeft Running this code results in : Runtime error '438': Object doesn't support this property or method Anyone any idea? Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Resize commentbox in VB | Excel Programming | |||
Apply CommentBox to objects? | Excel Programming | |||
My CommentBox is Visible Afterwards | Excel Programming | |||
I could NOT resize the axis title but excel allows me to resize gr | Charts and Charting in Excel | |||
I could NOT resize the axis title but excel allows me to resize gr | Charts and Charting in Excel |