- 帖子
- 248
- 主題
- 55
- 精華
- 0
- 積分
- 314
- 點名
- 117
- 作業系統
- XP / WIN7
- 軟體版本
- 2003 / 2007
- 閱讀權限
- 20
- 性別
- 男
- 來自
- Tainan
- 註冊時間
- 2013-10-18
- 最後登錄
- 2025-6-15
            
|
[發問] 執行階段錯誤-2147417848(80010108) Automation錯誤
本帖最後由 li_hsien 於 2015-4-22 13:48 編輯
小弟使用Excel 2003執行下方語法 發生執行階段錯誤-2147417848(80010108) Automation錯誤
以下語法是資料驗證使用下拉清單的操作-
- final_substance = Worksheets("Temp_Substance").Range("A65536").End(xlUp).Row
- '建立Substance下拉選單
- With Worksheets("規格比對表").Range("E4:E" & Range("C65536").End(xlUp).Row).Validation
- .Delete
- .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
- xlBetween, Formula1:="=INDIRECT(""Temp_Substance!$A2:$A" & final_substance & """)"
- .IgnoreBlank = True
- .InCellDropdown = True
- .InputTitle = ""
- .ErrorTitle = ""
- .InputMessage = ""
- .ErrorMessage = "請以下拉選單方式選取"
- .IMEMode = xlIMEModeNoControl
- .ShowInput = True
- .ShowError = True
- End With
複製代碼 錯在這一行
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=INDIRECT(""Temp_Substance!$A2:$A" & final_substance & """)"
在Excel 2007執行沒有問題
但在Excel 2003操作會發生下方錯誤
GOOLGE爬文了好久也找到一些方式
但都沒有解 困擾好久.....
請各位大大協助
感謝!!! |
|