Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Any ideas on what is wrong with this? It fails after the last ”end if”. Thanks.
SUB SetSKU
vSKUCount = ActiveDocument.Variables("vSKUCount1").GetContent.string
vSKUDescCount =ActiveDocument.Variables("vSKUDescCount1").GetContent.string
set f = ActiveDocument.Fields("SKUToggle")
if vSKUCount = 1 or vSKUDescCount = 1 then
f.Select "Selected SKU"
else
if vSKUCount > 1 or vSKUDescCount > 1 then
f.Select "Multiple SKUs"
else
if vSKUCount = 0 or vSKUDescCount = 0 then
f.Select "All SKUs"
end if
end if
end if
Call CreateSetAnalysis
END SUB
Hi
I don't see anything wrong with your if/end if statements, although I suggest that you indent the code to more easily keep track of the if/end ifs.
But are you sure that it is the error is happening at the end if and not the call statement below. I would comment the call out and see if the error still occurs.
Regards
Jonathan
Hi
I don't see anything wrong with your if/end if statements, although I suggest that you indent the code to more easily keep track of the if/end ifs.
But are you sure that it is the error is happening at the end if and not the call statement below. I would comment the call out and see if the error still occurs.
Regards
Jonathan