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

فورم يفتح عدة ملفات أكسل


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

السلام عليكم

ضع هذه الاكواد في الفورم

UserForm2


Dim sPath As String


Private Sub CommandButton1_Click()

On Error GoTo 1

If Val(Application.Version) > 11 Then

    Workbooks.Open Filename:=sPath & "1.xlsx"

End If

1:

End Sub


Private Sub CommandButton2_Click()

On Error GoTo 1

If Val(Application.Version) > 11 Then

    Workbooks.Open Filename:=sPath & "2.xlsx"

End If

1:

End Sub


Private Sub CommandButton3_Click()

On Error GoTo 1

If Val(Application.Version) > 11 Then

    Workbooks.Open Filename:=sPath & "3.xlsx"

End If

1:

End Sub


Private Sub CommandButton4_Click()

On Error GoTo 1

If Val(Application.Version) > 11 Then

    Workbooks.Open Filename:=sPath & "4.xlsx"

End If

1:

End Sub


Private Sub UserForm_Activate()


sPath = ThisWorkbook.Path

If Right(sPath, 1) <> Application.PathSeparator Then

    sPath = sPath & Application.PathSeparator

End If

'''''''''''''''''''''''


End Sub

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

الشكر للاستاذ عبدالله باقشير على الرد السريع و ان شاء الله في ميزان حسناتك

بس وضعت الاكواد في الفورم ذي ما حضرتك تفضلت و ما اشتغل معاي

لو ممكن تعدل على الملف و ترفعه و جزاك الله خير

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

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