Excel file handling

I want to create an excel file and save it with some data from Notes documents.In that excel file there is “Combo-box”(in cell say “E7”) which will pick values from some other cells (for eg. A1:A3).I created an object and wrote code to create this combo-box.But it is giving me error as (OLE: Automation Object Error)when I run this code.

I’m creating the object as follows


Set xlApp = CreateObject(“Excel.Application”)


Following are the code lines giving errors


With xlsheet.Range(“E7”).Validation

.Add xlValidateList, xlValidAlertStop, xlBetween, “=$A$1:$A$3”

	.InCellDropdown = True

End With


This “Validation” object is giving problem.Is this due to some version of Excel object at declaration time.

Pl.help me.

Thanks

Subject: Excel file handling

Hi Susan and all

Thanks for the solution for the last problem.I have one more requirement.I want to have this ‘List’ as ‘multiselect’.User should be able to select mulitple values from the list.

Thanks

Subject: Excel file handling

try to change …

.Add xlValidateList,xlValidAlertStop, xlBetween, "

with .Add 3,1,1, because they are excel constant …

Bye

Subject: RE: Excel file handling

Thanks a ton Susan,

Your solution worked fine and it really reduced my work a lot.

Thanks again…