- 帖子
- 117
- 主題
- 34
- 精華
- 0
- 積分
- 155
- 點名
- 0
- 作業系統
- windows XP
- 軟體版本
- OFFICE 2010
- 閱讀權限
- 20
- 性別
- 男
- 註冊時間
- 2010-5-19
- 最後登錄
- 2025-11-17
|
6#
發表於 2011-6-24 11:36
| 只看該作者
回復 color790
1.完整宣告看看
2.A欄必須要有有效的股票代碼
Hsieh 發表於 2011-6-24 09:27 
在公司的電腦出現
使用者型態未定義----> MyIE As InternetExplorer
過幾天回家再試試看, 家裡是用XP, 公司是win7, 都是excel2010 (不知道有沒有關)
另外可以問一個小問題嗎??
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row = 1 Then
strtmp = Application.GetOpenFilename()
If strtmp = "False" Then Exit Sub
ActiveSheet.Pictures.Insert(strtmp).Select
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Height = 83
Selection.ShapeRange.Width = 162
End If
End Sub
這邊target 可以多個範圍嗎(不規則), 比如1,5,8,9......)
因為我打 If Target.Row = 1 or 3 怎麼變成全部的儲存格都會執行? |
|