OLEObjects ComboBox (ActxServer Matlab Excel)

9 ビュー (過去 30 日間)
Arezki
Arezki 2014 年 7 月 2 日
回答済み: Arezki 2014 年 7 月 2 日
Hellow
How can i change the current selected item of an ComboBox in Excel by Matlab For example i have a CamboBox in Excel with 3 elements (a,b,c), the current selected element is "b" so i would like select the first Element "a" i tried this:
Excel=actxserver('Excel.application');
Excel.Application.DisplayAlerts=0;
File=Excel.Workbooks.Open('MyExcelFile');
Param=File.Sheets.Item('Param');
Param.OLEObjects.Item('ComboBox1').Object.List % to get the list of element
Param.OLEObjects.Item('ComboBox1').Object.Value % to get the current selected item
................................................ % how to select ather element of list?
Param.OLEObjects.Item('ComboBox1').Object.Value= 'b' % does'nt work
Thenk yo

採用された回答

Arezki
Arezki 2014 年 7 月 2 日
Param.OLEObjects.Item('ComboBox1').Object.Value= 'b'
It's work, i had just problem with Excel :)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by