1anass قام بنشر ديسمبر 27, 2018 قام بنشر ديسمبر 27, 2018 السلام عليكم من فضلكم ارغب في وضع حدود للخلايا عند التصدير الى ملف اخر ب كود 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.