Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have a macro that runs on open document. When i open an original qvw on the server - the macro works fine it calculates everything what i need but if i put the file in production and open it as a user i get the error Macro parse failed functionality was lost. Type mismatch :String(see atached example). Any ideas why it is not working on a user side?
Here is my code:
Sub GetValues
Set TableBox = ActiveDocument.GetSheetObject("CH28")
dim sumA
dim CountA
idA=0
sumA=0
CountA=0
for RowIter = 1 to TableBox.GetRowCount-1
set cell = TableBox.GetCell(RowIter,2)
set cell7=TableBox.GetCell(RowIter,3)
if cell7.text="A" THEN
sumA=sumA+cell.text
CountA=CountA+1
idA="A"
end if
next
set v = ActiveDocument.Variables("vAsum")
v.SetContent sumA,true
set v = ActiveDocument.Variables("vAcount")
v.SetContent CountA,true
set v = ActiveDocument.Variables("vAid")
v.SetContent idA,true
dim sumB
dim CountB
sumB=0
CountB=0
for RowIter = 1 to TableBox.GetRowCount-1
set cell = TableBox.GetCell(RowIter,2)
set cell7=TableBox.GetCell(RowIter,3)
if cell7.text="B" THEN
sumB=sumB+cell.text
CountB=CountB+1
end if
next
set v = ActiveDocument.Variables("vBsum")
v.SetContent sumB,true
set v = ActiveDocument.Variables("vBcount")
v.SetContent CountB,true
dim sumC
dim CountC
sumC=0
CountC=0
for RowIter = 1 to TableBox.GetRowCount-1
set cell = TableBox.GetCell(RowIter,2)
set cell7=TableBox.GetCell(RowIter,3)
if cell7.text="C" THEN
sumC=sumC+cell.text
CountC=CountC+1
end if
next
set v = ActiveDocument.Variables("vCsum")
v.SetContent sumC,true
set v = ActiveDocument.Variables("vCcount")
v.SetContent CountC,true
End Sub
jja
Vaishali
When you say downloading VBSedit, what is that?