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

[µo°Ý] ¦³ÃöUserform image

[µo°Ý] ¦³ÃöUserform image

¥Ø«e³o¬qµ{¦¡¬O¥´¶}userform·|¦Û°Ê¶×¤J¹Ï¤ù
¦ý¬O­n«ç¼Ë­×§ï¤~¯à§PÂ_¸ê®Æ§¨¸Ì¦³Àɮפ~¶×¤J¡A¨SÀɮ׫h¸õ¥Xmsgbox´£¿ô§ä¤£¨ìÀÉ®×

Private Sub UserForm_Initialize()
    Dim imgpath As String
    imgpath = ThisWorkbook.Path & "\" & "img"
    Image1.Picture = LoadPicture(imgpath & "\" & "123.jpg")
End Sub

image_add.rar (101.24 KB)

Private Sub UserForm_Initialize()
    Dim imgpath As String
    imgpath = ThisWorkbook.Path & "\" & "img"
    if dir(imgpath & "\" & "123.jpg")="" then exit sub
    Image1.Picture = LoadPicture(imgpath & "\" & "123.jpg")
End Sub

TOP

¦^´_ 2# ­ã´£³¡ªL

³o­Ó¤èªk¥i¥H~~~
¤£¹L¤w¸g§ä¤£¨ì¹Ï¤ù¤F¡A­n«ç»òÅýuserform¤£¦A¸õ¥X¨Ó???

Private Sub UserForm_Initialize()
    imgname = ActiveWorkbook.Sheets(1).Range("A1").Value
    Dim imgpath As String
    imgpath = ThisWorkbook.Path & "\" & "img"
    If Dir(imgpath & "\" & imgname & ".jpg") = "" Then
        MsgBox ("§ä¤£¨ì¹Ï­±!!!")
        Exit Sub
    End If
    Image1.Picture = LoadPicture(imgpath & "\" & imgname & ".jpg")
End Sub

TOP

¤w¸Ñ¨M~~~~
Sub Åã¥Ü¹Ï­±()
    imgname = ThisWorkbook.Sheets("»sµ{¼ÒªO").Range("I4").Value
    Dim imgpath As String
    imgpath = ThisWorkbook.Path & "\" & "¹Ï­±"  '«ü©w¸ê®Æ§¨
    If Dir(imgpath, vbDirectory) = "" Then MkDir imgpath
   
    If imgname = "" Then
        A = MsgBox("½Ð¥ý¦b­pµeªí¿é¤J²£«~½s¸¹!!!", vbInformation, "´£¥Ü°T®§")
        Exit Sub
    Else
        If Dir(imgpath & "\" & imgname & ".jpg") = "" Then
            B = MsgBox("§ä¤£¨ì¹Ï­±!!!¡A½Ð½T©w¹Ï­±¸ê®Æ§¨¸Ì¦³¸ÓÀɦW", vbCritical, "´£¥Ü°T®§")
            Exit Sub
        Else
            ¹Ï­±.Show 0
        End If
    End If
   
End Sub

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD