Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Resize commentbox in VB

tHenks Jacob!

"Jacob Skaria" wrote:

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apply CommentBox to objects? CLR Excel Programming 9 March 1st 07 08:24 PM
My CommentBox is Visible Afterwards JimMay Excel Programming 2 June 17th 06 05:36 PM
I could NOT resize the axis title but excel allows me to resize gr Iwan Setiyono Ko Charts and Charting in Excel 4 June 6th 06 04:46 AM
RESIZE PROPERTY: is it possible to resize "up" and "to the left"? Myles[_57_] Excel Programming 1 March 22nd 06 04:57 AM
I could NOT resize the axis title but excel allows me to resize gr Iwan Setiyono Ko Charts and Charting in Excel 0 March 15th 06 10:34 AM


All times are GMT +1. The time now is 12:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"