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

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

قام بنشر

السلام عليكم

من فضلكم ارغب في  وضع حدود للخلايا عند التصدير الى ملف اخر ب كود VBA

With Application.Workbooks.Add
Application.Visible = True
Dim chosename
chosename = InputBox("Veuillez nommer la feuil:", "Nommer la nouvelle feuil")
'If chosename = "" Then Exit Sub
Sheets(1).Name = chosename & " ;" & Format(Now(), "dd-mm-yyyy")
temp.Range("z1:ah1").Copy Sheets(1).Range("a1:I1")
Sheets(1).Range("a1:I1").ColumnWidth = 14
Dim lastrow
lastrow = Sheets(1).Cells(Rows.Count, 1).End(xlUp).Row + 1
For v = 0 To Me.ListBox1.ListCount - 1
Cells(lastrow, 1).Value = Me.ListBox1.List(v, 0)
Cells(lastrow, 2).Value = Me.ListBox1.List(v, 1)
Cells(lastrow, 3).Value = Me.ListBox1.List(v, 2)
Cells(lastrow, 4).Value = Me.ListBox1.List(v, 3)
Cells(lastrow, 5).Value = Me.ListBox1.List(v, 4)
Cells(lastrow, 6).Value = Me.ListBox1.List(v, 5)
Cells(lastrow, 7).Value = Me.ListBox1.List(v, 6)
Cells(lastrow, 8).Value = Me.ListBox1.List(v, 7)
lastrow = lastrow + 1
Next
MsgBox "تم التصدير بنجاح"
End With

شكرا لكم 

export.xlsm

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