- 精华
- 活跃值
-
- 积分
- 3587
- 违规
-
- 印币
-
- 鲜花值
-
- 在线时间
- 小时
累计签到:13 天 连续签到:1 天
|
楼主 |
发表于 2022-8-11 08:47:01
|
显示全部楼层
Sub 单面重复不同份数1()
Dim arr() As String, arr1()
Dim a%, b, n, i, s1, n1, b1, s2, i1, e%
b = InputBox("请输入页数")
For i = 1 To b
a = InputBox("请输入第" & i & "页份数")
e = e + a
ReDim arr(1 To a)
For n = 1 To a
arr(n) = i
ReDim Preserve arr1(1 To e)
i1 = i1 + 1
arr1(i1) = arr(n)
Next n
Next i
s1 = Join(arr1)
Open "C:\Users\Administrator\Desktop\新建文件夹 (3)\33.txt" For Output As #4
Print #4, RTrim(s1)
Close #4
' s1 = Join(arr, " ")
' Open "C:\Users\Administrator\Desktop\单面向下1.txt" For Output As #4
'' For i1 = 1 To b
'' For n1 = 1 To a
'' s1 = arr(i1, n1)
'' s2 = Join(s1)
'' Print #4, arr(i1, n1)
'' Next n1
'' Next i1
'
' Close #4
End Sub
|
|