Excel 上で VBA マクロを実行すると「実行時エラー '91'」が発生するのはなぜですか?
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 11 Mai 2012
Bearbeitet: MathWorks Support Team
am 14 Aug. 2015
次のコマンドをExcelのVBAマクロで実行すると、エラーが発生します。
Dim Matlab As Object
Dim server_version As String
Matlab = CreateObject("matlab.application")
server_version = Matlab.Execute("version")
実行時エラー '91':
オブジェクト変数または With ブロック変数が設定されていません。
Akzeptierte Antwort
MathWorks Support Team
am 14 Aug. 2015
上記コードは VB コードのため、発生しています。Excel の VBA マクロを実行する場合は、Set コマンドが必要です。
Set MatLab = CreateObject("Matlab.Application")
0 Kommentare
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!