[VBA] biden fazla dim fonksiyonunu birleştirme
#1
arkadaşlar ekli dosyada iki ayrı butonun içinde iki ayrı dim fonksiyonu var bunları tek butona(birleştirme butonu) atamaya çalışıyorum ancak atadığımda birinin tablo adı çıkıyor, birininde tablo şekli bozuluyor acaba bunları önlemek için kodda nasıl bi değişiklik yapmak gerekiyor?


Eklenti Dosyaları
.rar   Desktop.rar (Boyut: 36,4 KB / İndirilme: 67)



  Alıntı
Bu mesajı beğenenler:
#2
Alttaki gibi yazabilirsiniz.

Sondajbilgileri tablodan geliyor. Dikkat ediniz. Sorgu yaparsanız, openquery ye çevirin sorgu1 gibi..

Visual Basic
  1. Dim WordApp As Word.Application
  2.  
  3. Dim strTemplateLocation As String
  4.  
  5. strTemplateLocation = CurrentProject.Path & "\YENİ.dot"
  6.  
  7. On Error Resume Next
  8.  
  9. Set WordApp = CreateObject("Word.Application")
  10.  
  11.  
  12.  
  13. On Error GoTo ErrHandler
  14. With WordApp
  15.  
  16. .Visible = True
  17.  
  18. .Documents.Open (strTemplateLocation)
  19.  
  20.  
  21. .WindowState = wdWindowStateMaximize
  22.  
  23. DoCmd.OpenQuery "Sorgu1" ' Burayı Değiştirdik
  24. DoCmd.RunCommand acCmdSelectAllRecords
  25. DoCmd.RunCommand acCmdCopy
  26.  
  27. .ActiveDocument.Bookmarks("FORM").Range.Paste
  28.  
  29.  
  30.  
  31. DoCmd.OpenTable "SONDAJBİLGİLERİ" ' Burayı Değiştirdik
  32. DoCmd.RunCommand acCmdSelectAllRecords
  33. DoCmd.RunCommand acCmdCopy
  34.  
  35. .ActiveDocument.Bookmarks("SONDAJBİLGİLERİ").Range.Paste
  36.  
  37.  
  38. End With
  39. DoEvents
  40. WordApp.Activate
  41.  
  42. WordApp.ActiveDocument.Range.Tables(1).Rows(1).Delete '**** Burayı ekledik. ****
  43.  
  44. WordApp.ActiveDocument.Range.Tables(2).Rows(1).Delete '**** Burayı ekledik. ****
  45.  
  46.  
  47.  
  48.  
  49. Set WordApp = Nothing
  50. Exit Sub
  51.  
  52. ErrHandler:
  53. Set WordApp = Nothing


Javascript
  1. this.setState({sign:"Here comes the sun...."})







  Alıntı
Bu mesajı beğenenler:
#3
teşekkürler Berkant bey elinize sağlık...



  Alıntı
Bu mesajı beğenenler:


Benzer Konular...
Konu: Yazar Cevaplar: Gösterim: Son Mesaj
  [SORGU] Birden Fazla Sorguyu Tek Ekranda Görebilme MERAK 1 267 03-11-2025, 08:27
Son Mesaj: dsezgin
  Sorguda Birden Fazla Ifadeli Sütunu Toplatma halil.tefci 8 747 03-12-2024, 15:01
Son Mesaj: dsezgin
  [TABLO] Ada Ve Parsel Bilgisini Farklı Bir Kolonda Birleştirme mmisildar 4 460 04-09-2024, 13:37
Son Mesaj: mmisildar
  Bir Tabloda Bulunan 2 Alanı Birleştirme programmer67 10 755 25-06-2024, 11:49
Son Mesaj: halily
  [SORGU] Sayı Formatı Bozulmadan Metinle Birleştirme atyaty 2 386 08-12-2023, 18:57
Son Mesaj: atyaty
  Birden Fazla Alandaki Veriyi Sorguda Alt Alta Birleştirme adnnfrm 3 649 18-11-2023, 19:54
Son Mesaj: dsezgin
  Birleştirme Hakkında. Satir 7 683 10-09-2023, 18:21
Son Mesaj: Satir
  [FORM] Sürekli Formda Belli Bir Sütundaki Satırları Tek Bir Metin Kutusunda Birleştirme dormin 4 632 18-01-2023, 14:29
Son Mesaj: dormin

Foruma Git:


Bu konuyu görüntüleyen kullanıcı(lar): 1 Ziyaretçi