VBA Makro Kodları Neden Hata Veriyor?

Katılım
6 Haziran 2007
Mesajlar
47
Excel Vers. ve Dili
vb
Arkadaşlar Merhaba!

Ben VBA makro kodları kullanarak visual basic den word e aktarımlar yapıyorum.Buraya kadar her hangi bir sorun yok ancak..ikinci kez yapmak istediğimde runtime error hatası veriyor..Programı tekrar açıp kapatmam gerekiyor..

Bense programı tekrar açıp kapatmak istemiyorumm..bu program kullanıcısı içinde tercih değildir..Bunu sorunu nasıl düzeltebiliriz!

Teşekkürler!
 
Katılım
14 Şubat 2006
Mesajlar
3,426
Excel Vers. ve Dili
(Excel 2016 - İngilizce)
Altın Üyelik Bitiş Tarihi
30-11-2022
Kodlarınızı buraya eklerseniz hatanın nedenini daha kolay anlayabiliriz.
 
Katılım
6 Haziran 2007
Mesajlar
47
Excel Vers. ve Dili
vb
Kodlar ;

Dim objWord As New Word.Application
objWord.Visible = True
objWord.Documents.Open filename:=Label16.Caption
With objWord.Selection

ActiveWindow.ActivePane.VerticalPercentScrolled = 0
Selection.TypeParagraph
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2, NumColumns:= _
6, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Tablo K&#305;lavuzu" Then
.Style = "Tablo K&#305;lavuzu"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
End With
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.Font.Size = 10
Selection.Font.Bold = wdToggle
Selection.TypeText Text:="ADI"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.TypeText Text:="Hamdi"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.Font.Size = 10
Selection.Font.Bold = wdToggle
Selection.TypeText Text:="SOYADI"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.TypeText Text:="Teker"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.Font.Size = 10
Selection.Font.Bold = wdToggle
Selection.TypeText Text:="DO&#286;UM TAR&#304;H&#304;"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.TypeText Text:="26/09/1986"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=6
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.Font.Size = 11
Selection.Font.Bold = wdToggle
Selection.TypeText Text:="KAN GRUBU"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.TypeText Text:="ARh(+)"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.Font.Size = 10
Selection.Font.Bold = wdToggle
Selection.TypeText Text:="PROTOKOL NO"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.TypeText Text:="101303"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.Font.Size = 10
Selection.Font.Bold = wdToggle
Selection.TypeText Text:="DO&#286;UM YER&#304;"
Selection.MoveRight Unit:=wdCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.TypeText Text:="BEYKOZ"
Selection.MoveDown Unit:=wdLine, Count:=1
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
' .TypeText RichTextBox1.Text
Selection.TypeParagraph
'ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:=1, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:=wdAutoFitFixed
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
1, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed

With Selection.Tables(1)
If .Style <> "Tablo K&#305;lavuzu" Then
.Style = "Tablo K&#305;lavuzu"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
.Borders.Enable = False
End With
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter


Set myobj = Selection.InlineShapes.AddPicture(Text11.Text)
Selection.TypeText " "
Set myobj = Selection.InlineShapes.AddPicture(Text12.Text)

ActiveWindow.ActivePane.VerticalPercentScrolled = 0
Selection.TypeParagraph
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
2, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
' ActiveDocument.Tables.Add
With Selection.Tables(1)
If .Style <> "Tablo K&#305;lavuzu" Then
.Style = "Tablo K&#305;lavuzu"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = True
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = True
.Borders.Enable = False
End With
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.Font.Name = "verdana"
Selection.Font.Bold = True
Selection.Font.color = wdColorBlue
Selection.TypeText Text:=Label4.Caption & " - " & Text3.Text
Selection.MoveRight Unit:=wdCell

Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 10
Selection.Font.Name = "verdana"
Selection.Font.Bold = True
Selection.Font.color = wdColorBlue
Selection.TypeText Text:=Label5.Caption & " - " & Text4.Text


.WholeStory
.HomeKey Unit:=wdStory
End With
objWord.Documents(1).SaveAs "d:\raporlar\" & Text1.Text & ".doc", , 0
Set objWord = Nothing

hata:

Verdi&#287;i Hata :

Run- Time Error '464':
The remote server machine does not exist or is unavailable.


&#304;lginiz &#304;&#231;in Te&#351;ekk&#252;r Ederim
 
Katılım
14 Şubat 2006
Mesajlar
3,426
Excel Vers. ve Dili
(Excel 2016 - İngilizce)
Altın Üyelik Bitiş Tarihi
30-11-2022
objWord.Documents.Open filename:=Label16.Caption

sat&#305;r&#305; ile a&#231;t&#305;&#287;&#305;n&#305;z word dosyas&#305;n&#305; da ekleyebilirmisiniz?
 
Katılım
6 Haziran 2007
Mesajlar
47
Excel Vers. ve Dili
vb
r . e

abi siz bana mail adresinizi verirmisiniz !

yada hiç uğraşmayın..

o dosyasının yerine her hangi bir boş word dosyası koyabilirsiniz..bende her hangi bir boş olan alt ve üst bilgi içeren bir word dosyası ekliyorum zaten

şuan sisteme dosyayı ekleyemiyorum..

teşekkürler!
 
Son düzenleme:
Katılım
6 Haziran 2007
Mesajlar
47
Excel Vers. ve Dili
vb
beyfendi bana mail adresinizi yazarmısınız!

benim pc de 3.linklere açılma izni verilmiyor...

virüs programından dolayı herhalde!

o yüzden bende sizden bu word dosyasını ulaştırabileceeğim bir mail adresi isriyorum..

teşekkürler
 
Katılım
6 Aralık 2007
Mesajlar
1
Excel Vers. ve Dili
excel 2000 türkçe
V.B de access veritaban&#305; kullanarak kullan&#305;c&#305; isimleri ve parolalar&#305;n kaydedildi&#287;i tablo yard&#305;m&#305;yla g&#252;venli bir &#351;ifre ekran&#305; olu&#351;turunuz. &#351;ifre ekran&#305; olu&#351;tururken sisteme ilk defa giri&#351; yapmak i&#231;in ba&#351;lang&#305;&#231; &#351;ifresi ya da admin &#351;ifresi bulunsun. ilk kez giri&#351; yaparken bu &#351;ifre kullan&#305;ls&#305;n. bundan sonraki seferlerde yeni kullan&#305;c&#305; eklemek i&#231;in sisteme admin &#351;ifresiyle deil sonradan olu&#351;turulan &#351;ifrelerle girilsin,YEN&#304; BA&#350;LIK &#199;AMADIM L&#220;TFEN YARDIM ED&#304;N &#199;OK &#214;NEML&#304; BUG&#220;N YAPMAM LAZIM L&#220;TFENN
 
Üst