Home>

The environment is Windows 7 Pro SP1, Office 365 ProPlus.

In EXCEL VBA, the following code to display the characters in the cell with line breaks is displayed.
Even if I execute it, the line is not broken, but when I double-click the corresponding cell
A line break is displayed.

I'd like to have a line break even if I don't double-click the cell.
What should I do now?

Range ("A1"). Value = "AAA"&vbLf&"BBB"

I tried the following, but the phenomenon did not change.

1. Add Application.DoubleClick method

Range ("A1"). Activate
Application.DoubleClick

2. Put the cell in edit mode with SendKey

Range ("A1"). Activate
SendKeys "{F2}"