Hello,
I normally can find an answer to any problems I have on my own, but this one just bothers me.
I am using a UserForm to compare two Worksheets with current and new data. The UserForm displays the value of cell A1 from WorkBook1 in a Label on the Form, and displays the value of cell A1 from WorkBook2 in another Label on the Form. The UserForm then allows me to keep the current value for the cell, replace it with the new value, or edit the value from either. It works great.
The problem:
A lot of the cells have line breaks in them (Alt+Enter). They show up fine in the Labels on the Form. When these cell values are replaced by the Label.Caption, the end of each line has some strange character added. One of those box characters for when there is no correct character. Like [].
So for a cell it might look like:
11/22/05[]
11/23/05[]
9/17/05[]
11/19/05 (the last line never has it)
Thoughts?
I normally can find an answer to any problems I have on my own, but this one just bothers me.
I am using a UserForm to compare two Worksheets with current and new data. The UserForm displays the value of cell A1 from WorkBook1 in a Label on the Form, and displays the value of cell A1 from WorkBook2 in another Label on the Form. The UserForm then allows me to keep the current value for the cell, replace it with the new value, or edit the value from either. It works great.
The problem:
A lot of the cells have line breaks in them (Alt+Enter). They show up fine in the Labels on the Form. When these cell values are replaced by the Label.Caption, the end of each line has some strange character added. One of those box characters for when there is no correct character. Like [].
Code:
'Sets the Label as the value of the new WorkBook cell
ChangesLabel.Caption = UpdateVersion.Sheets(1).Cells(x, y).Value
.
.
.
'A button press initiates this, which sets the current WorkBook cell to the value of the Label caption:
CurrentVersion.Sheets(1).Cells(StartRow, StartColumn).Value = ChangesLabel.Caption
'The code then checks the whole worksheet for other changes in cell values
11/22/05[]
11/23/05[]
9/17/05[]
11/19/05 (the last line never has it)
Thoughts?