The following code is supposed to set the height of a comment and change the location of the top of the comment:
It sets the height just fine .... but the top won't change ... there seems to be some sort of Auto Locate property for comments that I can't find, because the .top and .left properties are always set to the same distance from the reference cell.Code:xlsChart.Cells(25, intIndex).Comment.Text strComment xlsChart.Cells(25, intIndex).Comment.Shape.Height = intHeight If (220 - (intHeight / 2)) > 1.5 Then xlsChart.Cells(25, intIndex).Comment.Shape.Top = Int(220 - (intHeight / 2)) Else xlsChart.Cells(25, intIndex).Comment.Shape.Top = 1.5 End If
Even if I move the comment in Edit mode, it still returns to the same position.
I have searched the web ... Comment.Shape.Top only returned ONE site when I searched ... it appears nobody bothers programming comments to this level of detail in excel ... believe me I didn't want to either ...




Reply With Quote