Dim s As String s = String $( 255 , vbNullChar) Mid $(s, 1 , 5 ) = " 12345 " Mid $(s, 6 , 7 ) = " abcdefg " Debug.Print s Powered by barenx 对于vb来说string类型实质是oleString 在进行连接的时候都有再次分配内存 然后复制原字符串到新的内存块中,相比而言,预先分配好内存缓冲区然后写入串是性能最佳的方案