logo
  • 教程列表
  • SO官方文檔
  • 分配帶有重複字元的字串
    • 使用 String 函式分配一個包含 n 個重複字元的字串
    • 使用 String 和 Space 函式分配 n 個字元的字串
  1. StackOverflow 文件
  2. VBA 教程
  3. 分配帶有重複字元的字串
  4. 使用 String 和 Space 函式分配 n 個字元的字串

使用 String 和 Space 函式分配 n 個字元的字串

Created: November-22, 2018

Dim stringOfSpaces As String

'Assign a string with 255 repeated spaces using Space$
stringOfSpaces = Space$(255)

'Assign a string with 255 repeated spaces using String$
stringOfSpaces = String$(255, " ")
  • 使用 String 函式分配一個包含 n 個重複字元的字串

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明