在往excel的单元格里插数据时,如果字数过多,怎样控制单元格内的内容会自动换行?50分!!谢谢!

解决方案 »

  1.   

    把A1设为自动换行:    Range("A1").Select
        With Selection
            .HorizontalAlignment = xlGeneral
            .VerticalAlignment = xlCenter
            .WrapText = True          '这里就是自动换行了
            .Orientation = 0
            .AddIndent = False
            .IndentLevel = 0
            .ShrinkToFit = False
            .ReadingOrder = xlContext
            .MergeCells = False
        End With