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

تعديل كود لنسخ ورقة كامله


إذهب إلى أفضل إجابة Solved by محمد يوسف ابو يوسف,

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

السلام عليكم ورحمة الله 

احبتي في الله  ... اريد تعديل هذا الكود ليتم نسخ الورقة كامله

Sub PrinttoFile()
a1 = Cells(3, 2)
a2 = Cells(3, 3)
a3 = Cells(3, 4)
Dim Filename As String
Filename = "T:\testfile.txt"
Open Filename For Output As #1
	Print #1, "*********** www.officena.net *****************"
	Print #1, "Example to Write Values from Cells into a text file"
	Print #1, "Source : " & ActiveWorkbook.FullName & " : "
	Print #1, "*********** www.officena.net *****************"
	Print #1,
	Print #1, "Here are the Values: "
	Print #1,
	Print #1, a1
	Print #1, a2
	Print #1, a3
Close #1
Dim x
	x = Shell("notepad.exe " & Filename, 1)
End Sub

الملف عمل نسخة ملف نصي 1.xlsm

 

 

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

  • 4 weeks later...
  • أفضل إجابة

بسم الله الرحمن الرحيم  والحمد الله رب العالمين

بعد البحث الكثير  داخل المنتدي وخارج المنتدي لم اجد ما اريد

ولكن صممت ان اوجد ما اريد 

والحمد لله  وفقني الله -- ان اكتب هذا الكود الجميل الذي يفي بألمطلوب 

وكررت ان اضعه للفائدة

كود تصدير مدي محدد الي ملف نصي وحفظه بأسم خليه معينة - علي برتيشن d

Sub dحفظ_ملف_تاست_بأسم_خلية_علي_برتيشن()
           
      Range("A1:I108").Select
    Selection.Copy
    Workbooks.Add
    Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=False
    Application.CutCopyMode = False
    ActiveWorkbook.SaveAs Filename:="D:\" & Cells(1, 2).Text & Nombre & " نسخة" & Format(Now, "-dddd-dd-mm-yyyy-") & ".txt", FileFormat:=xlText, _
        CreateBackup:=False
    ActiveWindow.Close
    Range("A1").Select
End Sub

تصدير البيانات الي ملف نصي وحفظة بأسم خلية معينه تصدير البيانات الي ملف نصي وحفظ بأسم خلية معينه.xls

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

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