varkind()
public
Returns the number which represents variable kind.
tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
variables = tobj.variables
variables.each do |variable|
puts "#{variable.name} #{variable.varkind}"
end
The result of above script is following:
xlChart 2
xlDialogSheet 2
xlExcel4IntlMacroSheet 2
xlExcel4MacroSheet 2
xlWorksheet 2
Show source
/*
* call-seq:
* WIN32OLE_VARIABLE#varkind
*
* Returns the number which represents variable kind.
* tobj = WIN32OLE_TYPE.new('Microsoft Excel 9.0 Object Library', 'XlSheetType')
* variables = tobj.variables
* variables.each do |variable|
* puts "#{variable.name} #{variable.varkind}"
* end
*
* The result of above script is following:
* xlChart 2
* xlDialogSheet 2
* xlExcel4IntlMacroSheet 2
* xlExcel4MacroSheet 2
* xlWorksheet 2
*/
static VALUE
folevariable_varkind(self)
VALUE self;
{
struct olevariabledata *pvar;
Data_Get_Struct(self, struct olevariabledata, pvar);
return ole_variable_varkind(pvar->pTypeInfo, pvar->index);
}