Option explicit
Dim dico, i, sn, m, lm, tot
'Here i for loop
' sn for subject name
' m for marks
' lm
for list of marks
' tot for total
'Create dictionary object and add pairs of data
Set dico=CreateObject("Scripting.Dictionary")
For i=1 to 5 step 1
sn=inputbox("Enter
Subject Name : ")
m=inputbox("Enter
Marks : ")
dico.Add
sn,m
Next
'Find total marks in that dictionary
tot=0
lm=dico.Items
For each m in lm
tot=tot+m
Next
Print("Total Marks is :"&tot)
Set dico=nothing