ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ­è§Ë¦nªºµ{¦¡ ½Ð°Ý¯à§_²¤Æ

[µo°Ý] ­è§Ë¦nªºµ{¦¡ ½Ð°Ý¯à§_²¤Æ

°Ñ¦Ò ½×¾Â¤ºªº¤@¨Ç±Ð¾Ç¤å ©Ò§Ë¥Xªº
¥u¬O ¹Ï¤ùÀɮצh¹F¤W¤dµ§ ¦pªG¥Î³o­Ó¤èªk ·|ºÆ±¼
½Ð°Ý¦³¤H¯àÀ°§Ú²¤Æ¶Ü?
ªì©l±ø¥ó
sheet1 ¦WºÙ¬° data_picture
Äæ¦ì a2 ~ a7¬° §Ç¦C¸¹ (1~6)
Äæ¦ì b2 ~ b7 ¬°¤H¦W
Äæ¦ì e1 ~ h6 ¬°¹Ï¤ùÅã¥Ü°Ï°ì

  

Private Sub ComboBox1_Change()

If ComboBox1.Value = 1 Then
  Image1.Picture = LoadPicture("C:\aaa\-01.jpg")
End If
  Dim u As Range
  Set u = Worksheets("data_picture").Range("e1")
If ComboBox1.Text = 1 Then
  Call ActiveSheet.Shapes.AddPicture("C:\aaa\-01.JPG", msoFalse, msoTrue, u.Left, u.Top, 200, 200)
Else
If ComboBox1.Text = 2 Then
  Call ActiveSheet.Shapes.AddPicture("C:\aaa\-02.JPG", msoFalse, msoTrue, u.Left, u.Top, 200, 200)
End If
End If

End Sub

°ÝÃD¬O­n¬Ý§Aªº¹Ï¦W©M¿ï¶µ¦³¤°»òÃö¨t
¥H¤Uªº¬O,¦pªG¿ï¤Wªº¬O1
¹Ï¦W¦Û°Ê§ä"C:\aaa\-01.jpg"
¦pªG¿ï¤Wªº¬O2
¹Ï¦W¦Û°Ê§ä"C:\aaa\-02.jpg"
...
¦pªG¿ï¤Wªº¬O99
¹Ï¦W¦Û°Ê§ä"C:\aaa\-99.jpg"


Private Sub ComboBox1_Change()
    Dim strImageLocation
    strImageLocation = "C:\aaa\-" & Format(Val(ComboBox1.Text), 0) & ".jpg"
    Image1.Picture = LoadPicture(strImageLocation)
    Dim u As Range
    Set u = Worksheets("data_picture").Range("e1")
    Call ActiveSheet.Shapes.AddPicture(strImageLocation, msoFalse, msoTrue, u.Left, u.Top, 200, 200)

End Sub
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¤j·§¬ÝÀ´¤@¨Ç.. ÁÂÁ±z
¦A½Ð±Ð ³o¦êªº·N«ä¬O??
  strImageLocation = "C:\aaa\-" & Format(Val(ComboBox1.Text), 0) & ".jpg"

ÁÙ¦³ ¦pªG·Q­n³]­p¤@­Ólabel  ªº®Ø®Ø
±N¨ä¸ê®Æ¦CÅã¥Ü¥X¨Ó Áٻݭn¼W¥[¤°»ò??
ªì©l±ø¥ó
sheet1 ¦WºÙ¬° data_picture
Äæ¦ì a2 ~ a7 ¬° §Ç¦C¸¹ (1~6)
Äæ¦ì b2 ~ b7 ¬° ¤H¦W
Äæ¦ì c2 ~  d2 ¬° ¸ê®Æ¦C
Äæ¦ì c3 ~  d3 ¬° ¸ê®Æ¦C
Äæ¦ì e1 ~ h6 ¬° ¹Ï¤ùÅã¥Ü°Ï°ì

TOP

³o´X¤Ñ¸ÕÅç³sµ²ªº³¡¥÷
kimbal  ±z©Òµoªº¤èªk ¤p§Ì¦³¸ÕÅç¹L
¦ý¬O ·|Åã¥Ü¸ê®Æ«¬ºA¿ù»~
¤£¾å±o¬O combobox³oÃ䪺¤Þ¥Î³]©w¿ù»~ÁÙ¬O«ç¼Ë
Åã¥Ü¬O¥i¥HÅã¥Ü ¦ý¬O «oÅܦ¨°õ¦æµ{¦¡®É ·|³y¦¨«¬ºA¿ù»~¦Ó¤¤Â_
¤£¾å±o»¡¸Ó«ç³]©w¤ñ¸û«ê·í

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD