【发布时间】:2016-08-03 07:30:13
【问题描述】:
我已经解决了这个问题:
我有数组:
weatherList = Array("rainy", "dry")
cityList = Array("Mumbai", "Delhi", "Goa", "Varanasi")
但现在我要求包含所有城市,而不是仅数组中的 4 个,我不知道如何将它们全部包含在内?
tab = "countryMap"
For Each city In cityList
For Each weather In weatherList
count = count + 1
ReDim Preserve commandList(UBound(commandList) + 1)
commandList(UBound(commandList)) = """" & tabcmdPath & """ export --pagesize a4 --pagelayout landscape """ & workbook & "/" & tab & "?Weather=" & weather & "&Route" & city & """ --pdf -f """ & workbook & "\" & count & ".pdf"""
ReDim Preserve fileList(UBound(fileList) + 1)
fileList(UBound(fileList)) = workbook & "\" & count & ".pdf"
Next
Next
请求是遍历每个城市并列出天气,然后将其创建为 pdf 输出。但是印度有很多大城市,我无法在数组中手动定义它们,有时我会得到有关天气和其他条件的信息,有时却没有?
有人可以帮我解决这个问题吗?
谢谢, 马里哈
【问题讨论】:
标签: arrays vb.net vba dynamic vbscript