Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to clear all of the input box items in the attached *.qvw using VB script and the "Clear Input Values" button. For some reason my code is only clearing out the top two items. Anyone know what I'm missing to clear all of the items out?
thanks,
rob
Hi Rob,
Try following:
sub input_clr
'Clear All input boxes
set ClearAllib = ActiveDocument.GetSheetObject("IB01")
for i = 1 to ClearAllib.GetNoOfRows
ClearAllib.SetVariableContent i-1,"",true
next
end sub
Thanks
Hi Rob,
Try following:
sub input_clr
'Clear All input boxes
set ClearAllib = ActiveDocument.GetSheetObject("IB01")
for i = 1 to ClearAllib.GetNoOfRows
ClearAllib.SetVariableContent i-1,"",true
next
end sub
Thanks
Do you not just need it to be:
sub
input_clr
'Clear All input boxes
set
ClearAllib = ActiveDocument.GetSheetObject("IB01"
)
""
,
true
""
,true
""
,true
""
,true
""
,true
' ActiveDocument.ClearAll false
end
Regards,
Gordon
sub
That came out well! Should have read:
sub input_clr
'Clear All input boxes
set ClearAllib = ActiveDocument.GetSheetObject("IB01")
ClearAllib.SetVariableContent 0,"",true
ClearAllib.SetVariableContent 1,"",true
ClearAllib.SetVariableContent 2,"",true
ClearAllib.SetVariableContent 3,"",true
ClearAllib.SetVariableContent 4,"",true
' ActiveDocument.ClearAll false
end sub
Thanks Rakesh. That did the trick.
rob
Gordon,
That also worked. Thanks.
rob