advanced help
per page, with , order by , clip by
Results of 1 - 1 of about 14741 for VBA�������������� (0.003 sec.)
[[20140405035900]]
#score: 3407
@digest: dd3bd24102d66da9c9311ad5aa12098e
@id: 64866
@mdate: 2014-04-07T10:08:07Z
@size: 2683
@type: text/plain
#keywords: pictures (7498), 元vb (7380), 容:" (6721), mergearea (5452), 全エ (5223), 号:" (3532), 元画 (3324), ・← (2652), pic (2611), 像貼 (1909), lockaspectratio (1656), ー番 (1335), description (1279), fname (1267), activecell (1219), beforerightclick (1213), activesheet (1206), topleftcell (1137), msofalse (1134), 度コ (1126), 差分 (1106), msotrue (1101), 作さ (1046), picture (1036), insert (978), shaperange (881), 復元 (833), 問文 (808), 動作 (773), ー内 (730), 共に (618), const (601)
『2003の VBAを 2013でも 共に動作させたいのです』(kaze)
2003の画像貼り付けを 2010、2013共に動作させる 共通のVBAに変更したいのですが よろしくお願いします。 Set Pic = ActiveSheet.Pictures.Insert(Fname)を 元画像を一度コピーして貼り付けにしましたが 動作不良になり 変更がわからないので 教えていただけますでしょうか。 元VBAです Private Sub Worksheet_BeforeRightClick(ByVal Target As Excel.Range, Cancel As Boolean) Dim Pic As Picture On Error GoTo Err If Target.Interior.ColorIndex <> 2 Then Exit Sub If Target.MergeCells = False Then Exit Sub Cancel = True Const MF1 As String = "JPEG Files (*.jpg;*.jpeg;*.jpe),*.jpg;*.jpeg;*.jpe" Const MF2 As String = "ビットマップ (*.bmp),*.bmp" Const MF3 As String = "GIF (*.gif),*.gif" Const MF4 As String = "すべてのファイル (*.*),*.*" Fname = Application.GetOpenFilename(FileFilter:=MF1 & "," & MF2 & _ , & MF3 & "," & MF4) If Fname = "False" Then Exit Sub End If For Each Pic In ActiveSheet.Pictures If Pic.TopLeftCell.MergeArea.Address = Target.Address Then Pic.Delete End If Next Set Pic = ActiveSheet.Pictures.Insert(Fname) ・・・←この変の修正で 全エクセルに対応できる変更を教えてくださいませ^^; With ActiveSheet.Pictures(ActiveSheet.Pictures. _ Count).ShapeRange .LockAspectRatio = msoFalse .Parent.Visible = msoTrue .Left = ActiveCell.MergeArea.Left .Top = ActiveCell.MergeArea.Top .Width = ActiveCell.MergeArea.Width .Height = ActiveCell.MergeArea.Height End With Set Pic = Nothing Exit Sub Err: MsgBox "エラー番号:" & Err.Number MsgBox "エラー内容:" & Err.Description End Sub < 使用 Excel:Excel2013、使用 OS:Windows7 >対応 ---- 『2003の VBAを 2013でも 共に動作させたいのです』(kaze) 対応できましたので 削除しました^^ ありがとうございます ---- たしかオートシェープの指定方法についての質問だったような気がしますが、 質問者が削除してしまったようなので、迷宮入り防止にコメントだけします。 差分に残っている分だけ貼り付けますが、元の質問文を消して上書きしたよう で、残っていませんでした (Mook) 2014/04/07(月) 17:08 ---- 削除されていたものを復元しました。 (kazu) 2014/04/07(月) 18:36 ---- 対応ありがとうございます。 たしかこんな質問でしたね。 どう解決したか書いてもらえると良かったのですが、 http://officetanaka.net/excel/vba/tips/tips87.htm の書き方だと、バージョンが異なっても動いたような気が・・・(未確認)。 ActiveSheet.Pictures.Insert picFilePath With ActiveSheet.Pictures(1) 処理 End With 確かこのあたりが関係してるかなと思い、確認しようと思っているうちに消えて しまいました。 http://www.clayhouse.jp/vba/vba03.htm (Mook) 2014/04/07(月) 19:07 ...
https://www.excel.studio-kazu.jp/wiki/kazuwiki/201404/20140405035900.txt - [detail] - similar
PREV NEXT
Powered by Hyper Estraier 1.4.13, with 97065 documents and 608342 words.

訪問者:カウンタValid HTML 4.01 Transitional