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

هل يمكن جعل اليوسرفورم يحصل على بياناته من ورقتين مشروط بتفعيل أحدى الورقتين


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

السلام عليكم

أقصد إذا كانت الورقة (1) تكست بوكس1= كذا

إذا كانت الورقة (2) تكست بوكس1= كذا

Private Sub UserForm_Activate()

With Sheets("BUY")

LL = ActiveCell.Rows.Row

TextBox1.Value = Sheets("BUY").Cells(LL, "L")

TextBox2.Value = Sheets("BUY").Cells(LL, "T")

TextBox3.Value = Sheets("BUY").Cells(LL, "U")

TextBox4 = ""

TextBox5.Value = Sheets("BUY").Cells(LL, "S")

TextBox6 = ""

ComboBox1.Value = Sheets("BUY").Cells(LL, "F").Address

End With

With Sheets("MAIN")

NN = ActiveCell.Row

TextBox1.Value = Sheets("MAIN").Cells(NN, "P")

TextBox2.Value = Sheets("MAIN").Cells(NN, "S")

TextBox3.Value = Sheets("MAIN").Cells(NN, "T")

TextBox4 = ""

TextBox5.Value = Sheets("MAIN").Cells(NN, "V")

TextBox6 = ""

ComboBox1.Value = Sheets("MAIN").Cells(NN, "B").Address

End With

End Sub

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

أخي الكريم :

للحق أن مرورك قد نفعني حيث شاهدت الرابط الموضوع أسفله و اتبعته و وجدت موقع ظريف به من يسال عن تسمية ورقة حسب اسم موجود بها ووجدت الكود ضالتي بهذا الطلب وهو:

If activesheet.name=("') then

باركك الله و لك الشكر

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

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