1
我有以下SPSS代碼在我的劇本;通知進度用戶在SPSS
MsgBox "Progressing"
For iCaseCount = 1 To iNumberOfCases
'my code here
Next
我想刪除MsgBox並將'it'放置在循環中並替換它的內容; 「進步記載:」 & & iNumberOfCases
有沒有什麼方法可以達到我想要的東西「的」?
我有以下SPSS代碼在我的劇本;通知進度用戶在SPSS
MsgBox "Progressing"
For iCaseCount = 1 To iNumberOfCases
'my code here
Next
我想刪除MsgBox並將'it'放置在循環中並替換它的內容; 「進步記載:」 & & iNumberOfCases
有沒有什麼方法可以達到我想要的東西「的」?
我終於找到一種方式來顯示通過Internet Explorer的進展。
下面是VB腳本代碼。
Dim objExplorer
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.navigate "about:blank" : objExplorer.Width = 350 : objExplorer.Height = 80 : objExplorer.toolbar = False : objExplorer.menubar = False : objExplorer.statusbar = False : objExplorer.Visible = True
For iCaseCount = 1 To iNumberOfCases
DisplayProgress(objExplorer, iCaseCount, iNumberOfCases)
'my code here
Next
objExplorer.Quit
Set objExplorer = Nothing
方法來顯示進度
Sub DisplayProgress(ByVal x As Object, ByVal stage As Long, ByVal total As Long)
'in code, the colon acts as a line feed
x.Refresh
x.document.write "<font color=black face=Arial>"
x.document.write "Processing record " & stage & " of " & total
x.document.write "</font>"
End Sub