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

[µo°Ý] ¨Ì·Ótextbox¦WºÙ§ä¥X¸ê®Æ§¨¸Ì¹Ï¤ù¨Ã¶K¤W

[µo°Ý] ¨Ì·Ótextbox¦WºÙ§ä¥X¸ê®Æ§¨¸Ì¹Ï¤ù¨Ã¶K¤W

½Ð±Ð¦U¦ì°ª¤â¡A

§Ú¦buserform¸Ì­±¦³¨â­ÓImage¤À§O¬°Image1 ¤Î Image2

§Ú§Æ±æ«ö¤Ubutton«á¯à°÷¨Ã±N¹ÏÀÉpo¤W¡A

°²¦p¹Ï¤ù¨â±iºÙ¬°"¥[¤u«á1" ¤Î "¥[¤u«á2"

Userform¸Ì¦³­Ótextbox1¿é¤J"¥[¤u«á"¯à°÷Åã¥Ü¹Ï¤ù

¡i½Ð°Ý»Ý­n§PÂ_¦³µL¹Ï¤ù¶Ü¡H°²¨Ï¨S¦³¹ÏÀÉ¡A·|¤£·|¥X²{¿ù»~¡H¡j

¤p§Ì·M¬N¡A¹J¨ì¨Ç°ÝÃD½Ð°ª¤â«ü±Ð¡AÁÂÁ¡I

Private Sub CommandButton1_Click()
Image1.Picture = LoadPicture(ThisWorkbook.Path & "¹ÏÀɦWºÙ")
End Sub
¡õ
Image1.Picture = LoadPicture(ThisWorkbook.Path & textbox1.value & 1&.jpg)
Image2.Picture = LoadPicture(ThisWorkbook.Path & textbox1.value & 2&.jpg)
½Ð°Ý¸Ó«ç»ò¼g©O¡H

  1. Private Sub CommandButton1_Click()
  2.   Dim s As String
  3.   Image1.Picture = LoadPicture("")  '²MªÅ
  4.   Image2.Picture = LoadPicture("")  '²MªÅ
  5.   
  6.   s = ThisWorkbook.Path & "\" & TextBox1.Value & "1.jpg"  '¹Ï¤ù¸ô®|
  7.   If Dir(s) <> "" Then Image1.Picture = LoadPicture(s)  '¦s¦bÀɮפ~¸ü¤J¹Ï¤ù
  8.   
  9.   s = ThisWorkbook.Path & "\" & TextBox1.Value & "2.jpg" '¹Ï¤ù¸ô®|
  10.   If Dir(s) <> "" Then Image2.Picture = LoadPicture(s)  '¦s¦bÀɮפ~¸ü¤J¹Ï¤ù
  11. End Sub
½Æ»s¥N½X
¦^´_ 1# lifedidi

TOP

¦^´_ 2# stillfish00

stillfish00¤j¤j·PÁ±z¡I

¤£¦n·N«ä¡A½Ð°Ý°²¦p¹Ï¤ù¸ô®|¦A¸ÓWorksheet¸Ìªº"·s¼W¸ê®Æ§¨"¸Ì¸Ó¦p¦ó­×§ï¡H

TOP

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2013-6-28 16:24 ½s¿è

¦^´_ 3# lifedidi
¤£À´¡AWorksheet¸Ìªº"·s¼W¸ê®Æ§¨"¬O¬Æ»ò·N«ä¡H¡H
³o­Ó¶Ü...
s = ThisWorkbook.Path & "\·s¼W¸ê®Æ§¨\" & TextBox1.Value & "1.jpg"  '¹Ï¤ù¸ô®|

TOP

¦^´_ 4# stillfish00


¤p§Ì¥¿¬O³o­Ó·N«ä
ÁÂÁ stillfish00¤j¤jªºÀ°¦£¡I

TOP

        ÀR«ä¦Û¦b : ªY½à§O¤H´N¬O²øÄY¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD