Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am trying to add a comment to a subtotal showing what is included. The macro goes through a loop, adding to the comment string runningmessage = "The following tiers are included in this subtotal:" + vbC runningmessage = runningmessage + subtotmessage(counters) + vbC But after the adding the comment, the data displays horizontally instead of showing the carriage return. This is the code for the comment addition 'Commen Cells(8, checker + 5).AddCommen Cells(8, checker + 5).Comment.Visible = Fals Cells(8, checker + 5).Comment.Shape.TextFrame.AutoSize = Tru Cells(8, checker + 5).Comment.Text Text:=runningmessag Thanks for any help you can give me |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try vbLf?
"dumbass" wrote in message ... Hi- I am trying to add a comment to a subtotal showing what is included. The macro goes through a loop, adding to the comment string: runningmessage = "The following tiers are included in this subtotal:" + vbCr runningmessage = runningmessage + subtotmessage(counters) + vbCr But after the adding the comment, the data displays horizontally instead of showing the carriage return. This is the code for the comment addition: 'Comment Cells(8, checker + 5).AddComment Cells(8, checker + 5).Comment.Visible = False Cells(8, checker + 5).Comment.Shape.TextFrame.AutoSize = True Cells(8, checker + 5).Comment.Text Text:=runningmessage Thanks for any help you can give me! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Try replacing the constant vbCR with vbLF Cheers Andy dumbass wrote: Hi- I am trying to add a comment to a subtotal showing what is included. The macro goes through a loop, adding to the comment string: runningmessage = "The following tiers are included in this subtotal:" + vbCr runningmessage = runningmessage + subtotmessage(counters) + vbCr But after the adding the comment, the data displays horizontally instead of showing the carriage return. This is the code for the comment addition: 'Comment Cells(8, checker + 5).AddComment Cells(8, checker + 5).Comment.Visible = False Cells(8, checker + 5).Comment.Shape.TextFrame.AutoSize = True Cells(8, checker + 5).Comment.Text Text:=runningmessage Thanks for any help you can give me! -- Andy Pope, Microsoft MVP - Excel http://www.andypope.info |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Replace "+" with "&"
vbCR with CHR(10) runningmessage = "The following tiers are included in this subtotal:" & CHR(10) runningmessage = runningmessage + subtotmessage(counters) & CHR(10) hth -- steveB (Remove 'NOSPAM' from email address if contacting me direct) "dumbass" wrote in message ... Hi- I am trying to add a comment to a subtotal showing what is included. The macro goes through a loop, adding to the comment string: runningmessage = "The following tiers are included in this subtotal:" + vbCr runningmessage = runningmessage + subtotmessage(counters) + vbCr But after the adding the comment, the data displays horizontally instead of showing the carriage return. This is the code for the comment addition: 'Comment Cells(8, checker + 5).AddComment Cells(8, checker + 5).Comment.Visible = False Cells(8, checker + 5).Comment.Shape.TextFrame.AutoSize = True Cells(8, checker + 5).Comment.Text Text:=runningmessage Thanks for any help you can give me! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Carriage return | Excel Discussion (Misc queries) | |||
program carriage return | Excel Discussion (Misc queries) | |||
Carriage Return | Excel Worksheet Functions | |||
carriage return code | Setting up and Configuration of Excel | |||
Carriage Return | Excel Programming |