You can do something like this:
Code:
$forumid = X; // set to forumid
$active = 0; // set to 0 or 1
$open = 0; // set to 0 or 1
$forumdata =& datamanager_init('Forum', $vbulletin, ERRTYPE_CP);
$forumdata->set_existing($vbulletin->forumcache[$forumid]);
$forumdata->set_bitfield('options', 'active', $active);
$forumdata->set_bitfield('options', 'open', $open);
$forumdata->save();