LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Adding Comment and AutoSizing

I am having problems getting this to work. Anyone have an idea

If I use the code as written, I get a Run-Time error '1004': Application-defined or object-defined error
Once I remove the line to AutoSize, it works just fine

If I use the Range(ErrorCellAddress) lines, I get a Run-Time error '91': Object variable or With block variable not set
Once I remove the line to AutoSize, it works just fine

Please help!!!

Private Sub Process_CoBn_Click(
Dim WS As Workshee
Set WS = ActiveWorkbook.ActiveShee

If ErrorList_LtBx.ListCount = 0 The
Exit Su
Els
If Not Range(ErrorCellAddress).Comment Is Nothing Then Range(ErrorCellAddress).Comment.Delet

' Range(ErrorCellAddress).Comment.Shape.TextFrame.Au toSize = Tru
' Range(ErrorCellAddress).AddComment ErrorList_LtBx.List(0, 0

With W
.Cells.Range(ErrorCellAddress).AddComment ErrorList_LtBx.List(0, 0) & Chr(13
.Cells.Range(ErrorCellAddress).AddComment.Shape.Te xtFrame.AutoSize = Tru
End Wit
End I
End Sub
 
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
Autosizing Text Box (and more) Risky Dave Excel Discussion (Misc queries) 0 January 31st 07 01:45 PM
Autosizing labels in Excel 97 Striker475 New Users to Excel 5 November 11th 05 12:02 AM
Autosizing labels Excel 97 Striker475 Excel Discussion (Misc queries) 2 November 10th 05 02:50 AM
Adding a comment to a cell mancitmis New Users to Excel 2 November 3rd 05 08:52 AM
AutoSizing TextBox Price Excel Programming 1 November 12th 03 04:57 PM


All times are GMT +1. The time now is 03:07 AM.

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

About Us

"It's about Microsoft Excel"