Merhaba,
Şu an aktif olarak kullandığım bir form ile;
bir çok çalışma sayfası içerisinden istediklerimi,
sayfa numaraları birbirine karışmadan ayrı ayrı yazdırabiliyorum.
Sorumdan önce yukarıda yazdığım konuda yardımını esirgemeyen,
Kodu baştan aşağı yazan sayın Halit3'e ve düzenleme konusunda yardımcı olan sayın Hüseyin Çoban'a teşekkür ederim.
Sorum şu;
Aşağıda verdiğim kod'u şu şekilde nasıl değiştirebiliriz;
Seçilen çalışma sayfalarını ayrı ayrı PDF olarak kaydetsin ve
dosya isimlerini de her çalışma sayfasının BA1 hücresinden alsın.
CAHİL KİŞİ'NİN TAVSİYESİ; mevcut kod seçilen çalışma sayfalarını ayrı ayrı işleme aldığı için sadece PDF olarak kaydetme işleminin koda entegre edilmesi iş görür diye düşünüyorum.
Saygılarımla.
Şu an aktif olarak kullandığım bir form ile;
bir çok çalışma sayfası içerisinden istediklerimi,
sayfa numaraları birbirine karışmadan ayrı ayrı yazdırabiliyorum.
Sorumdan önce yukarıda yazdığım konuda yardımını esirgemeyen,
Kodu baştan aşağı yazan sayın Halit3'e ve düzenleme konusunda yardımcı olan sayın Hüseyin Çoban'a teşekkür ederim.
Sorum şu;
Aşağıda verdiğim kod'u şu şekilde nasıl değiştirebiliriz;
Seçilen çalışma sayfalarını ayrı ayrı PDF olarak kaydetsin ve
dosya isimlerini de her çalışma sayfasının BA1 hücresinden alsın.
CAHİL KİŞİ'NİN TAVSİYESİ; mevcut kod seçilen çalışma sayfalarını ayrı ayrı işleme aldığı için sadece PDF olarak kaydetme işleminin koda entegre edilmesi iş görür diye düşünüyorum.
Saygılarımla.
Kod:
Private Sub CheckBox1_Click()
Dim liste As Integer
For liste = 1 To ListBox1.ListCount
ListBox1.Selected(liste - 1) = CheckBox1.Value
Next
End Sub
Private Sub CommandButton1_Click()
Dim liste As Integer
For liste = 1 To ListBox1.ListCount
If ListBox1.Selected(liste - 1) = True Then
Sheets(ListBox1.List(liste - 1, 0)).PrintOut
ListBox1.Selected(liste - 1) = False
End If
Next
End Sub
Private Sub ListBox1_Click()
End Sub
Private Sub UserForm_Initialize()
ListBox1.ListStyle = 1
ListBox1.MultiSelect = fmMultiSelectExtended
For i = ActiveWorkbook.Sheets.Count To 1 Step -1
ListBox1.AddItem Sheets(i).Name
Next i
End Sub
Son düzenleme: