我想制作一些数组函数来帮助我创建报告,假设我有数字= 4然后我打算让它成为1,2,3,4然后最后这些数字将被转换为"1月","2月" ,"三月四月".我试图创建这个功能,但没有任何作用.
Function numtomonth(num As Integer)
r As Long
a As Integer
h As Long
For a = 1 To num
r(a) = a
If r = 1 Then r = "January"
If r = 2 Then r = "February"
If r = 3 Then r = "March"
If r = 4 Then r = "April"
If r = 5 Then r = "May"
If r = 6 Then r = "June"
If r = 7 Then r = …Run Code Online (Sandbox Code Playgroud)