Makro çalışırken bir hata penceresi alıyorum. Acaba sorun ne

Katılım
24 Ağustos 2004
Mesajlar
140
Excel Vers. ve Dili
Excel Vers. ve Dili Ofis 2021 TR 32 Bit
Merhaba,

Uzun bir makro çalışırken aşağıdaki hatayı alıyorum; almamam için ne gibi bir düzenleme yapmalıyım?


Saygılar, Sevgiler...
 

Levent Menteşoğlu

Administrator
Yönetici
Admin
Katılım
13 Ekim 2004
Mesajlar
16,057
Excel Vers. ve Dili
Excel 2010-32 bit-Türkçe
Excel 365 -32 bit-Türkçe
Bu sorunu oluşturan kodu yazarmısınız.
 
Katılım
24 Ağustos 2004
Mesajlar
140
Excel Vers. ve Dili
Excel Vers. ve Dili Ofis 2021 TR 32 Bit
Hata

Merhaba

Sub FIYATUPDATE()
MsgBox "Fiyat listesini Metro Elektronik'in sitesinden indirin ve C: sürücüsüne 'AORT.xls' adıyla kaydedin. Dosyanız hazırsa güncelleme işlemine başlanacaktır.", , "Fiyat Güncelleme"

Application.ScreenUpdating = False
Application.CutCopyMode = False

'ANAKART GÜNCELLEMESİ
Workbooks.Open Filename:="C:\AORT.xls"
'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "ANAKART FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
[a1:d1].AutoFilter
[a1:d1].AutoFilter Field:=1, Criteria1:="=MB*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("ANAKART").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("ANAKART").[e:iv].Delete
Sheets("ANAKART").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("ANAKART").[a65536].End(3).Row + 1
Sheets("ANAKART").Rows(sonsat & ":65536").Delete


'DISPLAY
Application.StatusBar = "CD/DVD FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'CD-DVD GÜNCELLEMESİ
Application.CutCopyMode = False
Workbooks("AORT.xls").Activate
[a1:d1].AutoFilter Field:=1, Criteria1:="=CD*", Operator:=xlOr, Criteria2:="=DVD*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("CD").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("CD").[e:iv].Delete
Sheets("CD").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("CD").[a65536].End(3).Row + 1
Sheets("CD").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "İŞLEMCİ FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU


'CPU GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=CPU*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("CPU").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("CPU").[e:iv].Delete
Sheets("CPU").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("CPU").[a65536].End(3).Row + 1
Sheets("CPU").Rows(sonsat & ":65536").Delete


'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "EKRAN KARTI FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU


'VGA GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=VGA*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("VGA").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("VGA").[e:iv].Delete
Sheets("VGA").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("VGA").[a65536].End(3).Row + 1
Sheets("VGA").Rows(sonsat & ":65536").Delete
Application.CutCopyMode = False

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "FAKS VE MODEM FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU


'MODEM VE FAKS GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=MODEM*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("MODEM").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("MODEM").[e:iv].Delete
Sheets("MODEM").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("MODEM").[a65536].End(3).Row + 1
Sheets("MODEM").Rows(sonsat & ":65536").Delete
Application.CutCopyMode = False
'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "FDD FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'FDD GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=FLOPPY*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("FDD").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("FDD").[e:iv].Delete
Sheets("FDD").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("FDD").[a65536].End(3).Row + 1
Sheets("FDD").Rows(sonsat & ":65536").Delete
Application.CutCopyMode = False
'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "HOPARLÖR VE KULAKLIK FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'SPEAKER VE KULAKLIK GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=SPK*", Operator:=xlOr, Criteria2:="=KULAKLIK*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("SPK").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("SPK").[e:iv].Delete
Sheets("SPK").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("SPK").[a65536].End(3).Row + 1
Sheets("SPK").Rows(sonsat & ":65536").Delete
Application.CutCopyMode = False
'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "HARD DISK FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'HDD GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=HD*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("HDD").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("HDD").[e:iv].Delete
Sheets("HDD").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("HDD").[a65536].End(3).Row + 1
Sheets("HDD").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "KASA FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'KASA GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=CASE*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("KASA").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("KASA").[e:iv].Delete
Sheets("KASA").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("KASA").[a65536].End(3).Row + 1
Sheets("KASA").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "KLAVYE FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'KEYBOARD GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=KB*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("KEY").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("KEY").[e:iv].Delete
Sheets("KEY").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("KEY").[a65536].End(3).Row + 1
Sheets("KEY").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "MONİTÖR FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'MONİTOR GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=MON*", Operator:=xlOr, Criteria2:="=LCD*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("MON").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("MON").[e:iv].Delete
Sheets("MON").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("MON").[a65536].End(3).Row + 1
Sheets("MON").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "MOUSE FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'MOUSE GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=MOU*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("FARE").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("FARE").[e:iv].Delete
Sheets("FARE").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("FARE").[a65536].End(3).Row + 1
Sheets("FARE").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "ANAKART FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'RAM GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=RAM*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("RAM").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("RAM").[e:iv].Delete
Sheets("RAM").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("RAM").[a65536].End(3).Row + 1
Sheets("RAM").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "SCANNER FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'SCANNER GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=SCAN*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("SCAN").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("SCAN").[e:iv].Delete
Sheets("SCAN").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("SCAN").[a65536].End(3).Row + 1
Sheets("SCAN").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "TV KARTLARI FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'TV KARTLARI GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=TV*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("TV K").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("TV K").[e:iv].Delete
Sheets("TV K").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("TV K").[a65536].End(3).Row + 1
Sheets("TV K").Rows(sonsat & ":65536").Delete




'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "YAZILIM FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'SOFTWARE GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=MS*", Operator:=xlOr, Criteria2:="=INT*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("SOFT").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("SOFT").[e:iv].Delete
Sheets("SOFT").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("SOFT").[a65536].End(3).Row + 1
Sheets("SOFT").Rows(sonsat & ":65536").Delete
'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "UPS FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'UPS GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=UPS*"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("UPS").Select
[a1].Select
ActiveSheet.Paste '<<<<< Bu satırda hata basıyor !!!Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("UPS").[e:iv].Delete
Sheets("UPS").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("UPS").[a65536].End(3).Row + 1
Sheets("UPS").Rows(sonsat & ":65536").Delete

'DISPLAY
Application.DisplayStatusBar = True
Application.StatusBar = "PRINTER FİYATLARI GÜNCELLENİYOR."
'DISPLAYSONU
'PRINTER GÜNCELLEMESİ
Workbooks("AORT.xls").Activate
Application.CutCopyMode = False
[a1:d1].AutoFilter Field:=1, Criteria1:="=PR *"
[a1:d65536].Copy
Workbooks("METROPOL4.xls").Activate
Sheets("PRIN").Select
[a1].Select
ActiveSheet.Paste
Columns("A").EntireColumn.AutoFit
'OPTIMIZE
Sheets("PRIN").[e:iv].Delete
Sheets("PRIN").[a:iv].EntireColumn.AutoFit
sonsat = Sheets("PRIN").[a65536].End(3).Row + 1
Sheets("PRIN").Rows(sonsat & ":65536").Delete
'SON
Workbooks("AORT.xls").Activate
[a1:d1].AutoFilter
Workbooks("AORT.xls").Save
Workbooks("AORT.xls").Close
Sheets("XXXX").Select
Range("C17").Select
Sheets("OPT").Range("c57").Formula = Date
MsgBox "Fiyat listesi başarı ile güncellenmiştir.", , "Güncelleme Sonucu"

ActiveWorkbook.Save
End Sub
 
Katılım
24 Ağustos 2004
Mesajlar
140
Excel Vers. ve Dili
Excel Vers. ve Dili Ofis 2021 TR 32 Bit
Sayın LeventM, çözüm yolu nerede, yardımcı olabilecek misiniz?
 
Katılım
24 Ağustos 2004
Mesajlar
140
Excel Vers. ve Dili
Excel Vers. ve Dili Ofis 2021 TR 32 Bit
:shock:

Bir cevap yok mu arkadaşlar?
 
Üst