I have written code for getting the host names from host group using quality center api. I am getting all hostgroup names from hostgroup factory. but I am unable to get host names from the host group. I am getting error message invalid data type. Please let me know how can I get host names from the host group,

Set HostGroupFact = TDConnection.HostGroupFactory
Set HostGroupList = HostGroupFact.NewList("")

msgbox HostGroupList.count

Set HostGroup = HostGroupList.Item(1)

msgbox HostGroup.Name

result = HostGroup.NewList("")