اذهب الي المحتوي
أوفيسنا

فورم ادراج بيانات وصور


الردود الموصى بها

فورم ادراج بيانات وصور

الفيديو

الصورة

609071670_.jpg.7b512947b58d1447492e1e127f3a4e42.jpg

الكود

Dim fpath As String
Private Sub CommandButton1_Click()
Dim x As Integer
Application.FileDialog(msoFileDialogOpen).AllowMultiSelect = False
x = Application.FileDialog(msoFileDialogOpen).Show
If x <> 0 Then
fpath = Application.FileDialog(msoFileDialogOpen).SelectedItems(1)
Image1.Picture = LoadPicture(fpath)
Image1.PictureSizeMode = 1
End If

End Sub

Private Sub CommandButton2_Click()
Dim x As Integer
Dim y As Worksheet
Set y = Sheets("sheet1")
x = y.Range("a" & Rows.Count).End(xlUp).Row
With y
.Cells(x + 1, "a").Value = Te1.Text
.Cells(x + 1, "b").Value = Te2.Text
.Cells(x + 1, "c").Value = Te3.Text
End With
Dim i As String
i = Te1.Text

FileCopy fpath, "D:\picture\" & i & ".jpg"
Me.Te1.Text = ""
Te1.Text = ""
Te2.Text = ""
Te3.Text = ""


End Sub

Private Sub UserForm_Click()

End Sub

 

  • Like 1
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information