Beruflich Dokumente
Kultur Dokumente
Sub menu()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Call veri_al
Call degeryaz
Call sirali_olustur
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
Sub sirali_olustur()
baslayeni = 0
For i = 1 To say
Sheets("Risk").Select
basla = veriliste(i, 2)
bitir = veriliste(i, 3)
ActiveSheet.Paste
Sub siralama()
Range("A1").Select
ActiveWorkbook.Worksheets("RiskS�ral�").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("RiskS�ral�").Sort.SortFields.Add Key:=Range("A1"), _
SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("RiskS�ral�").Sort
.SetRange Range("A:C")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
End Sub
Sub degeryaz()
If WorksheetExists("RiskS�ral�") Then Sheets("RiskS�ral�").Delete
Set NewSh = Sheets.Add(After:=Sheets(Sheets.Count))
NewSh.Name = "RiskS�ral�"
For i = 1 To say
Cells(i, 1).Value = veriliste(i, 1)
Cells(i, 2).Value = veriliste(i, 2)
Cells(i, 3).Value = veriliste(i, 3)
Next i
Call siralama
For i = 1 To say
veriliste(i, 1) = Cells(i, 1).Value
veriliste(i, 2) = Cells(i, 2).Value
veriliste(i, 3) = Cells(i, 3).Value
Next i
Columns("A:C").Select
Selection.ClearContents
Range("A1").Select
End Sub
Sub veri_al()
Sheets("Risk").Select
sonsatir = Cells(Rows.Count, "B").End(3).Row
say = 0
basla = 1
bitir = 1
For i = 1 To sonsatir
mevcutrisk = Cells(i, 2).Value
isguvenligi = Cells(i, 1).Value
If InStr(mevcutrisk, "Mevcut Risk") > 0 Then
i = i + 1
Risk = Cells(i, 7).Value
End If
End Sub
------------------------------------
'Excel XML olu�turma
Sub XML_hazirla()
Dim doc As Object, root As Object, kisi As Object
Dim i As Integer, j As Integer, hash As String, desktop As String
doc.appendChild root
root.setAttribute "TesisKodu", "54336" 'Buray� kontrol edin.
root.setAttribute "Tarih", "2006-06-12 23:50:26" 'Buray� kontrol edin.
root.setAttribute "GonderenProgram", "JGNK_XML"
root.setAttribute "GonderenProgramVersiyon", "1.0.0"
For i = 2 To Sheets("sayfa1").[a1000].End(3).Row
For j = 1 To 25
Next
Next
doc.InsertBefore _
doc.createProcessingInstruction("hash", hash), doc.ChildNodes.Item(0)
doc.InsertBefore _
doc.createProcessingInstruction("xml", "version='1.0' encoding='iso-8859-
9'"), doc.ChildNodes.Item(0)
desktop = CreateObject("WScript.Shell").specialfolders("desktop")
doc.Save desktop & "\ornek.xml"
End Sub
Option Explicit
Option Base 0
' You are free to use this code as part of your own applications
' provided you keep this copyright notice intact and acknowledge
' its authorship with the words:
' The latest version of this source code can be downloaded from
' www.di-mgt.com.au/crypto.html.
' Comments and bug reports to http://www.di-mgt.com.au/contact.html
'****************** END OF COPYRIGHT NOTICE*************************
End Function
' Initialise
' Number of complete 512-bit/64-byte blocks to process
nBlks = mLen \ MD5_BLK_LEN
' Decode 4 x 32-bit words into 16 bytes with LSB first each time
' and return result as a hex string
MD5_bytes = ""
For i = 0 To 3
Call uwSplit(state(i), wb(3), wb(2), wb(1), wb(0))
For j = 0 To 3
If wb(j) < 16 Then
sHex = "0" & Hex(wb(j))
Else
sHex = Hex(wb(j))
End If
MD5_bytes = MD5_bytes & sHex
Next
Next
End Function
a = state(0)
b = state(1)
c = state(2)
d = state(3)
' Decode the next 64 bytes into 16 words with LSB first
For j = 0 To 15
x(j) = uwJoin(buf(index + 3), buf(index + 2), buf(index + 1), buf(index))
index = index + 4
Next
' Round 1
a = FF(a, b, c, d, x(0), S11, &HD76AA478) ' 1
d = FF(d, a, b, c, x(1), S12, &HE8C7B756) ' 2
c = FF(c, d, a, b, x(2), S13, &H242070DB) ' 3
b = FF(b, c, d, a, x(3), S14, &HC1BDCEEE) ' 4
a = FF(a, b, c, d, x(4), S11, &HF57C0FAF) ' 5
d = FF(d, a, b, c, x(5), S12, &H4787C62A) ' 6
c = FF(c, d, a, b, x(6), S13, &HA8304613) ' 7
b = FF(b, c, d, a, x(7), S14, &HFD469501) ' 8
a = FF(a, b, c, d, x(8), S11, &H698098D8) ' 9
d = FF(d, a, b, c, x(9), S12, &H8B44F7AF) ' 10
c = FF(c, d, a, b, x(10), S13, &HFFFF5BB1) ' 11
b = FF(b, c, d, a, x(11), S14, &H895CD7BE) ' 12
a = FF(a, b, c, d, x(12), S11, &H6B901122) ' 13
d = FF(d, a, b, c, x(13), S12, &HFD987193) ' 14
c = FF(c, d, a, b, x(14), S13, &HA679438E) ' 15
b = FF(b, c, d, a, x(15), S14, &H49B40821) ' 16
' Round 2
a = GG(a, b, c, d, x(1), S21, &HF61E2562) ' 17
d = GG(d, a, b, c, x(6), S22, &HC040B340) ' 18
c = GG(c, d, a, b, x(11), S23, &H265E5A51) ' 19
b = GG(b, c, d, a, x(0), S24, &HE9B6C7AA) ' 20
a = GG(a, b, c, d, x(5), S21, &HD62F105D) ' 21
d = GG(d, a, b, c, x(10), S22, &H2441453) ' 22
c = GG(c, d, a, b, x(15), S23, &HD8A1E681) ' 23
b = GG(b, c, d, a, x(4), S24, &HE7D3FBC8) ' 24
a = GG(a, b, c, d, x(9), S21, &H21E1CDE6) ' 25
d = GG(d, a, b, c, x(14), S22, &HC33707D6) ' 26
c = GG(c, d, a, b, x(3), S23, &HF4D50D87) ' 27
b = GG(b, c, d, a, x(8), S24, &H455A14ED) ' 28
a = GG(a, b, c, d, x(13), S21, &HA9E3E905) ' 29
d = GG(d, a, b, c, x(2), S22, &HFCEFA3F8) ' 30
c = GG(c, d, a, b, x(7), S23, &H676F02D9) ' 31
b = GG(b, c, d, a, x(12), S24, &H8D2A4C8A) ' 32
' Round 3
a = HH(a, b, c, d, x(5), S31, &HFFFA3942) ' 33
d = HH(d, a, b, c, x(8), S32, &H8771F681) ' 34
c = HH(c, d, a, b, x(11), S33, &H6D9D6122) ' 35
b = HH(b, c, d, a, x(14), S34, &HFDE5380C) ' 36
a = HH(a, b, c, d, x(1), S31, &HA4BEEA44) ' 37
d = HH(d, a, b, c, x(4), S32, &H4BDECFA9) ' 38
c = HH(c, d, a, b, x(7), S33, &HF6BB4B60) ' 39
b = HH(b, c, d, a, x(10), S34, &HBEBFBC70) ' 40
a = HH(a, b, c, d, x(13), S31, &H289B7EC6) ' 41
d = HH(d, a, b, c, x(0), S32, &HEAA127FA) ' 42
c = HH(c, d, a, b, x(3), S33, &HD4EF3085) ' 43
b = HH(b, c, d, a, x(6), S34, &H4881D05) ' 44
a = HH(a, b, c, d, x(9), S31, &HD9D4D039) ' 45
d = HH(d, a, b, c, x(12), S32, &HE6DB99E5) ' 46
c = HH(c, d, a, b, x(15), S33, &H1FA27CF8) ' 47
b = HH(b, c, d, a, x(2), S34, &HC4AC5665) ' 48
' Round 4
a = II(a, b, c, d, x(0), S41, &HF4292244) ' 49
d = II(d, a, b, c, x(7), S42, &H432AFF97) ' 50
c = II(c, d, a, b, x(14), S43, &HAB9423A7) ' 51
b = II(b, c, d, a, x(5), S44, &HFC93A039) ' 52
a = II(a, b, c, d, x(12), S41, &H655B59C3) ' 53
d = II(d, a, b, c, x(3), S42, &H8F0CCC92) ' 54
c = II(c, d, a, b, x(10), S43, &HFFEFF47D) ' 55
b = II(b, c, d, a, x(1), S44, &H85845DD1) ' 56
a = II(a, b, c, d, x(8), S41, &H6FA87E4F) ' 57
d = II(d, a, b, c, x(15), S42, &HFE2CE6E0) ' 58
c = II(c, d, a, b, x(6), S43, &HA3014314) ' 59
b = II(b, c, d, a, x(13), S44, &H4E0811A1) ' 60
a = II(a, b, c, d, x(4), S41, &HF7537E82) ' 61
d = II(d, a, b, c, x(11), S42, &HBD3AF235) ' 62
c = II(c, d, a, b, x(2), S43, &H2AD7D2BB) ' 63
b = II(b, c, d, a, x(9), S44, &HEB86D391) ' 64
state(0) = uwAdd(state(0), a)
state(1) = uwAdd(state(1), b)
state(2) = uwAdd(state(2), c)
state(3) = uwAdd(state(3), d)
End Sub
uwRol = w
For i = 1 To s
t = uwRol And &H3FFFFFFF
t = t * 2
If (uwRol And &H40000000) <> 0 Then
t = t Or &H80000000
End If
If (uwRol And &H80000000) <> 0 Then
t = t Or &H1
End If
uwRol = t
Next
End Function
End Function
'****************************************************
' These two functions from Microsoft Article Q189323
' "HOWTO: convert between Signed and Unsigned Numbers"
------------------------------------
'Uzunlu�a g�re soldan karakter alma
=E�ER(UZUNLUK(A1)=8;SOLDAN(A1;7);E�ER(UZUNLUK(A1)=13;SOLDAN(A1;12);))
-------------------------------------
'sayfalar� yazd�r
Sub yazdir()
Sheets("9HFTDE�").Select
ActiveSheet.PageSetup.PrintArea = "A1:H37"
For i = 1 To 30
[j1] = i
ActiveSheet.PrintOut Copies:=1
Next i
End Sub
-------------------------------------
'Webten bilgi alma d�viz
Sub Emre()
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate "http://www.qnbfinansbank.enpara.com/doviz-kur-bilgileri/doviz-
altin-kurlari.aspx"
Do: DoEvents: Loop Until ie.ReadyState = 4
alis = ie.Document.getElementsByClassName("dlCont")(7).innerText
satis = ie.Document.getElementsByClassName("dlCont")(8).innerText
ActiveSheet.Range("A1").Value = alis
ActiveSheet.Range("A2").Value = satis
ie.Quit
End Sub
-------------------------------------
' metinden garip karakterleri temizleme
' metin temizleme
Dim harfler As String
Dim sayilar As String
Dim ozelkarakter, cumlestr As String
Sub on_yikama()
cumle = ""
For i = 1 To Len(cumlestr)
harf = Mid(cumlestr, i, 1)
sonrakiharf = Mid(cumlestr, i + 1, 1)
If harf = "?" Then
A = A
End If
say = 0
End If
oncekiharf = harf
Next i
cumlestr = Replace(cumle, " ", " ")
End Sub
Sub temizleme()
cumle = ""
oncekiharf = "*"
For i = 1 To Len(cumlestr)
harf = Mid(cumlestr, i, 1)
sonrakiharf = Mid(cumlestr, i + 1, 1)
If harf = "C" Then
A = A
End If
say = 0
'Temizleme kriterleri burada artt�r�labilir.
If oncekiharf = " " And InStr(harfler, harf) > 0 And sonrakiharf = " " And
harf <> "V" Then
Else
cumle = cumle + harf
End If
oncekiharf = harf
Next i
cumlestr = Replace(cumle, " ", " ")
End Sub
--------------------------------------
'sat�rlar� gizle ve yazd�r, form�l varsa
Sub YAZDIR()
Dim Son As Long, X As Long, Alan As Range
Application.ScreenUpdating = False
Cells.EntireRow.Hidden = False
Son = Cells(Rows.Count, "E").End(3).Row
For X = 5 To Son
If Cells(X, "D") = "" Then
If Alan Is Nothing Then
Set Alan = Cells(X, "D")
Else
Set Alan = Union(Alan, Cells(X, "D"))
End If
End If
Next
If Not Alan Is Nothing Then Alan.EntireRow.Hidden = True
ActiveSheet.PrintOut
Cells.EntireRow.Hidden = False
Application.ScreenUpdating = True
--------------------------------------
'metinden istenmeyen karakterleri silme
Function temizle(Hucre As Range) As String
Set reg = CreateObject("vbscript.regexp")
reg.Global = True
reg.MultiLine = True
reg.ignorecase = True
reg.Pattern = "\<|\?|\*|\/|!|=|\d(?=[a-z])|\w[*?!=<>]|[*?!=]\w"
ActiveSheet.PrintOut Copies:=1
rngBlnk.EntireRow.Hidden = False
Application.ScreenUpdating = True
End Sub
--------------------------------------
'i�lemi tipi alma
Sub cpual()
-------------------------------------
'hdd harddisk fiziksel numaras� alma hdd serino
Function HD_SNo(DrvIdx As Byte) As String
Dim strCls As String, strKey As String
Dim WMI As Object
Set WMI = GetObject("winmgmts:")
strCls = "Win32_PhysicalMedia"
strKey = strCls & ".Tag=""\\\\.\\PHYSICALDRIVE" & DrvIdx & """"
HD_SNo = Trim(WMI.InstancesOf(strCls)(strKey).SerialNumber)
End Function
-------------------------------------
'Sayfalar� dosya olarak kaydetme
Sub sayfaayir()
Application.ScreenUpdating = False
dosyayolu = "c:\dosyalar\"
Application.ScreenUpdating = True
End Sub
------------------------------------
'A��k excel var ise dosyay� a�ma.
Sub auto_open()
If Workbooks.Count > 1 Then ThisWorkbook.Close False
End Sub
------------------------------------
'SIralam dizi ve array
'Call QuickSort(MyArray, LBound(MyArray), UBound(MyArray))
Do
Do While (Field(P1) < Ref)
P1 = P1 + 1
Loop
If P1 <= P2 Then
TEMP = Field(P1)
Field(P1) = Field(P2)
Field(P2) = TEMP
P1 = P1 + 1
P2 = P2 - 1
End If
Loop Until (P1 > P2)
------------------------------------
'ikili dizi array s�ralama
'Kullan�m� 2 alana g�re Call QuickSort(MyArray, LBound(MyArray),
UBound(MyArray),2)
'
'Posted by Jim Rech 10/20/98 Excel.Programming
Dim i As Long
Dim j As Long
Dim varMid As Variant
Dim arrRowTemp As Variant
Dim lngColTemp As Long
If IsEmpty(SortArray) Then
Exit Sub
End If
If lngMin = -1 Then
lngMin = LBound(SortArray, 1)
End If
If lngMax = -1 Then
lngMax = UBound(SortArray, 1)
End If
i = lngMin
j = lngMax
varMid = Empty
varMid = SortArray((lngMin + lngMax) \ 2, lngColumn)
' We send 'Empty' and invalid data items to the end of the list:
If IsObject(varMid) Then ' note that we don't check isObject(SortArray(n)) -
varMid might pick up a valid default member or property
i = lngMax
j = lngMin
ElseIf IsEmpty(varMid) Then
i = lngMax
j = lngMin
ElseIf IsNull(varMid) Then
i = lngMax
j = lngMin
ElseIf varMid = "" Then
i = lngMax
j = lngMin
ElseIf varType(varMid) = vbError Then
i = lngMax
j = lngMin
ElseIf varType(varMid) > 17 Then
i = lngMax
j = lngMin
End If
While i <= j
If i <= j Then
i = i + 1
j = j - 1
End If
Wend
End Sub
-------------------------------------
s�ralam array
For AR1 = LBound(eArray, 1) To UBound(eArray, 1)
eValue = eArray(AR1)
For AR2 = LBound(eArray, 1) To UBound(eArray, 1)
If eArray(AR2) < eValue Then
eArray(AR1) = eArray(AR2)
eArray(AR2) = eValue
eValue = eArray(AR1)
End If
Next AR2
Next AR1
-------------------------------------
's�ralam array
Sub sortlist()
For n = 1 To UBound(xarr)
zarr(n, 1) = 1
Next n
For n = 1 To UBound(xarr) - 1
y = zarr(n, 1)
For a = n + 1 To UBound(xarr)
If xarr(n, 1) > xarr(a, 1) Then
y = y + 1
Else
zarr(a, 1) = zarr(a, 1) + 1
End If
Next a
yarr(y, 1) = xarr(n, 1)
Next n
y = zarr(UBound(xarr), 1)
yarr(y, 1) = xarr(UBound(xarr), 1)
End Sub
-------------------------------------
'h�zl� s�ralama dizi array
Function QuickSort(vArray as Variant, size as integer) as Variant
Dim pt As Integer
Dim order_asc(size) As Integer
pt = 0
For Each vl_num In vArray
For Each vl_members In vArray
If vl_num > vl_members Then
pt = pt + 1
End If
Next
order_asc(pt) = vl_num
pt = 0
Next
Quicksort = order_asc
End Function
-------------------------------------
'Excel �oklu bul getir
Dim alan()
Sub buluver()
Sheets("VER�").Select
verisonsatir = Cells(Rows.Count, "A").End(3).Row
secim = "A2:D" & verisonsatir
alan = Range(secim)
Sheets("SONUC").Select
sonucsonsatir = Cells(Rows.Count, "A").End(3).Row
satir = 1
For i = 2 To sonucsonsatir
aranan = Cells(i, 1).Value
buldu = False
For j = 1 To verisonsatir - 1
bakilan = alan(j, 1)
If aranan = bakilan Then
satir = satir + 1
Cells(satir, "C").Value = alan(j, 1)
Cells(satir, "D").Value = alan(j, 2)
Cells(satir, "E").Value = alan(j, 3)
Cells(satir, "F").Value = alan(j, 4)
buldu = True
End If
Next
If buldu Then Cells(i, 2).Value = "Buldu" Else Cells(i, 2).Value = "Bulamad�"
Next i
End Sub
-------------------------------------
'Excel de m�zik note
Private Declare Function midiOutOpen Lib "winmm.dll" _
(lphMidiOut As Long, _
ByVal uDeviceID As Long, _
ByVal dwCallback As Long, _
ByVal dwInstance As Long, _
ByVal dwFlags As Long) As Long
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
With Alan
ActiveWorkbook.EnvelopeVisible = True
With .Parent.MailEnvelope
.Introduction = ""
With .Item
.Importance = 1 ' �NEM: 0=D��k,
1=Normal, 2=Y�ksek
.OriginatorDeliveryReportRequested = True ' Teslim bilgisi iste
.ReadReceiptRequested = True ' Okundu bilgisi iste
.Attachments.Add ThisWorkbook.Path & "\" & Cells(2, "Z").Value
.To = Adres
.CC = "deneme@yahoo.com"
.BCC = "deneme@yahoo.com"
.Subject = "Online Sat� Kargo Bilgileriniz"
.Send
End With
End With
End With
Son:
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
ActiveWorkbook.EnvelopeVisible = False
End Sub
-------------------------------------
'Hizli d�eyara oledb ile
Sub hizli_duseyara()
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableEvents = False
End With
Zaman = Timer
Range("b:b").Clear
sorgu = "select sayfa2.telefon from [sayfa1$] sayfa1 left join [sayfa2$] sayfa2 on
sayfa1.[ki�i no]=sayfa2.[ki�i no]"
Set rs = con.Execute(sorgu)
Sayfa1.Range("b2").CopyFromRecordset rs
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableEvents = True
End With
End Sub
-------------------------------------
'H�zl� d�eyara
Sub FastestVlookup()
Sheets("Sayfa2").Select
sayfa2sonsatir = Cells(Rows.Count, "A").End(3).Row
Sheets("Sayfa1").Select
sayfa1sonsatir = Cells(Rows.Count, "A").End(3).Row
secim = "B1:B" & sayfa1sonsatir
secim1 = "B2:B" & sayfa1sonsatir
Range(secim1).Select
Selection.ClearContents
Range("B2").Select
------------------------------------
'N�bet �izelgesi
Sub N�bet()
Application.ScreenUpdating = False
For a = 1 To 5
Range("D3:F14") = ""
For i = 4 To 6
Cells(4, 10) = Cells(2, i).Value
For j = 3 To 14
Cells(4, 9) = Cells(j, 3)
Range("AA3:AB62") = Range("L3:M62").Value
Range("AA3:AB62").Sort Range("AB3"), 1
Cells(j, i) = Range("AA3").Value
x = WorksheetFunction.Match(Range("AA3"), Range("L3:L62"), 0) + 3
Sheets("Data").Cells(x, Range("I5") + Range("J5") + 2) = Sheets("Data").Cells(x,
Range("I5") + Range("J5") + 2) + 1
Next
Next
Set n = Sheets("N�bet Listesi")
aa = a * 12 - 9
n.Range("D" & aa & ":F" & aa + 11) = Range("D3:F14").Value
n.Cells(aa, 2) = Range("D17") + a - 1
Next
Set n = Nothing
End Sub
------------------------------------
Sub GmailYolla()
'gmail ile mail g�nderme
Dim adres As String, Subject As String, HTMLBody As String, BCC As String
Dim iMsg As Object, iConf As Object, Flds
Application.DisplayAlerts = False
Set t = Sheets("sayfa1")
kime = t.Range("b1").Value
konu = t.Range("b2").Value
mesaj = t.Range("b3").Value
bilgi = t.Range("b4").Value
gizli = t.Range("b5").Value
dosyaeki = t.Range("b6").Value
sifre = InputBox("L�tfen �ifrenizi Giriniz" & vbLf & "�ayet Email G�nderilise �lem
Sonunda Mesaj Alacaks�n�z", "�ifre Gir")
If sifre = "" Then
MsgBox "�ifre Girmedi�iniz i�in i�lem iptal edildi. ", vbCritical, "��LEM �PTAL�"
Exit Sub
End If
If kime = "" Then
MsgBox "G�nderilecek ki�i bulunamad�. ", vbCritical, "D�KKAT"
Exit Sub
End If
Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")
Set Flds = iConf.Fields
schema = "http://schemas.microsoft.com/cdo/configuration/"
Flds.Item(schema & "sendusing") = 2
Flds.Item(schema & "smtpserver") = "smtp.gmail.com"
Flds.Item(schema & "smtpserverport") = 465
Flds.Item(schema & "smtpauthenticate") = 1
Flds.Item(schema & "sendusername") = "deneme@gmail.com"
Flds.Item(schema & "sendpassword") = sifre
Flds.Item(schema & "smtpusessl") = 1
Flds.Update
With iMsg
.To = kime
.CC = bilgi
.BCC = gizli
.From = "deneme<deneme@gmail.com>"
.Subject = konu
.HTMLBody = mesaj
.AddAttachment dosyaeki
.Sender = "deneme"
.Organization = "deneme"
.ReplyTo = "deneme@gmail.com"
Set .Configuration = iConf
SendEmailGmail = .send
syol = vbNullString
mailadresi = vbNullString
adres = vbNullString
Application.DisplayAlerts = True
MsgBox "E-posta ve dosya g�nderildi. ", vbInformation, "�letim Raporu"
End With
Set t = Nothing
Set iMsg = Nothing
Set iConf = Nothing
Set Flds = Nothing
End Sub
------------------------------------
'Bir aral��a de�er atama
Range("I18:I28") = 3
------------------------------------
'Aral�k Toplam ald�rma
toplam = WorksheetFunction.Sum(Range("I18:I28"))
------------------------------------
'Puan da��l�m
Sub Da��t()
Application.ScreenUpdating = False
Randomize
x = Int(WorksheetFunction.RandBetween(Range("M5"), Range("N5")) / 3)
Range("I18:I28") = 3
toplam = WorksheetFunction.Sum(Range("I18:I28"))
If x = toplam Then GoTo 10
5
y = WorksheetFunction.RandBetween(18, 28)
If Cells(y, 9) = 0 Then GoTo 5
Cells(y, 9) = Cells(y, 9) - 1
toplam = WorksheetFunction.Sum(Range("I18:I28"))
If x <> toplam Then GoTo 5
10
Range("E18:H28") = "( )"
For i = 18 To 28
Cells(i, 8).Offset(0, -1 * Cells(i, 9)) = "(x)"
Next
Range("I18:I28") = ""
End Sub
-----------------------------------
'Evet hay�r checkbox
Private Sub UserForm_Activate()
If Cells(1, "C").Value = "Evet" Then
OptionButton1.Value = True
OptionButton2.Value = False
End If
-----------------------------------
'S�ralama
=RANK(B3;$B$2:$B$100)
-----------------------------------
'klas�rdeki excel dosyalar�n� al�p alt alta yap�t�rma
Sub dosyalar_A()
Dim aktif As Workbook, sh As Worksheet, a As Long
Dim klasor As Object, evn As Object, xls As Object
Set sh = ThisWorkbook.Worksheets("A")
Set evn = CreateObject("scripting.filesystemobject")
Set klasor = evn.getfolder(ThisWorkbook.Path)
For Each xls In klasor.Files
If LCase(Mid(xls.shortname, InStr(1, xls.shortname, ".", 1) + 1)) =
"xls" Then
If xls.Name <> "SONU�.xls" And Left(xls.Name, 1) = "A" Then
Workbooks.Open (xls.Path)
Set aktif = ActiveWorkbook
a = aktif.Sheets(1).Range("a65536").End(3).Row
aktif.Sheets(1).Range("a2:l" & a).Copy
sh.Range("a65536").End(3)(2, 1).PasteSpecial xlPasteValues
aktif.Close False
End If
End If
Next xls
a = Empty
Set sh = Nothing
Set evn = Nothing
Set aktif = Nothing
Set klasor = Nothing
End Sub
Sub dosyalar_B()
Dim aktif As Workbook, sh As Worksheet, a As Long
Dim klasor As Object, evn As Object, xls As Object
Set sh = ThisWorkbook.Worksheets("B")
Set evn = CreateObject("scripting.filesystemobject")
Set klasor = evn.getfolder(ThisWorkbook.Path)
For Each xls In klasor.Files
If LCase(Mid(xls.shortname, InStr(1, xls.shortname, ".", 1) + 1)) =
"xls" Then
If xls.Name <> "SONU�.xls" And Left(xls.Name, 1) = "B" Then
Workbooks.Open (xls.Path)
Set aktif = ActiveWorkbook
a = aktif.Sheets(1).Range("a65536").End(3).Row
aktif.Sheets(1).Range("a2:l" & a).Copy
sh.Range("a65536").End(3)(2, 1).PasteSpecial xlPasteValues
aktif.Close False
End If
End If
Next xls
a = Empty
Set sh = Nothing
Set evn = Nothing
Set aktif = Nothing
Set klasor = Nothing
End Sub
-----------------------------------
'Say� �ret aras�nda
Function RndInt( lowerbound As Integer, upperbound As Integer ) As Integer
Randomize
RndInt = Int( lowerbound + Rnd( ) * ( upperbound - lowerbound + 1 ) )
End Function
-----------------------------------
'Kelime �retme
Sub kelimeuret()
karaktersayisi = 10
kelimesayisi = 2
kelimeseti = "ABCDEFGHI�JKLMNO�PRS�TU�VYZabcdefgh�ijklmno�prs�tu�vyz"
kacadeturetilecek = 5
For j = 1 To kacadeturetilecek
basadon:
Randomize
kelime1sayi = Int((karaktersayisi * Rnd) + 1)
kelime2sayi = Int((karaktersayisi * Rnd) + 1)
kelimeler = ""
For i = 1 To kelime1sayi
Randomize
sira = Int((Len(kelimeseti) * Rnd) + 1)
kelimeler = kelimeler & Mid(kelimeseti, sira, 1)
Next i
For i = 1 To kelime2sayi
Randomize
sira = Int((Len(kelimeseti) * Rnd) + 1)
kelimeler = kelimeler & Mid(kelimeseti, sira, 1)
Next i
-----------------------------------
'H�zl� d�ng�
Sub kod()
'Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
yol = ThisWorkbook.Path & "\PARCA_FIYATLARI_2016 (2).xlsx"
Workbooks.Open (yol)
Set x = ThisWorkbook.Sheets("B-PLAS ALIM")
Set xx = Workbooks("PARCA_FIYATLARI_2016 (2)").Sheets("BPO")
xr = x.Range("A65536").End(3).Row
xxr = xx.Range("A65536").End(3).Row
x.Range("B2:B" & xr) = Empty
ThisWorkbook.Activate
For k = 2 To xr
Set c = xx.Range("a5:a" & xxr).Find(x.Cells(k, "A"), LookIn:=xlValues)
If Not c Is Nothing Then
For a = 5 To 16
If Format(x.Cells(k, "D"), "mmmm") = Format(xx.Cells(2, a), "mmmm") Then
x.Cells(k, 2).Select
x.Cells(k, 2) = xx.Cells(c.Row, a)
End If
Next
End If
Next
-----------------------------------
'�lk iki kelimeyi alma 2 rakam� ka� kelime al�naca��n� g�sterir.
=SOLDAN(A1;BUL("|";YER�NEKOY(A1;" ";"|";2);1)-1)
=left(substitute(a1 & " ";" ";rept(" ";255);2);255)
-----------------------------------
'Outlook mail g�nderen ki�ilerin mail adreslerini al�r.
Sub mail_Adresi_getir()
-----------------------------------
'Mail adreslerini ay�klama. ozden@yahoo.com<seyit_ozden@yahoo.com>;mehmetes@ai
data.com.tr<
Sub test()
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.Filters.Clear
fd.Filters.Add "Metin dosyalar�(*.txt)", "*.txt", 1
ret = fd.Show
If Not ret = -1 Then Exit Sub
fn = fd.SelectedItems(1)
txt = CreateObject("Scripting.FileSystemObject").OpenTextFile(fn).readall
reg.Global = True
reg.MultiLine = True
reg.Pattern = "\<(.+?)\>"
Set mcol = reg.Execute(txt)
For i = 0 To mcol.Count - 1
Cells(i + 1, "a") = mcol(i).SubMatches(0)
Next
End Sub
----------------------------------
'ilk komut geri_sayim_baslat oldu�unda program verilen s�re sonunda kapan�r.
[code]
Public Cancel As Boolean
Public downtime As Date
Sub geri_sayim_baslat()
'1 dakika ayarland�.
downtime = Now + TimeValue("00:01:00")
Application.OnTime Earliesttime:=downtime, procedure:="cikis", schedule:=True
End Sub
Sub cikis()
End
End Sub[/code]
----------------------------------
'Program� yar�da kesme
CheckCancel
Call export_Module.copy_CSM_HRRep_Info_to_CSMTermData
CheckCancel
Call formula_Module.calculate_client_termination_data
Unload Me
end sub
Sub CheckCancel()
Dim Prompt As String
Dim Title As String
Dim Message As VbMsgBoxResult
doevents
If Cancel Then
Prompt = "The procedure has been cancelled." & vbNewLine & vbNewLine & "The
template will now close"
Title = "Procedure Canceled"
Message = MsgBox(Prompt, vbOKOnly + vbCritical, Title)
Unload Me
ThisWorkbook.Close savechanges:=False
End If
End Sub
-----------------------------------
'A1 deki kelimeyi listede ara renklendir.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("A1:A10000")) Is Nothing Then Exit Sub
sonsat = Range("A" & Rows.Count).End(xlUp).Row
Set Aln = Range("A3:A" & sonsat)
deg = Cells(1, 1).Value
For Each hcr In Aln
renk = InStr(renk + 1, hcr.Text, deg)
Do
If renk > 0 Then
hcr.Characters(Start:=renk, Length:=Len(deg)).Font.ColorIndex = 3
End If
renk = InStr(renk + 1, hcr.Text, deg)
Loop While renk > 0
Next hcr
End Sub
-----------------------------------
'say� 3 hane kals�n.
=E�ER(UZUNLUK(E�ER(UZUNLUK(A1)=4;A1;YUVARLA(A1;1)))<4;YUVARLA(A1;2);E�ER(UZUNLUK(A1
)=4;A1;YUVARLA(A1;1)))
-----------------------------------
!Devrik yap�t�r
Sub deneme()
Sheets("Veri").Select
a = Range("A1:K" & Cells(Rows.Count, 1).End(3).Row)
ReDim b(1 To Application.CountA(a), 1 To 3)
For i = 2 To UBound(a)
b(say + 1, 1) = a(i, 1)
For y = 2 To UBound(a, 2)
say = say + 1
If a(i, y) <> "" Then: c = c & "|" & a(i, y)
k = Split(c, "|")
b(say, 2) = a(1, y)
b(say, 3) = a(i, y)
say = UBound(k)
Next y
Next i
Sheets("Sonuc").Range("A2:C" & Rows.Count).ClearContents
If say > 0 Then
Sheets("Sonuc").Range("A2").Resize(say, 3) = b
End If
Sheets("Sonuc").Select
MsgBox "�lem Tamam.....", vbInformation
End Sub
-----------------------------------
'Bu �al�ma kitab�na eklenecekler
Private Sub workbook_open()
Call settimer
End Sub
Call stoptimer
Call settimer
End Sub
'Module 1 eklenecekler
Sub settimer()
Application.OnTime Earliesttime:=alerttime, _
procedure:="alertuser", schedule:=True
Application.OnTime Earliesttime:=downtime, _
procedure:="shutdown", schedule:=True
End Sub
Sub stoptimer()
Application.OnTime Earliesttime:=downtime, _
procedure:="shutdown", schedule:=False
End Sub
Sub shutdown()
Application.DisplayAlerts = True
With ThisWorkbook
'.Close
End With
End Sub
Sub alertuser()
Dim wsshell
End Sub
---------------------------------------
'Filtrede en �stteki veriyi alma
=�ND�S(B2:B100;M�N(E�ER(ALTTOPLAM(3;KAYDIR(B2;SATIR(B2:B100)-
SATIR(B2);0));SATIR(B2:B100)-SATIR(B2)+1)))
ctrl + Shift+ ALt ile girilmesi.
---------------------------------------
ABS = MUTLAK FIXED = SAYID�ZENLE ODD = TEK
ACCRINT = GER�EKFA�Z FLOOR = TABANAYUVARLA ODDFPRICE = TEKYDE�ER
ACCRINTM = GER�EKFA�ZV FORECAST = TAHM�N ODDFYIELD = TEKY�DEME
ACOS = ACOS FREQUENCY = SIKLIK ODDLPRICE = TEKSDE�ER
ACOSH = ACOSH FTEST = FTEST ODDLYIELD = TEKS�DEME
ADDRESS = ADRES FV = GD OFFSET = KAYDIR
AMORDEGRC = AMORDEGRC FVSCHEDULE = GDPROGRAM OR = YADA
AMORLINC = AMORLINC GAMMADIST = GAMADA� PEARSON = PEARSON
AND = VE GAMMAINV = GAMATERS PERCENTILE = Y�ZDEB�RL�K
AREAS = ALANSAY GAMMALN = GAMALN PERCENTRANK = Y�ZDERANK
ASC = ASC GCD = OBEB PERMUT = PERM�TASYON
ASIN = AS�N GEOMEAN = GEOORT PHONETIC = SES
ASINH = AS�NH GESTEP = BESINIR PI = P�
ATAN = ATAN GETPIVOTDATA = �ZETVER�AL PMT = DEVRESEL_�DEME
ATAN2 = ATAN2 GROWTH = B�Y�ME POISSON = POISSON
ATANH = ATANH HARMEAN = HARORT POWER = KUVVET
AVEDEV = ORTSAP HEX2BIN = HEX2BIN PPMT = ANA_PARA_�DEMES�
AVERAGE = ORTALAMA HEX2DEC = HEX2DEC PRICE = DE�ER
AVERAGEA = ORTALAMAA HEX2OCT = HEX2OCT PRICEDISC = DE�ER�ND
BAHTTEXT = BAHTTEXT HLOOKUP = YATAYARA PRICEMAT = DE�ERVADE
BESSELI = BESSELI HOUR = SAAT PROB = OLASILIK
BESSELJ = BESSELJ HYPERLINK = K�PR� PRODUCT = �ARPIM
BESSELK = BESSELK HYPGEOMDIST = H�PERGEOMDA� PROPER = YAZIM.D�ZEN�
BESSELY = BESSELY IF = E�ER PV = BD
BETADIST = BETADA� IMABS = SANMUTLAK QUARTILE = D�RTTEB�RL�K
BETAINV = BETATERS IMAGINARY = SANAL QUOTIENT = B�L�M
BIN2DEC = BIN2DEC IMARGUMENT = SANBA�_DE���KEN RADIANS = RADYAN
BIN2HEX = BIN2HEX IMCONJUGATE = SANE�LENEK RAND = S_SAYI_�RET
BIN2OCT = BIN2OCT IMCOS = SANCOS RANDBETWEEN = RASTGELEARALIK
BINOMDIST = B�NOMDA� IMDIV = SANB�L RANK = RANK
CEILING = TAVANAYUVARLA IMEXP = SAN�S RATE = FA�Z_ORANI
CELL = H�CRE IMLN = SANLN RECEIVED = GET�R�
CHAR = KARAKTER IMLOG10 = SANLOG10 REPLACE = DE���T�R
CHIDIST = K�KAREDA� IMLOG2 = SANLOG2 REPT = Y�NELE
CHIINV = K�KARETERS IMPOWER = SAN�SS� RIGHT = SA�DAN
CHITEST = K�KARETEST IMPRODUCT = SAN�ARP ROMAN = ROMEN
CHOOSE = ELEMAN IMREAL = SANGER�EK ROUND = YUVARLA
CLEAN = TEM�Z IMSIN = SANSIN ROUNDDOWN = A�A�IYUVARLA
CODE = KOD IMSQRT = SANKAREK�K ROUNDUP = YUKARIYUVARLA
COLUMN = S�TUN IMSUB = SAN�IKAR ROW = SATIR
COLUMNS = S�TUNSAY IMSUM = SANTOPLA ROWS = SATIRSAY
COMBIN = KOMB�NASYON INDEX = �ND�S RSQ = RKARE
COMPL
EX = KARMA�IK INDIRECT = DOLAYLI RTD = RTD
CONCATENATE = B�RLE�T�R INFO = B�LG� SEARCH = MBUL
CONFIDENCE = G�VEN�RL�K INT = TAMSAYI SECOND = SAN�YE
CONVERT = �EV�R INTERCEPT = KESMENOKTASI SERIESSUM = SER�TOPLA
CORREL = KORELASYON INTRATE = FA�ZORANI SIGN = ��ARET
COS = COS IPMT = FA�ZTUTARI SIN = S�N
COSH = COSH IRR = ��_VER�M_ORANI SINH = S�NH
COUNT = BA�_DE�_SAY ISBLANK = BO�TUR SKEW = �ARPIKLIK
COUNTA = BA�_DE�_DOLU_SAY ISERR = HATADIR SLN = DA
COUNTBLANK = BO�LUKSAY ISERROR = HATALIDIR SLOPE = E��M
COUNTIF = E�ERSAY ISEVEN = ��FTT�R SMALL = K���K
COUPDAYBS = KUPONG�NBD ISLOGICAL = MANTIKSALDIR SQRT = KAREK�K
COUPDAYS = KUPONG�N ISNA = YOKTUR SQRTPI = KAREK�KP�
COUPDAYSNC = KUPONG�NDSK ISNONTEXT = MET�NDE��LD�R STANDARDIZE =
STANDARTLA�TIRMA
COUPNCD = KUPONG�NSKT ISNUMBER = SAYIDIR STDEV = STDSAPMA
COUPNUM = KUPONSAYI ISODD = TEKT�R STDEVA = STDSAPMAA
COUPPCD = KUPONG�N�KT ISPMT = ISPMT STDEVP = STDSAPMAS
COVAR = KOVARYANS ISREF = BA�VURUDUR STDEVPA = STDSAPMASA
CRITBINOM = KR�T�KB�NOM ISTEXT = MET�ND�R STEYX = STHYX
CUMIPMT = TOP�DENENFA�Z JIS = JIS SUBSTITUTE = YER�NEKOY
CUMPRINC = TOPANAPARA KURT = BASIKLIK SUBTOTAL = ALTTOPLAM
DATE = TAR�H LARGE = B�Y�K SUM = TOPLA
DATEVALUE = TAR�HSAYISI LCM = OKEK SUMIF = ETOPLA
DAVERAGE = VSE�ORT LEFT = SOLDAN SUMPRODUCT = TOPLA.�ARPIM
DAY = G�N LEN = UZUNLUK SUMSQ = TOPKARE
DAYS360 = G�N360 LINEST = DOT SUMX2MY2 = TOPX2EY2
DB = AZALANBAK�YE LN = LN SUMX2PY2 = TOPX2PY2
DCOUNT = VSE�SAY LOG = LOG SUMXMY2 = TOPXEY2
DCOUNTA = VSE�SAYDOLU LOG10 = LOG10 SYD = YAT
DDB = ��FTAZALANBAK�YE LOGEST = LOT T = M
DEC2BIN = DEC2BIN LOGINV = LOGTERS TAN = TAN
DEC2HEX = DEC2HEX LOGNORMDIST = LOGNORMDA� TANH = TANH
DEC2OCT = DEC2OCT LOOKUP = ARA TBILLEQ = HTAHE�
DEGREES = DERECE LOWER = K���KHARF TBILLPRICE = HTAHDE�ER
DELTA = DELTA MATCH = KA�INCI TBILLYIELD = HTAH�DEME
DEVSQ = SAPKARE MAX = MAK TDIST = TDA�
DGET = VAL MAXA = MAKA TEXT = METNE�EV�R
DISC = �ND�R�M MDETERM = DETERM�NANT TIME = ZAMAN
DMAX = VSE�MAK MDURATION = MS�RE TIMEVALUE = ZAMANSAYISI
DMIN = VSE�M�N MEDIAN = ORTANCA TINV = TTERS
DOLLAR = L�RA MID = ORTADAN TODAY = BUG�N
DOLLARDE = L�RAON MIN = M�N TRANSPOSE = DEVR�K_D�N���M
DOLLARFR = L�RAKES MINA = M�NA TREND = E��L�M
DPRODUCT = VSE��ARP MINUTE = DAK�KA TRIM = KIRP
DSTDEV = VSE�STDSAPMA MINVERSE = D�ZEY_TERS TRIMMEAN = KIRPORTALAMA
DSTDEVP = VSE�STDSAPMAS MIRR = D_��_VER�M_ORANI TRUE = DO�RU
DSUM = VSE�TOPLA MMULT = D�ARP TRUNC = NSAT
DURATION = S�RE MOD = MOD�LO TTEST = TTEST
DVAR = VSE�VAR MODE = EN�OK_OLAN TYPE = T�R
DVARP = VSE�VARS MONTH = AY UPPER = B�Y�KHARF
EDATE = SER�TAR�H MROUND = KYUVARLA VALUE = SAYIYA�EV�R
EFFECT = ETK�N MULTINOMIAL = �OKTER�ML� VAR = VAR
EOMONTH = SER�AY N = S VARA = VARA
ERF = HATA��LEV NA = YOKSAY VARP = VARS
ERFC = T�MHATA��LEV NEGBINOMDIST = NEGBINOMDA� VARPA = VARSA
ERROR.TYPE = HATA.T�P� NETWORKDAYS = TAM��G�N� VDB = DAB
EVEN = ��FT NOMINAL = NOM�NAL VLOOKUP = D��EYARA
EXACT = �ZDE� NORMDIST = NORMDA� WEEKDAY = HAFTANING�N�
EXP = �S NORMINV = NORMTERS WEEKNUM = HAFTASAY
EXPONDIST = �STELDA� NORMSDIST = NORMSDA� WEIBULL = WEIBULL
FACT = �ARPINIM NORMSINV = NORMSTERS WORKDAY = ��G�N�
FACTDOUBLE = ��FTFAKT�R NOT = DE��L XIRR = A��VER�MORANI
FALSE = YANLI� NOW = ��MD� XNPV = ANBD
FDIST = FDA� NPER = D�NEM_SAYISI YEAR = YIL
FIND = BUL NPV = NBD YEARFRAC = YILORAN
FINV = FTERS OCT2BIN = OCT2BIN YIELD = �DEME
FISHER = FISHER OCT2DEC = OCT2DEC YIELDDISC = �DEME�ND
FISHERINV = FISHERTERS OCT2HEX = OCT2HEX YIELDMAT = �DEMEVADE
ZTEST = ZTEST
---------------------------------------
'yan yana olanlar� alt alta s�ralama
Private Sub CommandButton1_Click()
x = Cells(Rows.Count, 1).End(3).Row
For a = 4 To Cells(1, Columns.Count).End(xlToLeft).Column Step 2
b = Cells(Rows.Count, "B").End(3).Row
c = Cells(Rows.Count, a).End(3).Row
Range("B" & b + 1 & ":C" & b + c).Value = Range(Cells(1, a), Cells(c, a + 1)).Value
Range("A" & b + 1 & ":A" & b + c).Value = Range("A1:A" & x).Value
Range(Cells(1, a), Cells(c, a + 1)).ClearContents
Next
End Sub
---------------------------------------
'klas�rdeki resimleri excel e ekleme
Sub InsertAllPictures() 'Well Construction Desigh Plan
Dim DB, Dosya As Workbook, s1, s2, s3, s4, s5, s6 As Worksheet
Set DB = ThisWorkbook
Set s1 = ThisWorkbook.Worksheets("Main")
Dim strPath As String
Dim strFileName As String
Dim myPict As Picture
With ActiveCell.Range("A1:B19")
With myPict.Select
Selection.ShapeRange.Height = 768
Selection.ShapeRange.Width = 1024
Selection.ShapeRange.LockAspectRatio = msoFalse
'Selection.ShapeRange.IncrementTop 10 '60.75
Selection.ShapeRange.ScaleHeight 1, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.PictureFormat.Crop.PictureWidth = 1024
Selection.ShapeRange.PictureFormat.Crop.PictureHeight = 1448
Selection.ShapeRange.PictureFormat.Crop.PictureOffsetX = 0
Selection.ShapeRange.PictureFormat.Crop.PictureOffsetY = -10 '-10
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.ScaleHeight 0.7803157883, msoFalse, msoScaleFromTopLeft
'sadece bunu ve '0.7803157883 well constraction design plan i�in
Selection.ShapeRange.PictureFormat.Crop.PictureWidth = 1024
Selection.ShapeRange.PictureFormat.Crop.PictureHeight = 1448
Selection.ShapeRange.PictureFormat.Crop.PictureOffsetX = 0
Selection.ShapeRange.PictureFormat.Crop.PictureOffsetY = 100 '30 'bunu
de�i�tir
Selection.ShapeRange.LockAspectRatio = msoFalse
'Selection.ShapeRange.IncrementLeft 93
Selection.ShapeRange.ScaleWidth 1, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.PictureFormat.Crop.PictureWidth = 1023
Selection.ShapeRange.PictureFormat.Crop.PictureHeight = 1448
Selection.ShapeRange.PictureFormat.Crop.PictureOffsetX = 0 '-48
'Selection.ShapeRange.PictureFormat.Crop.PictureOffsetY = -10
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.ScaleWidth 0.6283567435, msoFalse, msoScaleFromTopLeft
'0.6283567435 well constraction design plan i�in
Selection.ShapeRange.PictureFormat.Crop.PictureWidth = 1023
Selection.ShapeRange.PictureFormat.Crop.PictureHeight = 1448
Selection.ShapeRange.PictureFormat.Crop.PictureOffsetX = 50 '126
'Selection.ShapeRange.PictureFormat.Crop.PictureOffsetY = -10
Application.ScreenUpdating = True
End With
s1.Visible = True
s1.Copy After:=Worksheets(Worksheets.Count)
ActiveSheet.Name = UCase(Left(strFileName, 5))
strFileName = Dir
s1.Activate
s1.Cells(1, 1).Select
Loop
End With
End Sub
---------------------------------------
atlayarak toplam alma
=TOPLA.�ARPIM((MOD(S�TUN(C3:FB3);5)=3)*(C3:FB3))
--------------------------------------
'�lk kelimeden sonrakileri silme
H�cre aral���n� se�in >
Ctrl + H (De�i�tir)
Aranan De�er: * (bir bo�luk y�ld�z)
Yeni De�er: Bo� b�rak�n
T�m�n� De�i�tir.
Merhaba Ctrl+H tu�u ile bul ve de�i�tir k�sm�nda DELAY: 15* de�i�tir DELAY:15olarak
denermisiniz.
--------------------------------------
Sub cember_Ciz()
t = ActiveCell.Top 'Konum aktif h�crenin
l = ActiveCell.Left 'sol �st kenar�
h = Cells(1, 2).Value '�ap�
w = h
Sub cember_sil()
Selection.ShapeRange.Delete
End Sub
--------------------------------------
'outlook olmadan mail g�nderme
Sub mailg�nder()
If a = vbNo Then
MsgBox "i�lemi iptal ettiniz.!"
Exit Sub
End If
kullanici_sahibi = "kullan�c�@gmail.com"
kullanici_parola = "123456"
objEmail.Subject = Cells(10, 4)
'objEmail.Textbody = "Test Text Body"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") =
kullanici_sahibi '"kullan�c�@hotmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
kullanici_parola '"parola"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
"smtp.gmail.com"
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
.Update
End With
objEmail.Send
MsgBox "i�lem tamam.", vbApplicationModal, "Bilgilendirme!"
End Sub
--------------------------------------
'Word bul de�i�tir.
Sub degistir()
ChDir "c:\"
Set wd = CreateObject("word.Application")
wd.Visible = True
wrd = Application.GetOpenFilename(",*.doc*")
If wrd = False Then Exit Sub
wd.Application.Documents.Open wrd
Application.DisplayAlerts = False
For i = 1 To [a65536].End(3).Row
With ActiveDocument.Content.Find
.Text = Cells(i, "a")
.Replacement.Text = Cells(i, "b")
.Execute Replace:=wdReplaceAll
End With
Next
Application.DisplayAlerts = True
End Sub
--------------------------------------
'Written: September 15, 2010
'Author: Leith Ross
'Summary: Printout files in a directory that have a pdf, jpg, or tif extension.
'http://www.excelforum.com/excel-programming-vba-macros/745764-print-pdf-jpeg-and-
tif-files.html
Sub PrintFiles()
FileName = Dir(DirPath)
End Sub
--------------------------------------
Sub PrintFiles()
DirPath = "C:\yaz\"
FileName = Dir(DirPath)
End Sub
-------------------------------------
'Yurtta� 2012
Sub BulDegistir3()
Dim aln As Range, BulArr(), DeglArr(), a As Integer
On Error GoTo 10
Set aln = Application.InputBox(prompt:="S�tun / S�tunlar se�in...", _
Title:="Se�ilecek S�tun / S�tunlar", Type:=8)
BulArr = Array("ş", "ı", "Ç", "İ", "Ş", "ü", "�-", "Ü", "Ğ", "ğ", "ö", "ç")
'Bulunacaklar
DegArr = Array("�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�", "�")
'De�i�tirilecekler
Application.ScreenUpdating = False
Application.ScreenUpdating = True
10
End Sub
Sub BulDegistir4()
Dim aln As Range, BulArr(), DeglArr(), a As Integer
On Error GoTo 10
Set aln = Application.InputBox(prompt:="S�tun / S�tunlar se�in...", _
Title:="Se�ilecek S�tun / S�tunlar", Type:=8)
BulArr = Array([A2], [A3], [A4], [A5], [A6], [A7], [A8], [A9], [A10], [A11], [A12],
[A13]) 'Bulunacaklar
DegArr = Array([B2], [B3], [B4], [B5], [B6], [B7], [B8], [B9], [B10], [B11], [B12],
[B13]) 'De�i�tirilecekler
Application.ScreenUpdating = False
Application.ScreenUpdating = True
10
End Sub
'D�ng� y�ntemi.
Sub BulDegistir5()
Bassat = 1
Bitsat = 14
Next i
End Sub
'D�ng� y�ntemi.
Sub BulDegistir6()
Dim i As Long
End Sub
'Range y�ntemi
Sub BulDegistir7()
Dim Lst, aln
Set Lst = Sheets("�rnek").Range("A2:B13") 'find/replace �iftinin oldu�u
s�tunlar
Set aln = Sheets("�rnek").Range("C:AA") 'arama yap�lacak s�tunlar
For Each hcr In Lst.Columns(1).Cells
aln.Replace what:=hcr.Value, replacement:=hcr.Offset(0, 1).Value
Next hcr
End Sub
-----------------------------------
Excel'de payla��lan bir dosya �zerinde hangi kullan�c�lar�n ne t�r i�lemleri
yapt���n� g�rmek istiyorsan�z a�a��daki i�lem ad�mlar�n� uygulaman�z yeterli
olacakt�r.
Ek bilgi:
Ara�lar>�al�t�rma Kitab�n� Payla�t�r dedi�inizde a��lan pencerede 2 farkl� sekme
bulunur.D�zenleme ve Geli�mi� se�ene�i.
D�zenleme penceresinde "Ayn� anda birden fazla kullan�c�n�n de�i�iklik yapmas�na
izin ver" kutucu�u tiklenir.
Geli�mi� penceresinde de yukar�da anlat�lan History-Tarih�e yani ge�mi� i�lem
kayd�n�n ka� g�nl�k saklanaca��(ilk de�er 30 g�nd�r) , ve bu i�lemlerin hangi
a�amada kayda ge�irilece�i(otomatik kay�t ya da 15dk'da 1 gibi) bilgileri
yeralmaktad�r.
Birden fazla kullan�c� ayn� anda ayn� h�crelere veri girerse hangisinin ge�erli
olaca��n�n ayarland�g� b�l�m bu pencerededir.
Save'lenen yani kay�t yap�lan bir dosyada bile son yap�lan i�lemleri geri alarak
hatal� i�lemin �zerine yap�lan kay�t i�lemini tersine �evirmek m�mk�nd�r
-----------------------------------
'Soyad�n�n ilk harfini alma.
=SOLDAN(PAR�AAL(B2;E�ER(EHATA(BUL(" ";B2;BUL(" ";B2;1)+1)+1);BUL(" ";B2;1)+1;BUL("
";B2;BUL(" ";B2;1)+1)+1);100);1)
=TOPLA.�ARPIM(--(PAR�AAL($B$2:$B$10001;BUL("#";YER�NEKOY($B$2:$B$10001;"
";"#";UZUNLUK($B$2:$B$10001)-UZUNLUK(YER�NEKOY($B$2:$B$10001;" ";""))))+1;1)="A"))
=SA�DAN(B4;UZUNLUK(B4)-BUL("*";YER�NEKOY(B4;" ";"*";UZUNLUK(B4)-
UZUNLUK(YER�NEKOY(B4;" ";"")))))
-----------------------------------
'A kolonunda otomatik s�ra no
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
End Sub
-----------------------------------
'dosya kopyalama
Sub dasya_kopyalama_ve_isim_ver()
Yol = "C:\Ar�iv\"
HedefKlasor = "C:\bul\"
dosya = Dir(Yol & "*.pdf")
Exit For
End If
Next
dosya = Dir
Loop
Range(Cells(1, 20), Cells(65000, 20)).ClearContents
MsgBox "�leminiz tamamlanm�t�r.", vbInformation
End Sub
-----------------------------------
'combobox � doldurma
Private Sub UserForm_Click()
For Each hucre In Range("a1:a" & WorksheetFunction.CountA(Range("a1:a65000")))
liste.AddItem hucre.Value
Next
End Sub
----------------------------------
'Mailleri klas�re kaydetme
Public Sub Outlok_Yedek(itm As Outlook.MailItem)
On Error Resume Next
MkDir saveFolder & "\" & itm.Sender.Name 'G�nderen ad�nda klas�r olu�turur
ChDir saveFolder & "\" & itm.Sender.Name '
saveFolder = saveFolder & "\" & itm.Sender.Name ' & "-" & dateFormat
MkDir saveFolder & "\" & dateFormat & "-" & itm.Subject 'itm.Sender.Name '
Mail ad�nda dosya olu�turur.
ChDir saveFolder & "\" & dateFormat & "-" & itm.Subject 'itm.Sender.Name '
saveFolder = saveFolder & "\" & dateFormat & "-" & itm.Subject
dosyaadi = saveFolder & "\[" & dateFormat & "] [" & itm.Sender.Name & "] [" &
degistir(itm.Subject) & "].msg"
itm.SaveAs dosyaadi ' Maili diske kaydeder.
End Sub
-------------------------------
'Outlook daki mailleri excel e aktarma
Option Explicit
Sub GetFromInbox()
Const olFolderDrafts = 6
Dim olApp As Object, olNS As Object
Dim oRootFldr As Object
Dim lCalcMode As Long
x = Date
lrow = 2
lCalcMode = Application.Calculation
Application.Calculation = xlCalculationManual
GetFromFolder oRootFldr
Application.Calculation = lCalcMode
lrow = lrow + 1
End With
End If
Next
For Each oSubFldr In oFldr.Folders
GetFromFolder oSubFldr
Next
End Sub
-------------------------------
'Rasgele kod �retme
Function RSH(say As Integer, dizi As String)
Dim i As Integer
For i = 1 To say
Randomize
sira = Int((Len(dizi) * Rnd) + 1)
RSH = RSH & Mid(dizi, sira, 1)
Next i
End Function
-------------------------------
Sub htmltarihdegistir()
'excele
yenitarih = "16.11.2016"
End Sub
-------------------------------
'Yazd�rmay� engellemek i�in
-------------------------------
'kelimelik
Dim tsatir, tsutun As Integer
Dim oncei, sonrai, sagi, soli As Integer
Dim kolon, deger, okunan, solkutu, sagkutu, sayfaadi, gec As String
Dim ysolkelime, ysagkelime, dkelime, dsolkelime, dsagkelime, arakelime, referans As
String
Dim a, harfref, gecici, kelimetext, araharf As String
Dim say, i, i1, i2, j, j1, j2, kelimesayisi, ensonsatir, sonsatir As Long
Dim kelime, satir, sutun, yon As Long
Dim baglantivar, uygundegil, uygunmu, dsol, dsag, ysol, ysag As Boolean
Public kontrol As Boolean
Dim puan, puansatir, puansutun, toppuan, toppuangec, kelimecarpan As Integer
'Option Explicit
Sub kelimeyukle()
kelimeuzunlugu = 15
Sheets("Kelimelistesi").Select
sonsatir = Cells(Rows.Count, "A").End(3).Row
say = 0
For i = 2 To sonsatir
gec = Cells(i, 1).Value
If Len(gec) > kelimeuzunlugu Then Exit For
If gec <> "" Then
say = say + 1
kelimeler(say) = gec
End If
Next i
kelimesayisi = say
Sheets(sayfaadi).Select
End Sub
Sub tablo_oku()
For i = 1 To 15
For j = 1 To 15
gec = Cells(i, j).Value
tablo(i, j, 1) = gec
Next j
Next i
Sheets("PUANSABLON").Select
For i = 1 To 15
For j = 1 To 15
If j > 15 Then Exit For
gec = Cells(i, j).Value
If gec = "H2" Then
tablo(i, j, 2) = 2
tablo(i, j, 3) = 1
End If
If gec = "H3" Then
tablo(i, j, 2) = 3
tablo(i, j, 3) = 1
End If
If gec = "K2" Then
tablo(i, j, 3) = 2
tablo(i, j, 2) = 1
End If
If gec = "K3" Then
tablo(i, j, 3) = 3
tablo(i, j, 2) = 1
End If
If gec <> "H2" And gec <> "H3" And gec <> "K2" And gec <> "K3" Then
tablo(i, j, 2) = 1
tablo(i, j, 3) = 1
End If
Next j
Next i
Sheets(sayfaadi).Select
say = 0
For i = 2 To 16
say = say + 1
puanlistesi(say, 1) = Cells(i, 57).Value
puanlistesi(say, 2) = Cells(i, 58).Value
Next i
For i = 2 To 15
say = say + 1
puanlistesi(say, 1) = Cells(i, 63).Value
puanlistesi(say, 2) = Cells(i, 64).Value
Next i
End Sub
Sub menu_kontrol()
Application.ScreenUpdating = False
Application.EnableEvents = False
calisma = True
sayfaadi = ActiveSheet.Name
referans = Cells(17, 1).Value
Range("AX5:BC100000").ClearContents
'Call Module2.harflerden_kelime_turet
Application.ScreenUpdating = False
Application.EnableEvents = False
Call tablo_oku
Call kelimeyukle
Call kelime_kontrol
If dikeyolsun = "EVET" Then Call kelime_kontrol_yandan_dikey
If yatayolsun = "EVET" Then Call kelime_kontrol_yandan_yatay
Call bulunanlariyukle
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Sub bulunanlariyukle()
For i = 1 To 100000
bulunanlar(i, 1) = ""
bulunanlar(i, 2) = ""
bulunanlar(i, 3) = ""
bulunanlar(i, 4) = ""
bulunanlar(i, 5) = ""
bulunanlar(i, 6) = ""
Next i
Range("AW5:BC60000").ClearContents
satir = 4
For j = 1 To i
If uygunolanlar(j, 1) = "" Then Exit For
If uygunolanlar(j, 6) <> "X" Then
satir = satir + 1
Cells(satir, "AX").Value = uygunolanlar(j, 1)
Cells(satir, "AY").Value = uygunolanlar(j, 2)
Cells(satir, "AZ").Value = uygunolanlar(j, 3)
Cells(satir, "BA").Value = uygunolanlar(j, 4)
Cells(satir, "BB").Value = uygunolanlar(j, 7)
Cells(satir, "BC").Value = uygunolanlar(j, 5)
gec = uygunolanlar(j, 5)
If gec = "" Then
a = a
End If
Next hcr
End If
Next j
End Sub
Sub yukari_bak()
dsolkelime = Mid(kelime, i1, 1)
dsol = False
i = 0
puan = 0
toppuangec = 0
kelimekatimi = False
kelimecarpan = 0
For i = satir - 1 To 1 Step -1
gec = tablo(i, sutun, 1)
If gec = "" Then Exit For
If gec <> "" Then
dsolkelime = gec + dsolkelime
baglantivar = True
End If
Next i
If yon = 1 Then
dsolkelime = Mid(dsolkelime, 1, Len(dsolkelime) - 1) + kelime
End If
End Sub
Sub asagi_bak_harfsonda()
dsagkelime = Mid(kelime, i1, 1)
dsag = False
i = 0
puan = 0
toppuangec = 0
kelimekatimi = False
kelimecarpan = 0
For i = satir + 1 To 15
gec = tablo(i, sutun, 1)
If gec = "" Then Exit For
If gec <> "" Then
puan = puanine(gec)
toppuangec = toppuangec + (puan * tablo(i, sutun, 2))
If tablo(i, sutun, 3) > 1 Then
kelimekati = True
kelimecarpan = kelimecarpan + tablo(i, sutun, 3)
End If
dsagkelime = dsagkelime + gec
End If
Next i
If Not kelimebul_tablo(dsagkelime) And dsagkelime <> Mid(kelime, i1, 1) Then
dsag = False
Else
dsag = True
If i <> satir + 1 Then
puansatir = i
puansutun = sutun
'Call puantopla
End If
End If
End Sub
Sub asagi_bak()
dsagkelime = Mid(kelime, i1, 1)
dsag = False
i = 0
puan = 0
toppuangec = 0
kelimekatimi = False
kelimecarpan = 0
For i = satir + 1 To 15
gec = tablo(i, sutun, 1)
If gec = "" Then Exit For
If gec <> "" Then
dsagkelime = dsagkelime + gec
baglantivar = True
End If
Next i
If Not kelimebul_tablo(dsagkelime) And dsagkelime <> Mid(kelime, i1, 1) Then
dsag = False
Else
dsag = True
End If
End Sub
Sub sola_bak()
ysolkelime = Mid(kelime, i1, 1)
If kelime = "VURDUMDUYMAZLIK" Then
a = a
End If
ysol = False
i = 0
puan = 0
toppuangec = 0
kelimekatimi = False
kelimecarpan = 0
For i = sutun + 1 To 15
gec = tablo(satir, i, 1)
If gec = "" Then Exit For
If gec <> "" Then
ysolkelime = ysolkelime + gec
baglantivar = True
End If
Next i
End If
End Sub
Sub saga_bak()
ysagkelime = Mid(kelime, i1, 1)
ysag = False
i = 0
puan = 0
toppuangec = 0
kelimekatimi = False
kelimecarpan = 0
For i = sutun - 1 To 1 Step -1
gec = tablo(satir, i, 1)
End Sub
Sub kelime_kontrol()
sonsatir = Cells(Rows.Count, "AX").End(3).Row
For j = 1 To bulsay
kelime = uygunolanlar(j, 1)
If kelime = "MUVAFFAK�YETS�Z" Then
a = a
End If
If kelime = "" Then GoTo son
satir = uygunolanlar(j, 2)
ilksatir = satir
sutun = uygunolanlar(j, 3)
ilksutun = sutun
yon = uygunolanlar(j, 4)
uygunmu = True
toppuan = 0
puan = 0
For i1 = 1 To Len(kelime)
dsol = False
dsag = False
ysol = False
ysag = False
'yukar� bak
If (yon = 0) Or (yon = 1 And i1 = 1) And satir <> 1 Then Call yukari_bak
If satir = 1 Then dsol = True
If yon = 1 And i1 > 1 Then dsol = True
'asagi bak
If yon = 0 And satir <> 15 Then Call asagi_bak
If yon = 0 And satir = 15 Then dsag = True
If yon = 1 Then dsag = True
'sola bak
If yon = 1 And (sutun <> 15 Or yon <> 0) Then Call sola_bak
If sutun = 15 Or yon = 0 Then ysol = True
'saga bak
If (yon = 1) Or (yon = 0 And i1 = 1) And sutun <> 1 Then Call saga_bak
If yon = 0 And i1 > 1 Then ysag = True
If sutun = 1 Then ysag = True
If yon = 1 Then
i1 = 1
satir = ilksatir
sutun = ilksutun
Call asagi_puanla
uygunolanlar(j, 7) = toppuan
End If
If yon = 0 Then
i1 = 1
satir = ilksatir
sutun = ilksutun
Call sola_puanla
uygunolanlar(j, 7) = toppuan
End If
son:
Next j
End Sub
Sub kelime_kontrol_yandan_dikey()
sonsatir = Cells(Rows.Count, "AW").End(3).Row
For j = 5 To sonsatir
kelime = Cells(j, "AW").Value
If kelime = "MAYIN" Then
a = a
End If
For jbos = 1 To 15
If jsut < 15 Then If tablo(jbos, jsut + 1, 1) <> "" Then Exit For
If jsut > 1 Then If tablo(jbos, jsut - 1, 1) <> "" Then Exit For
Next jbos
If jbos = 16 Then GoTo son2
For jsat = 1 To 15
If jsat = 3 And jsut = 8 Then
a = a
End If
yon = 1
ilksatir = jsat
ilksutun = jsut
satir = jsat
sutun = jsut
bossay = 0
dolumu = False
For jbos = jsat To Len(kelime) + jsat - 1
If jbos = 16 Then Exit For
If tablo(jbos, jsut, 1) <> "" Then Exit For
bossay = bossay + 1
If jsut < 15 Then If yon = 1 And (tablo(jbos, jsut + 1, 1) <> "" Or
tablo(jbos, jsut - 1, 1) <> "") Then dolumu = True
If jsut = 15 Then If yon = 1 And (tablo(jbos, jsut - 1, 1) <> "") Then
dolumu = True
Next jbos
End If
uygunmu = True
uygundegil = False
toppuan = 0
puan = 0
baglantivar = False
For i1 = 1 To Len(kelime)
dsol = False
dsag = False
ysol = False
ysag = False
'yukar� bak
If (yon = 0) Or (yon = 1 And i1 = 1) And satir <> 1 Then Call yukari_bak
If satir = 1 Then dsol = True
If yon = 1 And i1 > 1 Then dsol = True
'asagi bak
If yon = 0 And satir <> 15 Then Call asagi_bak
If yon = 0 And satir = 15 Then dsag = True
If yon = 1 Then dsag = True
'sola bak
If yon = 1 And (sutun <> 15 Or yon <> 0) Then Call sola_bak
If sutun = 15 Or yon = 0 Then ysol = True
'saga bak
If (yon = 1) Or (yon = 0 And i1 = 1) And sutun <> 1 Then Call saga_bak
If yon = 0 And i1 > 1 Then ysag = True
If sutun = 1 Then ysag = True
Next i1
If yon = 1 Then
i1 = 1
satir = jsat
sutun = jsut
Call asagi_puanla
uygunolanlar(bulsay, 7) = toppuan
'Cells(j, "BB").Value = toppuan
End If
If yon = 0 Then
i1 = 1
satir = jsat
sutun = jsut
Call sola_puanla
uygunolanlar(bulsay, 7) = toppuan
End If
End If
son:
Next jsat
son2:
Next jsut
Next j
End Sub
Sub kelime_kontrol_yandan_yatay()
sonsatir = Cells(Rows.Count, "AW").End(3).Row
For j = 5 To sonsatir
kelime = Cells(j, "AW").Value
If kelime = "RIH" Then
a = a
End If
For jbos = 1 To 15
If jsat < 15 Then If tablo(jsat + 1, jbos, 1) <> "" Then Exit For
If jsat > 1 Then If tablo(jsat - 1, jbos, 1) <> "" Then Exit For
Next jbos
If jbos = 16 Then GoTo son2
For jsut = 1 To 15
If jsut = 6 And jsat = 9 Then
a = a
End If
yon = 0
ilksatir = jsat
ilksutun = jsut
satir = jsat
sutun = jsut
bossay = 0
dolumu = False
For jbos = jsut To Len(kelime) + jsut - 1
If jbos = 16 Then Exit For
If tablo(jsat, jbos, 1) <> "" Then Exit For
bossay = bossay + 1
Next jbos
End If
uygunmu = True
uygundegil = False
toppuan = 0
puan = 0
baglantivar = False
For i1 = 1 To Len(kelime)
dsol = False
dsag = False
ysol = False
ysag = False
'yukar� bak
If (yon = 0) Or (yon = 1 And i1 = 1) And satir <> 1 Then Call yukari_bak
If satir = 1 Then dsol = True
If yon = 1 And i1 > 1 Then dsol = True
'asagi bak
If yon = 0 And satir <> 15 Then Call asagi_bak
If yon = 0 And satir = 15 Then dsag = True
If yon = 1 Then dsag = True
'sola bak
If yon = 1 And (sutun <> 15 Or yon <> 0) Then Call sola_bak
If sutun = 15 Or yon = 0 Then ysol = True
'saga bak
If (yon = 1) Or (yon = 0 And i1 = 1) And sutun <> 1 Then Call saga_bak
If yon = 0 And i1 > 1 Then ysag = True
If sutun = 1 Then ysag = True
If yon = 1 Then
satir = satir + 1
If satir = 16 Then Exit For
End If
If yon = 0 Then
sutun = sutun + 1
If sutun = 16 Then Exit For
End If
Next i1
If yon = 1 Then
i1 = 1
satir = jsat
sutun = jsut
Call asagi_puanla
uygunolanlar(bulsay, 7) = toppuan
'Cells(j, "BB").Value = toppuan
End If
If yon = 0 Then
i1 = 1
satir = jsat
sutun = jsut
Call sola_puanla
uygunolanlar(bulsay, 7) = toppuan
End If
End If
son:
Next jsut
son2:
Next jsat
Next j
End Sub
Sub asagi_puanla()
i = 0
puan = 0
toppuan = 0
toppuangec = 0
kelimekatimi = False
kelimecarpan = 0
i1 = 0
For i = satir To 15
i1 = i1 + 1
If i1 > Len(kelime) Then Exit For
gec = Mid(kelime, i1, 1)
puan = puanine(gec)
If tablo(i, sutun, 1) = "" Then
toppuangec = toppuangec + (puan * tablo(i, sutun, 2))
Else
toppuangec = toppuangec + puan
End If
End Sub
Sub sola_puanla()
i = 0
puan = 0
toppuan = 0
toppuangec = 0
kelimekatimi = False
kelimecarpan = 0
i1 = 0
For i = sutun To 15
i1 = i1 + 1
If i1 > Len(kelime) Then Exit For
gec = Mid(kelime, i1, 1)
puan = puanine(gec)
If tablo(satir, i, 1) = "" Then
toppuangec = toppuangec + (puan * tablo(satir, i, 2))
Else
toppuangec = toppuangec + puan
End If
End Sub
------------------------------
'kelimelik
Public puanlistesi(29, 2) As String
Dim kelimeler(100000, 2) As String
Dim kelimelerby(100000) As String
Dim kelimeliste(100000) As String
Dim kelkutu(15, 15) As String
Public sonsat As Long, deg As String, hcr As Range, Aln As Range, Code As Boolean
Dim verisayfa As Worksheet, renk
Dim harf, yontem As String
Dim joker As Boolean
Dim i, i1, i2, j, harfref, gecici, ii1, sonsatirparca, kelsay, sonsatir, sutun As
Long
Dim parcasonbossay, ilkbossay, sonbossay, a, bulunansay, kel1say, doluilk, dolusay,
bossay As Integer
Dim kolon, gec, kelime0, kelime1, kelime2, kelime3, kelime4, kelime5, kelime01,
kelime02 As String
Dim sonsatirturet, puan, sonsatirsirala, sonsatirpuan, jj, sonsatirtasi, vari,
sonsatirekle As Long
Dim satir1, z As Long
Dim kelimetext, kolon1, kolon2 As String
Dim tablodolu, sonbosbuldu, Buldu, parcali, ilkbosvar, bosvar, doluvar As Boolean
Dim tablo(15, 15, 3) As String
Dim tablo_puan(15, 15) As String
Public siralapuan, siralayon, siralasutun, siralasatir, siralakelime As Byte
'Option Explicit
Sub Auto_Open()
calisma = True
End Sub
Sub aciklamafontu()
calisma = True
Dim hucre As Range
Sub MENU()
calisma = True
Call buyukharfyap
Cells(16, 9).Value = "D�ZENLE"
Cells(16, 9).Value = ""
kelimeuzunlugu = Cells(9, 17).Value
dikeyolsun = buyukharf(Cells(11, 17).Value)
yatayolsun = buyukharf(Cells(13, 17).Value)
Cells(11, 17).Value = dikeyolsun
Cells(13, 17).Value = yatayolsun
Range("AV5:BC100000").ClearContents
sayfaadi = ActiveSheet.Name
Application.ScreenUpdating = False
Application.EnableEvents = False
Call ana_ekran_bicimle
Call kelimelistesi_sirala
say = 0
say2 = 0
referans = ""
joker = False
For refi = 9 To 15
If Cells(refi, "P").Value = "*" Then joker = True
If (Cells(refi, "P").Value <> " ") And (Cells(refi, "P").Value <> "*") Then
referans = referans + Cells(refi, "P").Value
Next refi
If referans = "" Then
MsgBox ("HARF ler girilmemi�.")
GoTo son
End If
referansturet = referans
Cells(4, "AW").Value = referansturet
Call tablo_oku
If Not tablodolu Then GoTo tablobossa
Call kelimelisteyukle
Call baslik_yaz
Call yukaridan_sablon
Call soldan_sablon
Call parcali_kelimeler
Call Parcali_Kelimeler_Sirala
Call kelime_ekle
Application.ScreenUpdating = False
Call harflerden_kelime_turet
Call Module1.menu_kontrol
Application.ScreenUpdating = False
Call sirala
tablobossa:
'Call harflerden_kelime_turet
Call tahtayi_yukle
Application.ScreenUpdating = True
Application.EnableEvents = True
son:
Range("AX9").Select
calisma = True
End Sub
Sub secili_kelime_sil()
sayfaadi = ActiveSheet.Name
Application.DisplayAlerts = False
gec = Selection.Value
Selection.Clear
Sheets("Kelimelistesi").Select
Else
hata.Select
If gec = Selection.Value Then Selection.Delete Shift:=xlUp
End If
Sheets("Kelimelistesihizli").Select
Set hata = Cells.Find(What:=gec, After:=ActiveCell, LookIn:=xlFormulas,
LookAt:= _
xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=True _
, SearchFormat:=False)
Else
hata.Select
If gec = Selection.Value Then Selection.Delete Shift:=xlUp
End If
Application.DisplayAlerts = True
Sheets(sayfaadi).Select
End Sub
Sub ozelkelimeyukle()
sonsatir = Cells(Rows.Count, "AV").End(3).Row
sayozel = 0
For i = 5 To sonsatir
gec = Cells(i, "AV").Value
If gec <> "" Then
sayozel = sayozel + 1
kelimeler(sayozel, 1) = gec
End If
Next i
kelimesayisi = sayozel
End Sub
Function ozelkelimebul(ByVal kelime As String) As Boolean
sayozel = 0
For i = 1 To kelimesayisi
gec = kelimeler(i)
If gec = kelime Then
kelimebul_ozel = True
Exit Function
End If
Next i
kelimebul_ozel = False
End Function
Sub buyukharfyap()
For i = 1 To 15
gec = Cells(i, "P").Value
gec = buyukharf(gec)
Cells(i, "P").Value = gec
Next i
End Sub
Sub tablo_oku()
Range("A1:P15").Select
Selection.Replace What:=" ", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("AV11").Select
tablodolu = False
For i = 1 To 15
For j = 1 To 15
gec = Cells(i, j).Value
gec = buyukharf(gec)
Cells(i, j).Value = gec
tablo(i, j, 1) = gec
If gec <> "" Then tablodolu = True
Next j
Next i
End Sub
Sub doldur()
Application.ScreenUpdating = Fasle
Application.EnableEvents = False
dolumu = False
For i = 1 To 15
For j = 1 To 15
If Cells(i, j + 100).Value <> "" Then dolumu = True
Next j
Next i
If dolumu Then
For i = 1 To 15
For j = 1 To 15
Cells(i, j).Value = Cells(i, j + 100).Value
Cells(i, j).Font.ColorIndex = 1
Next j
Next i
Else
MsgBox ("T�m Kelimeleri Bul u yeniden �al�t�rmal�s�n�z.")
calisma = True
Cells(16, 9).Value = "D�ZENLE"
End If
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
Sub onizleme_btn()
End Sub
Sub tahtayi_yukle()
Application.ScreenUpdating = False
calisma = True
For i = 1 To 15
For j = 1 To 15
'liste(i, j, 1) = Cells(i, j).Value
Cells(i, j + 100).Value = Cells(i, j).Value
Next j
Next i
Application.ScreenUpdating = True
End Sub
Sub tahtayi_temizle()
calisma = True
Application.ScreenUpdating = False
Range("AV5:BB60000").ClearContents
Range("P2:P7").ClearContents
Range("P9:P15").ClearContents
For i = 1 To 15
For j = 1 To 15
Cells(i, j + 100).Value = ""
Cells(i, j).Value = ""
Next j
Next i
Cells(16, 9).Value = "D�ZENLE"
Cells(1, "P").Value = "JOKER"
Cells(8, "P").Value = "HARF"
Application.ScreenUpdating = True
End Sub
Sub kelimelisteyukle()
Sheets("Kelimelistesi").Select
sonsatir = Cells(Rows.Count, "A").End(3).Row
sayliste = 0
For i = 2 To sonsatir
gec = Cells(i, 1).Value
If Len(gec) > kelimeuzunlugu Then Exit For
If gec <> "" Then
sayliste = sayliste + 1
kelimeliste(sayliste) = gec
End If
Next i
kelimesayisi = sayliste
Sheets(sayfaadi).Select
End Sub
Sub baslik_yaz()
Columns("AX:AY").Select
Selection.ClearContents
Cells(4, "AX").Value = "�NER�LER"
Cells(4, "AY").Value = "SATIR"
Cells(4, "AZ").Value = "S�TUN"
Cells(4, "BA").Value = "Y�N"
Range("A2").Select
Columns("BW:BY").Select
Selection.ClearContents
Range("A2").Select
End Sub
Sub yukaridan_sablon()
'Columns("BW:BW").Select
Columns("R:S").Select
Cells(2, 16).Select
Selection.ClearContents
say2 = 0
satirkelime = 0
sutunkelime = 0
For sutun = 1 To 15
cumlesona = ""
Buldu = False
For satir = 1 To 15
harf = Cells(satir, sutun).Text
If harf <> "" Then
cumlesona = cumlesona + harf
Else
cumlesona = cumlesona + "?"
End If
Next satir
say2 = say2 + 1
sablonliste(say2, 1) = cumlesona
sablonliste(say2, 2) = 1
sablonliste(say2, 3) = sutun
sablonliste(say2, 4) = "1"
Next sutun
End Sub
Sub soldan_sablon()
satirkelime = 0
sutunkelime = 0
For satir = 1 To 15
cumlesona = ""
Buldu = False
For sutun = 1 To 15
harf = Cells(satir, sutun).Text
If harf <> "" Then
cumlesona = cumlesona + harf
Else
cumlesona = cumlesona + "?"
End If
Next sutun
say2 = say2 + 1
sablonliste(say2, 1) = cumlesona
sablonliste(say2, 2) = satir
sablonliste(say2, 3) = 1
sablonliste(say2, 4) = "0"
Next satir
End Sub
Sub parcali_kelimeler()
Columns("AU:AU").Select
Selection.ClearContents
Range("AU1").Select
Columns("AU:AU").Select
Selection.ClearContents
Range("AU1").Select
kelsay = 0
satir = 0
For i = 1 To 100000
kelimeler(i, 1) = ""
kelimeler1(i) = ""
bulunanlar(i, 1) = ""
bulunanlar(i, 2) = ""
bulunanlar(i, 3) = ""
bulunanlar(i, 4) = ""
kelimeler1(i) = ""
bulunanlar(i, 1) = ""
uygunolanlar(i, 1) = ""
sablonasil(i, 1) = ""
Next i
'Kelimeler birle�tiriliyor
yon = "AS"
sira = 0
For i2 = 1 To say2
kelime = sablonliste(i2, 1)
gec = ""
If kelime = "V?RD?MDUY?A?L?K" Then
a = a
End If
gecici = kelime
Range("CC1").Select
If i2 = 16 Then
yon = "SA"
sira = 0
End If
If i2 = 14 Then
a = a
End If
sira = sira + 1
'say = 0
a = 2
b = 2
gecici = gec
gecici = Replace(gecici, "?", "")
'** bo� dolu
If gecici <> "" Then
'If InStr(gec, "?") <= 0 Then Exit For
say = say + 1
'Cells(say, "AU").Value = gec
If yon = "AS" Then
'Cells(say, "AS").Value = bos & "," & sira & "," & "1"
sablonliste(say, 1) = gec
sablonliste(say, 2) = bos
sablonliste(say, 3) = sira
sablonliste(say, 4) = "1"
End If
If yon = "SA" Then
'Cells(say, "AS").Value = sira & "," & bos & "," & "0"
sablonliste(say, 1) = gec
sablonliste(say, 2) = sira
sablonliste(say, 3) = bos
sablonliste(say, 4) = "0"
End If
sablonliste(say, 6) = "Bo� dolu"
oncekidolu = dolu
dolu = 0
i = bos
bos = 0
bos2 = 0
dolu2 = 0
End If
End If
son5:
Next i
If dolu2 > 0 And (bos > 0 And dolu > 0 And bos > dolu And (dolu2 > bos Or
dolu2 = 15) And a = b) Then
If i = 15 And Mid(kelime, i, 1) = "?" Then
gec = Mid(kelime, dolu, dolu2)
Else
gec = Mid(kelime, dolu, dolu2 - dolu)
End If
gecici = gec
gecici1 = gec
For j = 0 To Len(gecici1)
gec = Mid(gecici1, 1, Len(gecici1) - j)
gecici = gec
gecici = Replace(gecici, "?", "")
'** dolu bo�
If gecici <> "" And InStr(gec, "?") > 0 Then
say = say + 1
'Cells(say, "AU").Value = gec
'Cells(say, "AS").Value = bos & "," & sira & ","
& "1"
If gec = "?E�E?" Then
a = a
End If
If yon = "AS" Then
sablonliste(say, 1) = gec
sablonliste(say, 2) = dolu
sablonliste(say, 3) = sira
sablonliste(say, 4) = "1"
End If
If yon = "SA" Then
sablonliste(say, 1) = gec
sablonliste(say, 2) = sira
sablonliste(say, 3) = dolu
sablonliste(say, 4) = "0"
End If
sablonliste(say, 6) = "Dolu bo�"
End If
Next j
If dolu2 > 0 And bos > 0 And dolu > 0 And bos > dolu And dolu2 = bos Then
oncekidolu = dolu
dolu = 0
i = bos
bos = 0
bos2 = 0
dolu2 = 0
End If
son7:
Next i
If Mid(kelime, i, 1) = "?" And bos > 0 And dolu > 0 And dolu > bos And
bos2 = 0 Then
bos2 = i
If Mid(kelime, bos2 + 1, 1) <> "?" And i <> 15 Then
dolu = 0
bos = 0
bos2 = 0
End If
If i <> 15 Then GoTo son4
End If
If Mid(kelime, i, 1) <> "?" And bos > 0 And dolu > 0 And bos2 > 0 And
bos2 > dolu And dolu > bos Then
dolu2 = i - 1
End If
If (Mid(kelime, 15, 1) = "?" And i = 15) And bos > 0 And dolu > 0 And
bos2 > 0 And bos2 > dolu And dolu > bos Then
dolu2 = 16
End If
If (bos > 0 And dolu > 0 And bos2 > 0 And dolu2 > 0 And dolu > bos And
bos2 > dolu And a = b) Then
gec = Mid(kelime, bos, dolu2 - bos)
gecici = gec
uzunluk = bos2
gecici1 = gec
For j = 0 To 15 - uzunluk
gec = Mid(gecici1, 1, Len(gecici1) - j)
gecici = gec
If Mid(gec, Len(gec), 1) <> "?" Then Exit For
gecici = Replace(gecici, "?", "")
'bo� dolu, bo�
If gecici <> "" And InStr(gec, "?") > 0 Then
say = say + 1
If yon = "AS" Then
sablonliste(say, 1) = gec
sablonliste(say, 2) = bos
sablonliste(say, 3) = sira
sablonliste(say, 4) = "1"
End If
If yon = "SA" Then
sablonliste(say, 1) = gec
sablonliste(say, 2) = sira
sablonliste(say, 3) = bos
sablonliste(say, 4) = "0"
End If
sablonliste(say, 6) = "Bo� dolu,bo�"
End If
Next j
gecici2 = Replace(gecici, "?", "")
If gecici2 <> "" Then
oncekidolu = dolu
dolu = 0
i = bos
bos = 0
bos2 = 0
dolu2 = 0
End If
End If
son4:
Next i
End If
If yon = "SA" Then
'Cells(say, "AS").Value = sira & "," & dolu & "," & "0"
sablonliste(say, 1) = gec
sablonliste(say, 2) = sira
sablonliste(say, 3) = dolu
sablonliste(say, 4) = "0"
End If
sablonliste(say, 6) = "iki dolu aras�"
dolu = 0
i = dolu2ilk - 1
bos = 0
dolu2 = 0
dolu2ilk = 0
End If
End If
son1:
Next i
'**Soldan azalt
dolu = 0
For i = 1 To 15
If Mid(kelime, i + 1, 100) = "" Then Exit For
If Mid(kelime, i, 1) <> "?" And dolu = 0 Then dolu = i
If Mid(kelime, i, 1) = "?" And a = b Then
gec = Mid(kelime, i + 1, 100)
gecici = gec
gecici = Replace(gecici, "?", "")
'Soldan azalt
If gecici <> "" Then
If InStr(gec, "?") <= 0 Then Exit For
say = say + 1
'Cells(say, "AU").Value = gec
If yon = "AS" Then
'Cells(say, "AS").Value = i + 1 & "," & sira & "," & "1"
sablonliste(say, 1) = gec
sablonliste(say, 2) = i + 1
sablonliste(say, 3) = sira
sablonliste(say, 4) = "1"
End If
If yon = "SA" Then
'Cells(say, "AS").Value = sira & "," & i + 1 & "," & "0"
sablonliste(say, 1) = gec
sablonliste(say, 2) = sira
sablonliste(say, 3) = i + 1
sablonliste(say, 4) = "0"
End If
sablonliste(say, 6) = "soldan azalat"
End If
End If
Next i
'**Sa�dan azalt
dolu = 0
For i = 1 To 15
'If Mid(kelime, 15, 1) <> "?" Then Exit For
If Mid(kelime, 1, Len(kelime) - i) = "" Then Exit For
If Mid(kelime, 16 - i, 1) <> "?" And dolu = 0 Then dolu = 16 - i
If Mid(kelime, 16 - i, 1) = "?" And a = b Then
gec = Mid(kelime, 1, Len(kelime) - i)
gecici = gec
gecici = Replace(gecici, "?", "")
'Sa�dan azalt
If gecici <> "" Then
If InStr(gec, "?") <= 0 Then Exit For
say = say + 1
'Cells(say, "AU").Value = gec
If yon = "AS" Then
'Cells(say, "AS").Value = 1 & "," & sira & "," & "1"
sablonliste(say, 1) = gec
sablonliste(say, 2) = 1
sablonliste(say, 3) = sira
sablonliste(say, 4) = "1"
End If
If yon = "SA" Then
'Cells(say, "AS").Value = sira & "," & 1 & "," & "0"
sablonliste(say, 1) = gec
sablonliste(say, 2) = sira
sablonliste(say, 3) = 1
sablonliste(say, 4) = "0"
End If
sablonliste(say, 6) = "sa�dan azalat"
End If
End If
Next i
End If
Next i
If a = b Then
For j = 0 To 15
soni2:
Next i2
sonii1:
End Sub
Sub Parcali_Kelimeler_Sirala()
'Ayn� olanlar� ele
saygec = 0
For i = 1 To say
gec = sablonliste(i, 1)
If gec = "???????????????" Then GoTo son
Buldu = False
For j = 1 To saygec
gec1 = sablonasil(j, 1)
If sablonliste(i, 1) = sablonasil(j, 1) And sablonliste(i, 2) =
sablonasil(j, 2) And sablonliste(i, 3) = sablonasil(j, 3) And sablonliste(i, 4) =
sablonasil(j, 4) Then
Buldu = True
Exit For
End If
Next j
Sub arabul()
For i = 1 To kelimesayisi
gec = kelimeliste(i)
If gec Like deg Then
arabulsay = arabulsay + 1
bulunanlar(arabulsay, 1) = gec
bulunanlar(arabulsay, 2) = sablonasil(ii1, 2)
bulunanlar(arabulsay, 3) = sablonasil(ii1, 3)
bulunanlar(arabulsay, 4) = sablonasil(ii1, 4)
bulunanlar(arabulsay, 6) = sablonasil(ii1, 6)
End If
Next i
End Sub
Sub kelime_ele_dizi()
jokerkelime = Cells(17, 1).Value
referans = referansturet
If joker Then uzunluk = Len(jokerkelime) Else uzunluk = 1
If joker Then
referans = referans + eklekelime + Mid(jokerkelime, jokeri, 1)
Else
referans = referans + eklekelime
End If
For i = 1 To arabulsay
kelimetext = bulunanlar(i, 1)
If kelimetext = "" Then
Exit For
End If
gecici = kelimetext
For j1 = 1 To Len(referans)
harfref = Mid(referans, j1, 1)
gecici = Replace(gecici, harfref, "", 1, 1)
Next j1
End Sub
Sub kelime_ekle()
bulunansay = 0
bulsay = 0
For ii1 = 1 To say
arabulsay = 0
For i = 1 To 100000
bulunanlar(i, 1) = ""
bulunanlar(i, 2) = ""
bulunanlar(i, 3) = ""
bulunanlar(i, 4) = ""
Next i
sablon = sablonasil(ii1, 1)
If sablon = "?�I?" Then
a = a
End If
deg = sablon
eklekelime = Replace(deg, "?", "")
If eklekelime <> "" Then
Call arabul
If arabulsay >= 1 Then Call kelime_ele_dizi
End If
Next ii1
End Sub
Sub puanla()
'Range("BB5:BB60000").ClearContents
say = 0
For i = 2 To 16
say = say + 1
puanlistesi(say, 1) = Cells(i, 57).Value
puanlistesi(say, 2) = Cells(i, 58).Value
Next i
For i = 2 To 15
say = say + 1
puanlistesi(say, 1) = Cells(i, 63).Value
puanlistesi(say, 2) = Cells(i, 64).Value
Next i
End Sub
Sub ana_ekran_bicimle()
calisma = True
sonsatir = Range("AX" & Rows.Count).End(xlUp).Row
kolon = "AV5:BB" & Trim(Str(sonsatir))
Range(kolon).Select
With Selection.Font
.Name = "Calibri"
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
With Selection.Font
.Name = "Calibri"
.Size = 24
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
Selection.Font.Bold = True
Selection.Font.Bold = False
With Selection.Font
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
End With
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Range("AV5").Select
End Sub
Sub sirala()
'sayfaadi = ActiveSheet.Name
sonsatirsirala = Range("AX" & Rows.Count).End(xlUp).Row
kolon = "AX4:BC" & Trim(Str(sonsatirsirala))
kolon1 = "AY5:AY" & Trim(Str(sonsatirsirala))
kolon2 = "AZ5:AZ" & Trim(Str(sonsatirsirala))
kolon3 = "BA5:BA" & Trim(Str(sonsatirsirala))
kolon4 = "BB5:BB" & Trim(Str(sonsatirsirala))
Range("AX4:BC4").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Add Key:=Range(kolon1 _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Add Key:=Range(kolon2 _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Add Key:=Range(kolon3 _
), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:=xlSortNormal
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Add Key:=Range(kolon4 _
), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=xlSortNormal
With ActiveWorkbook.Worksheets(sayfaadi).Sort
.SetRange Range(kolon)
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("AX5").Select
Range(kolon1).Select
With Selection.Font
.Name = "Calibri"
.Size = 24
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ThemeColor = xlThemeColorLight1
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("AX2").Select
Selection.Font.Bold = False
Columns("AY:AY").ColumnWidth = 11.14
Columns("BA:BA").ColumnWidth = 7
Columns("R:AU").Select
Range("AU1").Activate
Selection.EntireColumn.Hidden = True
Range("BC7").Select
Columns("BB:BB").ColumnWidth = 10.71
Range("AX4").Select
ActiveCell.FormulaR1C1 = "�NER�LER"
Range("AY4").Select
ActiveCell.FormulaR1C1 = "SATIR"
Range("AZ4").Select
ActiveCell.FormulaR1C1 = "S�TUN"
Range("BA4").Select
ActiveCell.FormulaR1C1 = "Y�N"
Range("BB4").Select
ActiveCell.FormulaR1C1 = "PUAN"
Range("AX4").Select
Selection.Copy
Range("AX4:BB4").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("AZ5").Select
Columns("BA:BA").ColumnWidth = 8.43
Range("AX4").Select
'fontu 24 yap
Range("AX5:BB5").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWindow.SmallScroll Down:=-18
With Selection.Font
.Name = "Calibri"
.Size = 24
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.TintAndShade = 0
.ThemeFont = xlThemeFontMinor
End With
With Selection
.HorizontalAlignment = xlGeneral
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Range("AX5").Select
End Sub
sayfaadi = ActiveSheet.Name
Range("AW5:AW100000").ClearContents
Range("CM1:CN100000").ClearContents
'Range("CP1:DP60000").ClearContents
joker = False
If Cells(4, "AW").Value = "" Then
referans = ""
For refi = 9 To 15
If Cells(refi, "P").Value = "*" Then joker = True
If (Cells(refi, "P").Value <> " ") And (Cells(refi, "P").Value <> "*") Then
referans = referans + Cells(refi, "P").Value
Next refi
referans = buyukharf(referans)
referansturet = referans
Cells(4, "AW").Value = referansturet
Else
referansturet = Cells(4, "AW").Value
If InStr(referansturet, "*") > 0 Then joker = True
referansturet = buyukharf(referansturet)
Cells(4, "AW").Value = referansturet
referans = referansturet
End If
For i = 1 To 100000
kelimeler(i, 1) = ""
kelimeler(i, 2) = ""
Next i
's�rala uzunluk
Range("CN1").Select
ActiveCell.FormulaR1C1 = "=LEN(RC[-1])"
Columns("CN:CN").ColumnWidth = 21.71
kolon = "CN1:CN" & Trim(Str(sonsatirturet))
Selection.AutoFill Destination:=Range(kolon)
Range(kolon).Select
Range("CN5").Select
Columns("CN:CN").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("CN6").Select
Application.CutCopyMode = False
Range("CN2").Select
Columns("CM:CN").Select
Range("CN1").Activate
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Add Key:=Range( _
"CN1:CN100000"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption _
:=xlSortNormal
ActiveWorkbook.Worksheets(sayfaadi).Sort.SortFields.Add Key:=Range( _
"CM1:CM100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets(sayfaadi).Sort
.SetRange Range("CM1:CN100000")
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Columns("CM:CM").ColumnWidth = 25.43
For z = 5 To sonsatirturet
satir = satir + 1
kelime = Cells(z, "CM").Value
kelimeler(satir, 1) = kelime
Next z
son:
If joker Then
referansturet = referans + Mid(jokerkelime, jokeri, 1)
Else
referansturet = referans
End If
For z = 1 To sonsatirturet
kelimetext = kelimeler(z, 1)
If kelimetext = "DA�" Then
a = a
End If
If Len(kelimetext) > Len(referansturet) Then
kelimeler(z, 2) = "X"
GoTo sonz
End If
gecici = kelimetext
For j1 = 1 To Len(referansturet)
harfref = Mid(referansturet, j1, 1)
gecici = Replace(gecici, harfref, "", 1, 1)
Next j1
Next z
For z = 1 To satir
If kelimeler(z, 2) <> "X" Then
satir1 = satir1 + 1
Cells(satir1, 49).Value = kelimeler(z, 1)
End If
Next z
For i = 1 To 100000
kelimeler(i, 2) = ""
Next i
Next jokeri
Range("CM1:CN100000").ClearContents
Range("AW12").Select
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub
varmi = False
End Function
Sub ozelkelime_ele()
Call ozelkelimeyukle
sonsatir = Cells(Rows.Count, "AV").End(3).Row
sayozel = 0
For i = 5 To sonsatir
gec = Cells(i, "AV").Value
If Not ozelkelimebul(gec) Then
Cells(i, "AV").Value = ""
End If
Next i
End Sub
Sub ozelkelime_listele()
calisma = True
sayfaadi = ActiveSheet.Name
Application.ScreenUpdating = False
Set verisayfa = Sheets("Kelimelistesi")
sesliharfler = "AEI�O�U�"
sessizharfler = "BC�DFG�HJKLMNPRS�TVYZ"
Call kelimelisteyukle
seslibasla = False
seslibitir = False
sessizbasla = False
sessizbitir = False
Range("AV5:AV60000").ClearContents
say = 0
For i = 1 To kelimesayisi
If kelimeliste(i) <> "" Then
say = say + 1
Cells(say + 4, "AV").Value = kelimeliste(i)
End If
Next i
Exit Sub
ozelfiltre:
'Sesli sessiz ay�r
Range("AV5:AV60000").ClearContents
verisayfa.Range("A2").AutoFilter
verisayfa.Range("A2").AutoFilter Field:=1, Criteria1:="=" & deg
sonsat = verisayfa.Range("A" & Rows.Count).End(xlUp).Row
Else
kelimeler(i, 1) = ""
End If
Next i
Range("AV5:AV60000").ClearContents
say = 0
For i = 1 To kelimesayisi
If kelimeler(i, 1) <> "" Then
say = say + 1
Cells(say + 4, "AV").Value = kelimeler(i, 1)
End If
Next i
End Sub
Sub sirala_puan()
calisma = True
If siralapuan = 1 Then
siralapuan = 0
yontem = xlDescending
Else
siralapuan = 1
yontem = xlAscending
End If
Range("AX4:BC4").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"BB5:BB100000"), SortOn:=xlSortOnValues, Order:=yontem, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AY5:AY100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AZ5:AZ100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort
.SetRange Range("AX4:BC100000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("AX5").Select
End Sub
Sub sirala_yon()
calisma = True
If siralayon = 1 Then
siralayon = 0
yontem = xlDescending
Else
siralayon = 1
yontem = xlAscending
End If
Range("AX4:BC4").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"BA5:BA100000"), SortOn:=xlSortOnValues, Order:=yontem, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"BB5:BB100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AY5:AY100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AZ5:AZ100000"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=
_
xlSortNormal
With ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort
.SetRange Range("AX4:BC100000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("AX5").Select
End Sub
Sub sirala_sutun()
calisma = True
If siralasutun = 1 Then
siralasutun = 0
yontem = xlDescending
Else
siralasutun = 1
yontem = xlAscending
End If
Range("AX4:BC4").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AZ5:AZ100000"), SortOn:=xlSortOnValues, Order:=yontem, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AY5:AY100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"BB5:BB100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AX5:AX100000"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=
_
xlSortNormal
With ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort
.SetRange Range("AX4:BC100000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("AX5").Select
End Sub
Sub sirala_satir()
calisma = True
If siralasatir = 1 Then
siralasatir = 0
yontem = xlDescending
Else
siralasatir = 1
yontem = xlAscending
End If
Range("AX4:BC5").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AY5:AY100000"), SortOn:=xlSortOnValues, Order:=yontem, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AZ5:AZ100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"BA5:BA100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"BB5:BB100000"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=
_
xlSortNormal
With ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort
.SetRange Range("AX4:BD100000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("AX5").Select
End Sub
Sub sirala_kelime()
calisma = True
If siralakelime = 1 Then
siralakelime = 0
yontem = xlDescending
Else
siralakelime = 1
yontem = xlAscending
End If
Range("AX4:BC4").Select
Range(Selection, Selection.End(xlDown)).Select
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Clear
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AX5:AX100000"), SortOn:=xlSortOnValues, Order:=yontem, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"BB5:BB100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AY5:AY100000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort.SortFields.Add Key:=Range( _
"AZ5:AZ100000"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:=
_
xlSortNormal
With ActiveWorkbook.Worksheets(ActiveSheet.Name).Sort
.SetRange Range("AX4:BC100000")
.Header = xlYes
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("AX5").Select
End Sub
Sub kelimelistesi_sirala()
Sheets("Kelimelistesi").Select
Columns("B:B").Select
Selection.ClearContents
Range("B1").Select
ActiveCell.FormulaR1C1 = "=LEN(RC[-1])"
Range("B1").Select
Selection.AutoFill Destination:=Range(kolon)
Range(kolon).Select
Columns("A:B").Select
ActiveWorkbook.Worksheets("Kelimelistesi").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Kelimelistesi").Sort.SortFields.Add Key:=Range( _
kolon), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Kelimelistesi").Sort
.SetRange Range(kolon2)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A1").Select
Sheets(sayfaadi).Select
End Sub
-----------------------------
'H�cre i�inde �arpma toplam
Private Sub Worksheet_Change(ByVal Target As Range)
End Sub
-----------------------------
Sub Google_Search()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "www.google.com.tr"
IE.Visible = True
While IE.Busy
DoEvents
Wend
---------------------------
'web sayfas�ndaki script i �al�t�rmak i�in
IE.Document.parentwindow.execscript
"handleKeyDown({which:13,preventDefault:function(){}});"
----------------------------------------------------
'A1 deki verileri b1 deki say�ya g�re b�l. c,d,e ye kopyala
Sub bol_kopyala()
Columns("C:Z").Select
Selection.ClearContents
Range("C1").Select
For i = 1 To kackolon
secsonsatir = secilksatir + kacsatirtasi - 1
secim = "A" & secilksatir & ":A" & secsonsatir
Range(secim).Select
Selection.Copy
Cells(1, i + 2).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("C1").Select
secilksatir = secsonsatir + 1
Next i
End Sub
----------------------------------------------------
'input tabindex bilgi giri�i
Dim IE As Object
Sub bekle()
With IE
Do Until .readyState = 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop
End With
End Sub
Sub loginscript()
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate "https://ec2-54-84-55-5.compute-1.amazonaws.com"
Call bekle
basla:
Call bekle
If InStr(IE.document.body.innerText, "Remember") = 0 Then
GoTo basla
End If
---------------------------------------------------
'Word gereksiz sat�rlar� sil.
Sub gereksiz_sil()
Dim p As Paragraph
For Each p In ActiveDocument.Paragraphs
If Not p.Range.Information(wdWithInTable) Then
If p.Range.Font.Bold = False And InStr(p.Range.Text, "Fitobentoz T�rleri,
Say�lar� ve Biyohacimleri") = 0 Then
p.Range.Delete
End If
End If
Next
End Sub
---------------------------------------------------
'text dosya sat�r oku s�tun yaz
Public Sub text_oku()
Dim ReadData As String
Open "veri.txt" For Input As #1
say = 0
sira = 2
Do Until EOF(1)
Line Input #1, ReadData
If ReadData <> ";" Then
alanadi = Left(ReadData, InStr(1, ReadData, ";") - 1)
alandegeri = Mid(ReadData, InStr(1, ReadData, ";") + 1, Len(ReadData))
say = say + 1
If say = 1 Then Cells(1, 1).Value = alanadi
If say = 2 Then Cells(1, 2).Value = alanadi
If say = 3 Then Cells(1, 3).Value = alanadi
---------------------------------------------------
'Sa� daki t�m kolonlaro A da birle�tir.
Sub adabirlestir()
sonsutun = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns,
SearchDirection:=xlPrevious).Column
For i = sonsutun To 2 Step -1
sonsatir = Cells(Rows.Count, i).End(3).Row
asonsatir = Cells(Rows.Count, "A").End(3).Row + 1
Range(Cells(2, i), Cells(sonsatir, i)).Select
Selection.Cut
Cells(asonsatir, 1).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Next i
End Sub
---------------------------------------------------
'Aratoplam al�p sayfa sonu ekleme
Sub menu()
Call yazici_ayarla
Call sayfasonu
End Sub
Sub yazici_ayarla()
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = ""
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.708661417322835)
.RightMargin = Application.InchesToPoints(0.708661417322835)
.TopMargin = Application.InchesToPoints(0.393700787401575)
.BottomMargin = Application.InchesToPoints(0.393700787401575)
.HeaderMargin = Application.InchesToPoints(0.31496062992126)
.FooterMargin = Application.InchesToPoints(0.31496062992126)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintSheetEnd
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.PrintErrors = xlPrintErrorsDisplayed
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.ScaleWithDocHeaderFooter = True
.AlignMarginsHeaderFooter = True
.EvenPage.LeftHeader.Text = ""
.EvenPage.CenterHeader.Text = ""
.EvenPage.RightHeader.Text = ""
.EvenPage.LeftFooter.Text = ""
.EvenPage.CenterFooter.Text = ""
.EvenPage.RightFooter.Text = ""
.FirstPage.LeftHeader.Text = ""
.FirstPage.CenterHeader.Text = ""
.FirstPage.RightHeader.Text = ""
.FirstPage.LeftFooter.Text = ""
.FirstPage.CenterFooter.Text = ""
.FirstPage.RightFooter.Text = ""
End With
Application.PrintCommunication = True
End Sub
Sub sayfasonu()
ActiveWindow.View = xlPageBreakPreview
ActiveSheet.DisplayAutomaticPageBreaks = False
ActiveSheet.ResetAllPageBreaks
For i = 1 To 100000
If Cells(i, 2) = "" Then Exit For
If i Mod 51 = 0 Then
Rows(i).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Cells(i, 2).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-49]C:R[-1]C)"
Rows(i + 1).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Cells(i + 1, 1).Select
ActiveCell.FormulaR1C1 = "Tarih"
Cells(i + 1, 2).Select
ActiveCell.FormulaR1C1 = "Kasa Tahsilat�"
Cells(i + 1, 3).Select
ActiveCell.FormulaR1C1 = "Onay Ki�i"
Cells(i + 1, 4).Select
ActiveCell.FormulaR1C1 = "Onay Tarihi"
Columns("D:D").EntireColumn.AutoFit
Columns("C:C").EntireColumn.AutoFit
Columns("B:B").EntireColumn.AutoFit
Columns("A:A").ColumnWidth = 13.29
Rows(i).Select
Selection.Copy
Rows(i + 2).Select
usttoplam = i + 2
Selection.Insert Shift:=xlDown
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks
_
:=False, Transpose:=False
Application.CutCopyMode = False
Cells(i + 1, 1).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add before:=ActiveCell
End If
Next i
End Sub
--------------------------------------------------
'3 kolonu tek kolonda birle�tirme
Sub sdebirlestir()
'S kolonunu temizler
Columns("S:S").Select
Selection.ClearContents
Range("S2").Select
With ActiveSheet
Set rngAF = .AutoFilter.Range.Offset(1, 0) _
.Resize(.AutoFilter.Range.Rows.Count - 1,
1).SpecialCells(xlCellTypeVisible)
For Each rngCell In rngAF
lCnt = lCnt + 1
lRow = rngCell.Row
If lCnt = lMax Then Exit For
Next rngCell
.Range("F" & lStart & ":K" & lRow).Select
End With
End Sub
-------------------------------------------------
'Yinelenenleri kald�r
Sub Yinelenenleri_kaldir()
For Each sayfa In Worksheets
sayfa.Select
Call ensonsatirne
Application.CutCopyMode = False
ActiveSheet.Range(Cells(1, 1), Cells(ensonsatir,
ensonsutun)).RemoveDuplicates Columns:=1, Header:=xlNo
Next
End Sub
-------------------------------------------------
'sheetsexists sayfa var m�
Sheets(aktifsayfa).Select
ActiveSheet.Hyperlinks.Add Anchor:=Cells(Target.Row, Target.Column + 5),
Address:="", SubAddress:= _
"'" & isim & "'!A1", TextToDisplay:=isim
Else
ActiveSheet.Hyperlinks.Add Anchor:=Cells(Target.Row, Target.Column + 5),
Address:="", SubAddress:= _
"'" & isim & "'!A1", TextToDisplay:=isim
End If
End Sub
-------------------------------------------------
'H�creye resim ekleme
Sub InsertPicture()
Dim sPicture As String, pic As Picture
sPicture = Application.GetOpenFilename _
("Pictures (*.gif; *.jpg; *.bmp; *.tif), *.gif; *.jpg; *.bmp; *.tif", _
, "Select Picture to Import")
Adres = ActiveWindow.RangeSelection.Address
.ShapeRange.LockAspectRatio = msoFalse
.Height = Range(Adres).Height - 4
.Width = Range(Adres).Width - 4
.Top = Range(Adres).Top + 2
.Left = Range(Adres).Left + 2
.Placement = xlMoveAndSize
End With
End Sub
-------------------------------------------------
'on error farkl� bir mesaj
Con.Open "provider=microsoft.ace.oledb.12.0;data source=" & ThisWorkbook.Path & "\"
& "xxx.mdb" & ""
if Con is nothing then
msgbox "Ba�lant� yok"
Exit sub
end if
-----------------------------------------------
'Sayfa ay�r
Sub sayfa_ayir()
ActiveSheet.ResetAllPageBreaks
sonsatir = Cells(Rows.Count, "A").End(3).Row
For i = 1 To sonsatir
yeni = Cells(i, 1).Value
If yeni <> eski And i <> 1 Then
Cells(i, 1).Select
ActiveWindow.SelectedSheets.HPageBreaks.Add before:=ActiveCell
End If
eski = yeni
Next i
End Sub
-----------------------------------------------
'kendi sayfas�na bilgi yaz.
Sub cekaktar2016()
Dim b
Sheets("ANASAYFA").Select
anasonsatir = Cells(Rows.Count, "A").End(3).Row
ensonsutun = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns,
SearchDirection:=xlPrevious).Column
For i = 1 To anasonsatir
port = Worksheets("ANASAYFA").Cells(i, 1).Value
portsonsatir = Worksheets(port).Cells(Rows.Count, "A").End(3).Row + 1
For j = 1 To ensonsutun
Worksheets(port).Cells(portsonsatir, j).Value =
Worksheets("ANASAYFA").Cells(i, j).Value
Next j
Next i
End Sub
-----------------------------------------------
Bu dedi�iniz Aylar ve G�nler i�in var.
B�yle seriler siz de olu�turabilirsiniz.
�rne�in t�m alfabeyi b�yle yapabilirsiniz
Bunun i�in :
A1 h�cresine A
A2 h�cresine B
.
.
.
giderek Z ye kadar yaz�n
Sonra :
-----------------------------------------------
'Kredi kart� taksitlendir.
Sub Taksitle()
sonsatir = Cells(Rows.Count, "A").End(3).Row
For i = sonsatir To 1 Step -1
bilgi = Cells(i, 1).Value
parcaliste = Split(bilgi, " ")
tarih = CDate(parcaliste(LBound(parcaliste)))
kactaksit = Val(parcaliste(UBound(parcaliste)))
metin = Mid(bilgi, Len(tarih) + 1, (Len(bilgi) - Len(tarih)) - Len(kactaksit))
If kactaksit > 1 Then
For j = kactaksit To 1 Step -1
yenitarih = DateAdd("m", j - 1, tarih)
yenimetin = yenitarih & metin & j & "/" & kactaksit
If j <> kactaksit Then
Cells(i, 1).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
End If
Cells(i, 1).Value = yenimetin
Next j
End If
Next i
End Sub
-----------------------------------------------
'Birle�tir t�rnaklar� sil de birle�tir.
Function birle�tirme2(Alan As Range, Optional Kriter = ",") As String
Dim Veri As Range
For Each Veri In Alan
deger = Veri.Value
deger = Replace(deger, """", "")
If Veri.Value <> "" Then
If birle�tirme2 = "" Then
birle�tirme2 = "'" & deger & "'"
Else
birle�tirme2 = birle�tirme2 & Kriter & "'" & deger & "'"
End If
End If
Next
End Function
-----------------------------------------------
'Birle�tir ay�ra�l�
Function birlest(hucre As Range, Optional imlec As String = "") As String
For Each alan In hucre
k = k & alan & imlec
Next alan
If imlec = "" Then
birlest = k
Else
birlest = VBA.Left(k, VBA.Len(k) - 1)
End If
End Function
-----------------------------------------------
'Metin birle�tirme aral�kl� =birle�tirme(A5:A11)
-----------------------------------------------
'Klas�r se�mek
Private Sub CommandButton1_Click()
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
If .Show = -1 Then TextBox1.Text = .SelectedItems(1)
End With
End Sub
---------------------------------------------
'Dosya se�ama a�ma
Sub Foo()
Dim retval As String
ChDir "C:\temp\"
retval = Application.GetOpenFilename(("Excel Files (*.xl*), *.xl*"), 1, "Select
File")
End Sub
--------------------------------------------
Symbol
Means
Example
:=""
Blanks
:="<>"
Non Blanks
:=Crit
Equals
Greater than
Less than
Begins with
End with
Contains
--------------------------------------------
'Sayfadaki nesneleri listeleme
Sub OLElist()
Dim oLe As OLEObject
For Each oLe In ActiveSheet.OLEObjects
MsgBox oLe.Name
Next
End Sub
--------------------------------------------
'herhangi bir h�crede 999 yaz�yor ise o sat�r� sil.
Sub SATIR_S�L()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For sat = 1269 To 1 Step -1
If WorksheetFunction.CountIf(Range("A" & sat & ":P" & sat), 999) > 0 Then _
Rows(sat & ":" & sat).Delete Shift:=xlUp
Next
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
MsgBox "SATIR S�LME ��LEM� TAMAMLANDI."
End Sub
------
web akatar�ld�
---------------------------------------------
'H�creye label ekleme isim verme
Dim TB As OLEObject
Public TB As OLEObject
Public Sub label_caption()
Set TB = ActiveSheet.OLEObjects.Add(ClassType:="Forms.Label.1", Link:=False, _
DisplayAsIcon:=False, Left:=ActiveCell.Left, Top:=ActiveCell.Top,
Width:=ActiveCell.Width, Height:=ActiveCell.Height)
With TB
.Placement = xlMoveAndSize
.Name = ActiveCell.Address
.PrintObject = True
.Object.Caption = ActiveCell.Value
End With
End Sub
-------------------------------------------
'�ift t�klama ile dosya olu�turma
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim aktifkitap As Workbook
If Intersect(Target, Range("A1:A10000")) Is Nothing Then Exit Sub
musteriadi = Target.Value
Set aktifkitap = ActiveWorkbook
Workbooks.Add
ActiveWorkbook.SaveAs Filename:=aktifkitap.Path & "\" & musteriadi & ".xlsx"
ActiveWorkbook.Close savechanges:=False
;Olu�an dosyaya link verme
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:=musteriadi & ".xlsx"
End Sub
------------------------------------------
'Ekran yakalama
Private Declare PtrSafe Function GetVersionExA Lib "kernel32" _
(lpVersionInformation As OSVERSIONINFO) As Integer
Private Declare PtrSafe Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Sub takeScreenShot()
If blnAboveVer4 Then
keybd_event VK_SNAPSHOT, 0, 0, 0
Else
keybd_event VK_SNAPSHOT, 1, 1, 1
End If
ActiveSheet.Range("A1").Activate
ActiveSheet.Pictures.Paste.Select
End Sub
------------------------------------------
'Ekran�n� ba�l�k metninen g�re yakala
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Sub ScreensCapture(vk)
keybd_event vk, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, 0, 0
keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 1
keybd_event vk, 0, KEYEVENTF_KEYUP, 0
End Sub
Selection.Left = 0
Selection.Top = 0
Application.CutCopyMode = False
End Sub
Sub Baslik_Metnine_Gore_Yakala()
Window_Capture_VBA "Hesap Makinesi" 'Yakalanacak ekran�n ba�l�k metnini yaz�n.
End Sub
Sub Tum_ekrani_yakala()
Window_Capture_VBA
End Sub
-------------------------------------------
'T�m ekranlar� yakalama program�
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _
bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
-----------------------------------------
'Ekran g�r�nt�s� alma
Private Declare PtrSafe Function GetVersionExA Lib "kernel32" _
(lpVersionInformation As OSVERSIONINFO) As Integer
Sub takeScreenShot()
If blnAboveVer4 Then
keybd_event VK_SNAPSHOT, 0, 0, 0
Else
keybd_event VK_SNAPSHOT, 1, 0, 0
End If
ActiveSheet.Range("A1").Activate
ActiveSheet.Pictures.Paste.Select
End Sub
---------------------------------------
'Excel resimleri ��karma klas�rden okumal�
Sub mevcut_dosyalar�()
Liste (Kaynak)
Set Klasor = Nothing
Application.ScreenUpdating = True
Application.DisplayAlerts = True
MsgBox "�lem Tamam"
Else
atla:
MsgBox "L�tfen Kaynak Klas�r Se�imini Yap�n�z !", vbInformation, "D�KKAT"
End If
End Sub
Private Sub Liste(yol As String)
Dim fL As Object, f As Object, i As Long
Set fL = CreateObject("Scripting.FileSystemObject")
uzanti = fL.GetExtensionName(Dosya.Name)
aranan_Uzanti = fL.GetExtensionName(Application.AddIns.Item(1).FullName)
uzanti = fL.GetExtensionName(Dosya)
Else
GoSub atla1
End If
End If
Else
GoSub atla1
End If
End If
dosya_adi = fL.GetBaseName(Dosya)
'On Error Resume Next
Klasor = fL.GetParentFolderName(Dosya)
If Right(Klasor, 1) <> "\" Then Klasor = Klasor & "\"
Dim wb As Workbook
Set wb = Workbooks.Open(Dosya)
ActiveWorkbook.SaveAs Filename:=Klasor & dosya_adi & ".htm" _
, FileFormat:=xlHtml, ReadOnlyRecommended:=False, CreateBackup:=False
wb.Close
atla1:
Next
Set fL = Nothing
End Sub
---------------------------------------
'Global workbook tan�mlama
Private awb As Workbook
Public Property Get wb() As Workbook
Const sPath As String = "c:\deneme\kitap1.xlsx"
Dim sFile As String
Sub Test()
MsgBox wb.Worksheets.Count
End Sub
--------------------------------------
'Text dosya okuma arama
Sub mevcut_dosyalar�_bul()
Next
Loop
Close
End If
Next
Set fL = Nothing
End Sub
--------------------------------------
'Sabit de�i�ken tan�mlama, sayfa degiskeni
------------------------------------
'var m� yok mu
Sub dene()
degisken = "13"
If varmi(degisken) Then
MsgBox ("Var")
Else
MsgBox ("Yok")
End If
End Sub
iban = "TR500001200921000001048861"
Set ie = CreateObject("InternetExplorer.Application")
'ie.Visible = True
ie.navigate "https://hesapno.com/cozumle_iban"
ie.document.getelementbyid("iban2").Value = iban
ie.document.forms(0).submit
txt = a.parentElement.outertext
Exit For
End If
Next
Loop
On Error GoTo 0
[a2] = sube
ie.Quit
Set ie = Nothing
End Sub
-------------------------------------
'Sayfa var m�?
Function SayfaVarMi(SayfaAdi As String) As Boolean
On Error Resume Next
SayfaVarMi = CBool(Len(Worksheets(SayfaAdi).Name) > 0)
End Function
-----------------------------------
Application.NormalTemplate.Saved = True
Application.Quit SaveChanges:=wdDoNotSaveChanges
-----------------------------------
sPath = Environ("USERPROFILE") & "\Desktop"
----------------------------------
Using CSS locators, we can also locate elements with sub-strings. Which are really
help full when there are dynamically generated ids in webpage
CSS Locators for Sub-string matches(Start, end and containing text) in selenium
/*It will find input tag which contains 'id' attribute starting with 'ema' text.
Email starts with 'ema' */
css=input[id^='ema']
----------------------------------
Imports System.Text
Imports OpenQA.Selenium
Imports OpenQA.Selenium.Firefox
Imports OpenQA.Selenium.Support.UI
<TestClass()>
Public Class UnitTest1
Private testContextInstance As TestContext
'''<summary>
'''Gets or sets the test context which provides
'''information about and functionality for the current test run.
'''</summary>
Public Property TestContext() As TestContext
Get
Return testContextInstance
End Get
Set(ByVal value As TestContext)
testContextInstance = Value
End Set
End Property
<TestInitialize()>
Public Sub Initialization()
driver = New FirefoxDriver
End Sub
<TestCleanup()>
Public Sub Termination()
driver.Quit()
End Sub
<TestMethod()>
Public Sub TestMethod1()
Dim SearchBox As IWebElement
Dim FirstResult As IWebElement
''' <summary>
''' Retrieve Web Element using default driver and default timeout
''' </summary>
''' <param name="definition">Definition of the WebElement to grab</param>
''' <returns></returns>
''' <remarks></remarks>
Private Overloads Function GetWebElement(ByVal definition As OpenQA.Selenium.By) As
IWebElement
Const DefaultTimeout As Integer = 10
Return GetWebElement(definition, DefaultTimeout)
End Function
''' <summary>
''' Retrieve Web Element using default driver
''' </summary>
''' <param name="definition">Definition of the WebElement to grab</param>
''' <param name="timeoutSeconds">Seconds to wait until a timeout is thrown</param>
''' <returns></returns>
''' <remarks></remarks>
Private Overloads Function GetWebelement(ByVal definition As OpenQA.Selenium.By,
ByVal timeoutSeconds As Integer) As IWebElement
Return GetWebelement(driver, definition, timeoutSeconds)
End Function
''' <summary>
''' Waits until the given element is enabled and visible
''' </summary>
''' <param name="webDriver"></param>
''' <param name="definition"></param>
''' <param name="seconds"></param>
''' <returns></returns>
''' <remarks>Needs to wait for .displayed because for e.g. in a collapsed Treeview
all nodes are available but not visible
''' if the parent node is collapsed and therefore the following error would appear:
''' OpenQA.Selenium.ElementNotVisibleException: Element is not currently visible
and so may not be interacted with
''' </remarks>
Private Overloads Function GetWebElement(ByVal webDriver As IWebDriver, ByVal
definition As OpenQA.Selenium.By, ByVal seconds As Integer) As IWebElement
Dim wait As New WebDriverWait(webDriver, TimeSpan.FromSeconds(seconds))
wait.Until(Function(d)
Return d.FindElement(definition).Enabled And
d.FindElement(definition).Displayed
End Function)
GetWebElement = webDriver.FindElement(definition)
End Function
End Class
----------------------------------
selenium.click("myButton");
Browser Support
Language/ Tool
Command Name
C#
selenium.Click
Java
selenium.click
PHP
$this->selenium->click
Python
self.selenium.click
Perl
$sel_click_ok
Ruby
@selenium.click
Selenium IDE
selenium.click
The Selenium click command offers basic locator click functionality. Though it has
several limitations, these can be overcome using the following workarounds.
selenium.clickAt("myButton", "50,50");
Moreover, it can be used to have the same effect as a click command by specifying
the coordinates as �0,0�. This is especially true when using JavaScript frameworks
such as extJS and GWT where a click command doesn�t work very well because it does
not trigger the mouseUp event.
No, it doesn�t. That�s the reason why you should use the fireEvent command in such
cases. Example
selenium.FireEvent("Cancel", "click")
Sample HTML
Consider the following example as a reference point to understand how the Selenium
click command works.
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript"> function show_msg(){ alert("Selenium Rocks!"); }
</script>
</head>
<body>
<input type="button" id="myButton" onclick="show_msg()" value="Show Message" />
</body>
</html>
Next, consider the following test cases to understand how the Selenium click
command works in various languages. In each of the code snippets provided below,
first open the application root, set the value �selenium rc� into the field named
�q�, invoke the click command on myButton and then wait for 30 seconds for the page
to load.
Python
self.selenium.open("/")
self.selenium.click("myButton")
self.selenium.wait_for_page_to_load("30000")
PHP
$this->selenium->open("/");
$this->selenium->click("myButton");
$this->selenium->waitForPageToLoad(30000);
Ruby
@selenium.open "/"
@selenium.click "myButton"
@selenium.wait_for_page_to_load �30000�
Java
selenium.open("/");
selenium.click("myButton");
selenium.waitForPageToLoad("30000");
open
click
myButton
waitForPageToLoad
30000
Using Selectors with Click Command
The Click command can also be used in conjunction with the following selectors.
1. css=
The CSS selector is often used with Selenium click command to uniquely identify an
object or element on a web page. For example:
selenium.click("css=input[name=myButton]�)
The CSS locator is especially handy as an alternative to the XPath locator, which
works painfully slowly with IE.
2. name=
As the name itself suggests, the name selector is used to click the first element
with the specified @name attribute. For example:
selenium.click("name=myButton�)
3. id=
This attribute allows click on an element with the specified @id attribute. For
example:
selenium.click("id=myButton�)
4. link=
This attribute allows clicking on a link element which contains text matching the
specified pattern. For example:
selenium.click("link=myLink�)
5. xpath=
This attribute allows clicking on an element using an XPath expression. For
example:
----------------------------------
Private Sub ConfigureChrome()
'initiate maximazed
selenium.addArgument "--start-maximized"
selenium.setPreference "download.default_directory",
Replace(ThisWorkbook.FullName, ThisWorkbook.name, "")
selenium.setPreference "download.directory_upgrade", True
selenium.setPreference "download.extensions_to_open", ""
selenium.setPreference "download.prompt_for_download", False
selenium.setPreference "--disable-popup-blocking", ""
selenium.setPreference "--enable-panels", ""
selenium.Start "chrome", "http://google.com"
End Sub
----------------------------------
Sub test()
Dim selenium As New SeleniumWrapper.WebDriver
selenium.Start "chrome", "https://www.google.co.in"
selenium.Open ("https://www.google.co.in")
End Sub
-------------------------------------
Public Sub Untitled_2()
selenium.setImplicitWait 10000
selenium.Type "css=fieldset > div.editor-field > #UserName", "xxxxxxx"
selenium.Type "css=fieldset > div.editor-field > #Password", "xxxxxxx"
selenium.clickAndWait "css=fieldset > p > input.button.submit"
selenium.Click "id=menu-5"
selenium.Click "id=menu-1"
selenium.clickAndWait "link=U.S."
selenium.clickAndWait "id=NDX"
selenium.clickAndWait "link=Weighting"
selenium.Click "id=tradeDate"
selenium.Click "link=20"
selenium.Select "id=timeOfDay", "label=End of Day"
selenium.Click "id=update"
selenium.clickAndWait "id=exportLink"
selenium.Stop
End Sub
--------------------------------------
Sub check()
End Sub
-------------------------------------
Sub Test_Proc()
Set ws = ThisWorkbook.ActiveSheet
driver.get "/"
driver.findElementByName("domain").Clear
driver.findElementByName("domain").SendKeys ""
driver.findElementByName("password").Clear
driver.findElementByName("password").SendKeys "*******"
driver.findElementByCssSelector("input.image").Click
Dim lastRow
lastRow = ws.Cells(1, 1).End(xlDown).Row
driver.findElementByName("Username").Clear
driver.findElementByName("Username").SendKeys ws.Cells(rowNum, 1)
driver.findElementByName("Password1").Clear
driver.findElementByName("Password1").SendKeys ws.Cells(rowNum, 2)
driver.findElementByName("Password2").Clear
driver.findElementByName("Password2").SendKeys ws.Cells(rowNum, 2)
driver.findElementByName("Submit_usermanage").Click
Next
driver.stop
End Sub
-------------------------------------
driver = createoleobj("SeleniumWrapper.WebDriver")
driver.start("chrome", "http://www.uwsc.info/")
driver.setImplicitWait(5000)
driver.open("/")
path = driver.getScreenshot().SaveAs("ScreenshotTest.png")
msgbox("sdfdfsdf<#CR>" + path)
driver.stop()
-----------------------------------
Public Sub SearchByGoogle()
Dim driver As New SeleniumWrapper.WebDriver
driver.Start "firefox", "https://www.google.co.jp/"
driver.get ("/")
driver.findElementById("lst-ib").SendKeys "Selenium"
driver.findElementByName("btnK").Click
End Sub
-----------------------------------
Option Explicit
driver.get ("/Default.aspx")
driver.findElementById("LoginId_TBox").Clear
driver.findElementById("LoginId_TBox").SendKeys "username"
driver.findElementById("Pass_TBox").Clear
driver.findElementById("Pass_TBox").SendKeys "pass"
driver.findElementById("Login_Btn").Click
End Sub
Call driver.get("/Search.aspx")
Call driver.findElementById("MainContent_Ref_TBox").Clear
Call driver.findElementById("MainContent_Ref_TBox").SendKeys(ourRef)
Call driver.findElementById("MainContent_Search_Btn").Click
End Sub
-----------------------------------
Getting started with selenium VBA
1.Open any excel file, go to code editor (Alt + f11) and create a sub.
End Sub
4.Start browser
A browser can be started by using start method of webdriver.
syntax : driver.Start "browsername", "baseurl"
currently supports chrome, firefox, opera, PhantomJS & IE
Lets say we have to open a website and take screenshot of it. This can be done in
just 2 lines of code. open website using Get method and screenshot using
TakeScreenshot method
Above code is self explanatory, when you run this code a screenshot of website is
saved in the folder in which current excel file is present.
Too easy right! But who wants a screenshot of google? Ah yes, this simple example
is used just to explain the steps in automation. I�ll be explaining few practical
situations of automation later in this tutorial.
Adding more functionality
Lets say I�m an SEO analyst, I want to search few words on google and take
screenshot of results. List of keywords are in column A of keywords sheet.
selenium_vba_tutorial_1
End Sub
In the above code, First we use For to loop through each cell then get �/� which is
homepage, if we need image search then �/images� is used. After loading homepage,
find input textbox to enter the search word.
Selenium has many methods to find a html element, Most commonly used methods to
find elements are FindElementById, FindElementByName, FindElementByXpath
Selenium VBA is a Windows COM library that uses the popular Selenium web testing
tool.
It makes it possible to automate web browsing using Excel and VBA code or using a
simple VBS file executed by double-clicking on it.
User's actions can be recorded using the Firefox plugin named "Selenium IDE" and
translated to VBA or VBS with the provided formatters.
It comes usefull to :
A COM library to use Selenium with Excel in the Visual Basic Editor or within a
visual basic script (VBS).
The Selenium IDE plugin with new formatters to convert recorded actions to the
VBA/VBS programming language.
All the Selenium 2 and Selenium 1(RC) commands.
A console application to run scripts
A simple and quick way to drive Firefox, IE, Chrome, Safari and PhantomJS
(headless webkit).
Download
Latest version
Change Log
Documentation
From the Selenium website with samples referring to the CShap language (Most of
the commands have same syntax)
From the provided help file : Programs>SeleniumWrapper>API Documentation
Using the object browser in the VBA editor (F2)
From the web with the keyword "Selenium CShap" followed by your issue
Minimum Requirements
Windows XP
Microsoft Office 2003/2007/2010/2013 with option "VBA For Application"
installed [Update required for Office 2003]
Mozilla Firefox 8 to 34 [Download Page]
Microsoft .Net Framework 3.5 SP1 [Download Page]
How to run a VBA script in Excel with Visual Basic for Application ?
This application works with real browsers, which makes it possible to interact with
dynamic contents created by Javascript.
The command to lauch a browser requires le name of the browser and the root of the
web site.
Here is an example which launches firefox, opens the science page of Yahoo
news, the politics page and closes the browser :
There are 4 browsers that can be controlled locally that need to be installed
to work with:
Firefox : "firefox"
Chrome : "chrome"
InternetExplorer : "ie"
InternetExplorer 64 bits : "ie64"
Safari : "safari"
There is also one headless browser(PhantomJS) included in the installation
which behave like a browser but without a window to interect with:
PhantomJS : "phantomjs"
Another feature is the possibility to control a browser remotely using the the
remote web driver server:
https://code.google.com/p/selenium/wiki/RemoteWebDriverServer
Using Selenium IDE, copy the recorded selector in the field "Target".
This selector can then be used as follow :
selenium.click "target"
selenium.type "target", "your text"
For the a Selenium 2 command, remove the prefix of the target and use the
corresponding command:
Solution 2 :
This example runs a simple web search and pastes a screenshot of the result in
a worksheet:
This scrip will help you to quickly inspect a list of web pages without having
to navigate the website and wait for page loading.
It automatically opens the webpage, takes a screenshot and saves it in a Pdf
file:
This example gets all the world market indexes in the first worksheet and all
the top stories tiltles in the second one:
Public Sub TC003()
Dim driver As New SeleniumWrapper.WebDriver
driver.Start "chrome", "https://www.google.co.uk" 'Starts the browser
driver.Open "/finance" 'Opens the finance page
Dim data1, data2
data1 = driver.findElementByCssSelector("#markets table").AsTable.GetData()
'Gets the world market indexes from the table
Sheet1.[A1].Resize(UBound(data2, 1), UBound(data2, 2)).Value = data1
'Writes the collected data in the first worksheet
data2 = driver.findElementsByCssSelector("#market-news-stream
a.title").GetData() 'Gets the top stories titles
Sheet2.[A1].Resize(UBound(data2)).Value = data2 'Writes the collected data
in the second worksheet
driver.stop 'Stops the browser
End Sub
VBS Script example : Compare the rendering of two web pages (From version 1.0.18)
Getting tired playing "Where is Wally?" for each delivery ?
Here is an example to quickly identify changes between two versions of a web
page :
Set driver = CreateObject("SeleniumWrapper.WebDriver")
driver.start "firefox", "http://www.google.co.uk" 'Starts the browser
driver.open "/" 'Opens google search version UK
Set imageA = driver.getScreenshot() 'Captures the rendering
driver.open "http://www.google.fr" 'Opens Google search version FR
Set imageB = driver.getScreenshot() 'Captures the rendering
driver.stop 'Stops the browser
imageA.compareTo(imageB).saveAs "diff.png" 'Compares images and saves the
result
For result, an image showing differences with a non-black colour :
Excel script example : Measure real loading times (From version 1.0.18)
This example navigates through Yahoo news and writes the metrics for each web
page in an Excel WorkSheet:
Sub mail_gonder
On Error GoTo mailatma
Set evnout = CreateObject("Outlook.Application")
Set evnmailitem = evnout.CreateItem(0)
With evnmailitem
.Subject = "Konu deneme"
.To = "asriakdeniz@gmail.com"
'.Attachments.Add maildosya
.HTMLBody = "Merhaba," & "<br>" & "<br>" & "Deneme Mesaj�."
.send
End With
mailatma:
Set evnmailitem = Nothing
Set evnout = Nothing
End sub
---------------------------------
'soru sormadan mail g�nderme
Function TurnAutoYesOn()
Dim wnd As Long
Dim uClickYes As Long
Dim Res As Long
uClickYes = RegisterWindowMessage("CLICKYES_SUSPEND_RESUME")
wnd = FindWindow("EXCLICKYES_WND", 0&)
Res = SendMessage(wnd, uClickYes, 1, 0)
End Function
Function TurnOffAutoYes()
Dim wnd As Long
Dim uClickYes As Long
Dim Res As Long
uClickYes = RegisterWindowMessage("CLICKYES_SUSPEND_RESUME")
wnd = FindWindow("EXCLICKYES_WND", 0&)
Res = SendMessage(wnd, uClickYes, 0, 0)
End Function
Function fEmailTest()
TurnAutoYesOn '*** Add this before your email has been sent
Set appOutLook = CreateObject("Outlook.Application")
Set MailOutLook = appOutLook.CreateItem(olMailItem)
With MailOutLook
.To = " <Receipient1@domain.com>; <Receipient2@domain.com"
.Subject = "Your Subject Here"
.HTMLBody = "Your message body here"
.Send
End With
TurnOffAutoYes '*** Add this after your email has been sent
End Function
--------------------------------
'ADO ile excel de h�zl� sorgu
Sub sbADOExample()
Dim sSQLQry As String
Dim ReturnArray
Dim Conn As New ADODB.Connection
Dim mrs As New ADODB.Recordset
Dim DBPath As String, sconnect As String
DBPath = ThisWorkbook.FullName
Columns("E:J").Select
Selection.ClearContents
Range("E1").Select
'You can provide the full path of your external file as shown below
'DBPath ="C:\InputData.xlsx"
sconnect = "Provider=MSDASQL.1;DSN=Excel Files;DBQ=" & DBPath & ";HDR=Yes';"
Conn.Open sconnect
sSQLSting = "SELECT * From [Sayfa2$] where adi like '%e%' and tutar>5000"
mrs.Open sSQLSting, Conn
'=>Load the Data into an array
'ReturnArray = mrs.GetRows
''OR''
'=>Paste the data into a sheet
Sheets(2).Range("E1").CopyFromRecordset mrs
'Close Recordset
mrs.Close
'Close Connection
Conn.Close
End Sub
--------------------------------
'H�cre i�inde kelimelerin fontunu de�i�tirme
Sub HarfBoyutu()
Dim Bak As Range
Dim Sira As Integer
For Each Bak In Range("A1:A" & Cells(Rows.Count, "A").End(3).Row)
For Sira = 1 To Len(Bak.Text)
If IsNumeric(Bak.Characters(Start:=Sira, Length:=1).Text) Then
Bak.Characters(Start:=Sira, Length:=1).Font.Size = 8
Else
Bak.Characters(Start:=Sira, Length:=1).Font.Size = 12
End If
Next
Next
End Sub
--------------------------------
'kombinasyon
Dim sayilar, harfler As String
Sub menu()
sayilar = "123456789"
harfler = "ABC�DEFG�HI�JKLMNO�PRS�TU�VYZ"
Call bicimlendir
Call kombi2s
Call kombi3s
Call kombi2a
Call kombi3a
End Sub
Sub bicimlendir()
Columns("A:D").Select
Selection.NumberFormat = "@"
Range("C4").Select
End Sub
Sub kombi2s()
say = 1
For i1 = 1 To 9
For i2 = 1 To 9
kelime = Mid(sayilar, i1, 1) + Mid(sayilar, i2, 1)
Cells(say, 1).Value = kelime
say = say + 1
Next
Next
End Sub
Sub kombi3s()
say = 1
For i1 = 1 To 9
For i2 = 1 To 9
For i3 = 1 To 9
kelime = Mid(sayilar, i1, 1) + Mid(sayilar, i2, 1) + Mid(sayilar, i3, 1)
Cells(say, 2).Value = kelime
say = say + 1
Next
Next
Next
End Sub
Sub kombi2a()
say = 1
For i1 = 1 To 29
kelime = ""
For i2 = 1 To 29
kelime = Mid(harfler, i1, 1) + Mid(harfler, i2, 1)
Cells(say, 3).Value = kelime
say = say + 1
Next
Next
End Sub
Sub kombi3a()
say = 1
For i1 = 1 To 29
For i2 = 1 To 29
For i3 = 1 To 29
kelime = Mid(harfler, i1, 1) + Mid(harfler, i2, 1) + Mid(harfler, i3, 1)
Cells(say, 4).Value = kelime
say = say + 1
Next
Next
Next
End Sub
--------------------------------
'A��k programlar� kapatma
Shell "taskkill /im firefox.exe"
Set uygulama = CreateObject("Shell.Application")
For Each nesne In uygulama.Windows
nesne.Quit
If TypeName(nesne.Document) = "HTMLDocument" Then
nesne.Quit
End If
--------------------------------
'a��k programlar� kapatma
Sub kapat()
Set colProcessList = Nothing
strProcess = "AcroRd32.exe" 'buras� de�i�ken yani dosya t�r�
On Error Resume Next
Set colProcessList = GetObject("Winmgmts:").ExecQuery("Select * from Win32_Process
Where Name ='" & strProcess & "'")
For Each objprocess In colProcessList
objprocess.Terminate
Next
Set colProcessList = Nothing
End Sub
--------------------------------
'Asri Akdeniz - asriakdeniz@gmail.com 23.05.2016
'Word dosyalar�n� s�ral� yazd�rma.
Sub ensonsatir_ensonsutun()
If WorksheetFunction.CountA(Cells) > 0 Then
ensonsatir = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByRows,
SearchDirection:=xlPrevious).Row
ensonsutun = Cells.Find(What:="*", After:=[A1], SearchOrder:=xlByColumns,
SearchDirection:=xlPrevious).Column
Else
ensonsatir = Rows.Count
ensonsutun = Columns.Count
End If
End Sub
Sub menu()
Sheets("Menu").Select
kactakim = Cells(11, 1).Value
beklemesuresi = Cells(14, 1).Value
Call word_yazdir
MsgBox ("Yazd�rma i�lemi tamanland�.")
End Sub
Sub dosyayukle1()
Set myFile = Application.FileDialog(msoFileDialogOpen)
With myFile
.Title = "Dosya Se�iniz"
.AllowMultiSelect = False
If .Show <> -1 Then
dosya1 = ""
dosya1adi = ""
Cells(2, 4).Value = ""
Exit Sub
End If
dosya1 = .SelectedItems(1)
dosya1adi = Mid(.SelectedItems(1), InStrRev(.SelectedItems(1), "\") + 1,
Len(.SelectedItems(1)))
Cells(2, 4).Value = dosya1
End With
End Sub
Sub dosyayukle2()
Set myFile = Application.FileDialog(msoFileDialogOpen)
With myFile
.Title = "Dosya Se�iniz"
.AllowMultiSelect = False
If .Show <> -1 Then
dosya2 = ""
dosya2adi = ""
Cells(3, 4).Value = ""
Exit Sub
End If
dosya2 = .SelectedItems(1)
dosya2adi = Mid(.SelectedItems(1), InStrRev(.SelectedItems(1), "\") + 1,
Len(.SelectedItems(1)))
Cells(3, 4).Value = dosya2
End With
End Sub
Sub dosyayukle3()
Set myFile = Application.FileDialog(msoFileDialogOpen)
With myFile
.Title = "Dosya Se�iniz"
.AllowMultiSelect = False
If .Show <> -1 Then
dosya3 = ""
dosya3adi = ""
Cells(4, 4).Value = ""
Exit Sub
End If
dosya3 = .SelectedItems(1)
dosya3adi = Mid(.SelectedItems(1), InStrRev(.SelectedItems(1), "\") + 1,
Len(.SelectedItems(1)))
Cells(4, 4).Value = dosya3
End With
End Sub
Sub dosyayukle4()
Set myFile = Application.FileDialog(msoFileDialogOpen)
With myFile
.Title = "Dosya Se�iniz"
.AllowMultiSelect = False
If .Show <> -1 Then
dosya4 = ""
dosya4adi = ""
Cells(8, 4).Value = ""
Exit Sub
End If
dosya4 = .SelectedItems(1)
dosya4adi = Mid(.SelectedItems(1), InStrRev(.SelectedItems(1), "\") + 1,
Len(.SelectedItems(1)))
Cells(8, 4).Value = dosya4
End With
End Sub
Sub word_yazdir()
Dim objWord
Set objWord = CreateObject("Word.Application")
objWord.Visible = False
Dim objDoc
For j = 1 To kactakim
For i = 2 To 5
Set objDoc = objWord.Documents.Open(Cells(i, 4).Value)
objDoc.PrintOut
'Yaz�c�ya g�nderdikten sonra 5 sn bekle
saniye = 0.00001157407407
Application.Wait (Now + beklemesuresi * saniye)
objDoc.Close False
Next i
'Ay�r�c� sayfay� yazd�r
Set objDoc = objWord.Documents.Open(Cells(8, 4).Value)
objDoc.PrintOut
objDoc.Close False
Next j
objWord.Quit
End Sub
--------------------------------
Sub yazd�r()
Dim sMyDir As String
Dim sDocName As String
sMyDir = "C:\SORU\"
For i = 1 To 100
Application.PrintOut FileName:=sMyDir & "A.docx"
Application.PrintOut FileName:=sMyDir & "B.docx"
Application.PrintOut FileName:=sMyDir & "C.docx"
Application.PrintOut FileName:=sMyDir & "D.docx"
Next
End Sub
--------------------------------
'bekleme s�resi sn bekle
saniye = 0.00001157407407
Application.Wait (Now + beklemesuresi * saniye)
--------------------------------
'Autoit in excel de kullan�lmas�.
Preferance de autoitx3 lib i se�in.
Sub autoit()
'Launch Calculator
autoit.Run "calc.exe", "C:\Windows\System32"
autoit.Sleep "2000"
End Sub
--------------------------------------------------------
'Access the GetCursorPos function in user32.dll
Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
' Access the GetCursorPos function in user32.dll
Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As
Long
' GetCursorPos requires a variable declared as a custom data type
' that will hold two integers, one for x value and one for y value
Type POINTAPI
X_Pos As Long
Y_Pos As Long
End Type
Di�erine XXXXXXXXXXXXXXXXXXX:
'Declare mouse clicks
Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As
Long
Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long,
ByVal dy As Long, _
ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Public Const MOUSEEVENTF_LEFTDOWN = &H2
Public Const MOUSEEVENTF_LEFTUP = &H4
Public Const MOUSEEVENTF_RIGHTDOWN As Long = &H8
Public Const MOUSEEVENTF_RIGHTUP As Long = &H10
'Declare sleep
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
SetCursorPos 50, 50
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
Sleep 50
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
Sleep 100
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
Sleep 50
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
Application.Wait Now + TimeValue("00:00:01")
mouse_event MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0
Sleep 50
mouse_event MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0
End Sub
--------------------------------------------------------
'Word bul de�i�tir
'Replace:=1 sadece ilk buldu�unu
'Replace:=2 t�m�n� de�i�tir
Sub word_replace()
Dim pathh As String
Dim pathhi As String
Dim oCell As Integer
Dim from_text As String, to_text As String
Dim WA, wdoc As Object
Set WA = CreateObject("Word.Application")
WA.Documents.Open (pathh)
WA.Visible = True
With WA.ActiveDocument
Set myRange = .Content
With myRange.Find
.Execute FindText:="@firma", ReplaceWith:=firma, Replace:=2
End With
End With
WA.Documents.Close False
WA.Quit
End Sub
--------------------------------------------------------
'Bo� sat�r silme
Sub BO�_SATIR_S�L()
On Error GoTo Son
[A:A].SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Son:
End Sub
--------------------------------------------------------
'Word de satir numaras� ekleme
Sub Menu()
Call karar_duzenle
Call teklif_duzenle
End Sub
Sub karar_duzenle()
Dim strCellText As String
Dim uResp As String
Dim Row As Integer
Dim Col As Integer
Dim itable As Table
say = 0
For Each itable In ThisDocument.Tables
karar = ""
For Row = 1 To itable.Rows.Count
For Col = 1 To itable.Columns.Count
kararnumarasi = 0
karar = ""
cumle = itable.Cell(Row, Col).Range.Text
If InStr(cumle, ":") > 0 Then
kararnumarasi = Val(Mid(cumle, InStr(cumle, ":") + 1, Len(cumle)))
karar = Mid(cumle, 1, InStr(cumle, ":"))
End If
If karar = "KARAR NO:" Then
If say = 0 Then
numarator = kararnumarasi
Else
numarator = numarator + 1
itable.Cell(Row, Col).Range.Text = "KARAR NO:" & numarator
End If
say = say + 1
End If
Next
Next
Next
End Sub
Sub teklif_duzenle()
Dim strLine As String
Dim colString As Collection
Dim intLastLine As Integer
Dim intLastPage As Integer
Dim flag As Boolean
On Error Resume Next
Selection.EndKey Unit:=wdStory
intLastLine = Selection.Range.Information(wdFirstCharacterLineNumber)
intLastPage = Selection.Range.Information(wdActiveEndPageNumber)
Set colString = New Collection
Selection.HomeKey Unit:=wdStory
flag = True
While flag = True
If (Selection.Range.Information(wdFirstCharacterLineNumber) _
= intLastLine) And intLastPage = _
Selection.Range.Information(wdActiveEndPageNumber) Then
flag = False
End If
End Sub
-------------------------------------------------------
't�m sat�rlar� tek bir h�creye alma
Sub Ortalama()
Dim Bak As Integer
Dim AradakiIsaret As String
AradakiIsaret = ", "
Range("C2").Value = Range("A2").Value
For Bak = 3 To 410
Range("C2").Value = Range("C2").Value & AradakiIsaret & Range("A" &
Bak).Value
Next
End Sub
-------------------------------------------------------
'�ller baz�nda �r�n talep formu
Sub liste_brn()
Dim s1, s2 As Worksheet, ss1, ss2 As Long, sat As Integer
Set s1 = Sayfa1: Set s2 = Sayfa2
ss1 = s1.Range("C" & Rows.Count).End(3).Row
ss2 = s2.Range("B" & Rows.Count).End(3).Row
If s2.[B65536].End(3).Row > 2 Then s2.Range("B3:F" & ss2).ClearContents
10: For sut = 9 To 15
sat = s2.[B65536].End(3).Row + 1
s1.Range(s1.Cells(3, sut), s1.Cells(ss1, sut)).Copy
Destination:=s2.Cells(sat, 2)
s1.Range(s1.Cells(3, 2), s1.Cells(ss1, 5)).Copy Destination:=s2.Cells(sat,
3)
Next
s2.Range("B3:F" & s2.[B65536].End(3).Row).Sort s2.Range("B2"), 1
s2.Columns("B:F").ColumnWidth = 81.71:s2.Columns("B:F").AutoFit
s2.Rows("3:" & s2.[B65536].End(3).Row).AutoFit
With s2.Range("B3:F" & s2.[B65536].End(3).Row).Borders
.LineStyle = xlContinuous: .TintAndShade = 0: .Weight = xlHairline
End With
MsgBox "��LEM TAMAM": s2.Activate
End Sub
-------------------------------------------------------
'h�creyi sat�rlara ay�rma
=KIRP(PAR�AAL(YER�NEKOY(A$1;".";Y�NELE(" ";38));(SATIR(A1)-1)*38+1;38))&"."
-------------------------------------------------------
'S�tunlar� kar��la�t�rma
Sub Kod()
s�tunlar = Array("A", "F", "K", "P", "U", "Z")
-------------------------------------------------------
'Sat�r ve s�tun a g�re kriter al�p sayfalardan toplam getirme
=TOPLA.�ARPIM((OCAK!$B$3:$B$18=GENEL!$B3)*(OCAK!$C$2:$I$2=GENEL!C$2)*OCAK!
$C$3:$I$18)+TOPLA.�ARPIM((�UBAT!$B$3:$B$18=GENEL!$B3)*(�UBAT!$C$2:$I$2=GENEL!
C$2)*�UBAT!$C$3:$I$18)
-------------------------------------------------------
'cumleden ad� ve soyad�n� ay�rma
Sub MENU()
Call kontrol
End Sub
Sub kontrol()
Application.ScreenUpdating = False
'Kirli data sat�r say�s� al�n�yor.
Sheets("Sayfa2").Select
sonsatirkirli = Cells(Rows.Count, "A").End(3).Row
' Her kirli data de�i�imi oldu�unda. Sutun de�i�keni, ad� b ye yazd�rmak i�in 1
yap�l�yor.
sutun = 1
-------------------------------------------------------
'say�lar� okuma
Public sayi, yaziile As String
Dim yazisay() As String
Dim yazilist() As String
End Sub
Function tl_yaz(sayi)
On Error Resume Next
Dim deg(3), s(3), deger(2)
a = Array("", "bir,", "iki,", "uc,", "dort,", "bes,", "alti,", "yedi,", "sekiz,",
"dokuz,")
b = Array("", "on,", "yirmi,", "otuz,", "kirk,", "elli,", "altmis,", "yetmis,",
"seksen,", "doksan,")
c = Array("", "", "bin,", "milyon,", "milyar,", "trilyon,")
deger(1) = Int(sayi)
deger(2) = Round(sayi - deger(1), 2) * 100
If sayi = 0 Then son = "s�f�r"
For g = 1 To 2
yazi = deger(g)
For d = 1 To Len(yazi) Step 3
e = e + 1
deg(1) = Mid(yazi, Len(yazi) - d - 1, 1)
deg(2) = Mid(yazi, Len(yazi) - d, 1)
deg(3) = Mid(yazi, Len(yazi) - d + 1, 1)
If deg(1) <> 0 Then s(1) = Replace(a(deg(1)) & "yuz,", "bir,yuz,", "yuz,")
s(2) = b(deg(2))
s(3) = a(deg(3)) & c(e)
If deg(1) + deg(2) + deg(3) = 0 Then s(3) = ""
son = s(1) & s(2) & s(3) & son
If Left(son, 8) = "bir,bin," Then son = Replace(son, "bir,bin,", "bin,")
For f = 1 To 3
deg(f) = ""
s(f) = ""
Next: Next
If g = 1 And deger(1) <> 0 Then tl = son & ""
If g = 2 And deger(2) <> 0 Then kr = "" & son & ""
son = ""
e = 0
Next
tl_yaz = tl & kr
End Function
-------------------------------------------------------
komut
shell "cmd /c dir c:\*.*|del c:\*.txt"
'�al�t�r ve bekle
cmddosya = "sox.exe " + dosya + "ses.wav"
komut = "cmd /c cd " & yol & "&&" & cmddosya
CreateObject("wscript.shell").Run komut, 0, True
-------------------------------------------------------
' tarih 05,05,2016 ben bunu yazd���mda sadece may�s yazs�n
h�cre bi�imlendir > iste�e uyarlanm� > t�r kutucu�una aaaa
=METNE�EV�R(A1;"aaaa")
-------------------------------------------------------
=E�ERHATA(�ND�S(B$2:CC$2;1;KA�INCI(MAK(B3:CC3);B3:CC3;0));"")
-------------------------------------------------------
'bul renklendir
Sub Bul_Renklendir()
Dim neyi As String, rng As Range, alan As Range
icerir = False
neyi = Application.InputBox("A1:D20 h�crelerinde, bulmak istedi�iniz veri", , "")
If MsgBox("Arama i�erir mi olsun?", vbYesNo) = vbYes Then
icerir = True
End If
Next rng
Set alan = Nothing
End Sub
-------------------------------------------------------
' nokta ile kelimeleir ay�rma
Sub ayir()
Range("c1").Resize(UBound(Split([a1], ".")) + 1, 1) =
Application.Transpose(Split([a1], "."))
End Sub
=KIRP(PAR�AAL(YER�NEKOY("."&$A$1;".";Y�NELE(" ";255));SATIRSAY($D$1:D1)*255;255))
-------------------------------------------------------
'Excel den word e yap�t�rma
Sub ExceldenWordeaktar()
' Microsoft Word Object Library kitapl���n� aktif hale getirin
Dim WDApp As Word.Application
Dim WDDoc As Word.Document
' Excelde bir aral�k se�in
If Not TypeName(Selection) = "Range" Then
MsgBox "L�tfen excel sayfas�ndan aral���n�z� se�iniz", vbExclamation, _
"Hi�bir aral�k se�ilmedi"
Else
' Word belgeside a��k olmal�d�r
Set WDApp = GetObject(, "Word.Application")
' Referans aktif dok�man al�nacak
Set WDDoc = WDApp.ActiveDocument
' Eski tablo siliniyor
If WDDoc.Tables.Count = 1 Then
WDDoc.Tables(1).Delete
End If
' Aral�k kopyalanacak
Selection.Copy
' Aral�k yap�t�r�lacak
WDApp.Selection.PasteExcelTable True, False, False
' Temizlenecek
WDDoc.Tables(1).Select
' WDApp.Selection.Rows.ConvertToText Separator:=wdSeparateByParagraphs, _
' NestedTables:=True
Set WDDoc = Nothing
Set WDApp = Nothing
' Excelde Se�ili alan kald�r�l�yor.
Application.CutCopyMode = False
ActiveCell.Select
End If
End Sub
-------------------------------------------------------
'M�kerrer ka�t kontrol�
=e�er(e�ersay($a$9:a10;a10)<=1;" ";" m�kerrer")
-------------------------------------------------------
'Redim kullan�m�
Range("A2").Resize(i, 1) = veri
End Sub
-------------------------------------------------------
'h�creyi tel t�kla click, de�eri ba�ka sayfaya aktar
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("B1:B10000")) Is Nothing Then Exit Sub
Sheets("Sayfa2").Range("A1") = Target.Offset(0, -1).Value
End Sub
-------------------------------------------------------
'h�creyi �ift t�kla double click, de�eri ba�ka sayfaya aktar
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(Target, Range("B1:B10000")) Is Nothing Then Exit Sub
Sheets("Sayfa2").Range("A1") = Target.Offset(0, -1).Value
Sheets("Sayfa2").Select
End Sub
-------------------------------------------------------
'Daha �nce kaydedilmi� uyar�s�
Dim sat As Long
If Intersect(Target, [A:H]) Is Nothing Then Exit Sub
If Target.Column = 1 Then
If WorksheetFunction.CountIf([A:A], Target.Value) > 1 Then
MsgBox "Bu TC kimlik no daha �nceden kay�t edilmi�!", vbCritical, "U Y A R
I"
End If
ElseIf Target.Column = 7 Then
If WorksheetFunction.CountIf([G:G], Target.Value) > 1 Then
MsgBox "Bu sicil no daha �nceden kay�t edilmi�!", vbCritical, "U Y A R I"
End If
ElseIf Target.Column = 8 Then
If WorksheetFunction.CountIf([H:H], Target.Value) > 1 Then
MsgBox "Bu emekli sicil no daha �nceden kay�t edilmi�!", vbCritical, "U Y A
R I"
End If
End If
End Sub
------------------------------------------------------
'sonsatir cell ile
sonsatir=Cells(Rows.Count, "A").End(xlUp).Select
------------------------------------------------------
'ayn� isimlerden en altta olan� kals�n
Sub sil()
sonsatir = Cells(Rows.Count, "A").End(3).Row
For i = sonsatir To 1 Step -1
adi = Cells(i, 1).Value
If adi = eskiadi Then
Rows(i).Delete
End If
eskiadi = adi
Next i
End Sub
-----------------------------------------------------
'n�bet �izelgesi doldurma
-- F7 h�cresine a�a��daki form�l� uygulay�p, sa�a ve a�a�� kopyalay�n.
-- Sonra da H s�tununu TAR�H olarak bi�imlendirin.
=E�ER(EHATALIYSA(KA�INCI($J$3;Veri!$D$4:$D$203;0));"";�ND�S(Veri!
$D$4:$I$203;KA�INCI($J$3;Veri!$D$4:$D$203;0)+SATIRSAY($F$6:F6)-1;KA�INCI(F$6;Veri!
$D$3:$I$3;0)))
-----------------------------------------------------
'Tatil g�nlerini boyama
Sub haftaningunu()
Case Else: ay = 1
End Select
hangiay = ay
End Function
-----------------------------------------------------
'sat�r renklendirme iki 2 renk
----------------------------------------------------
'�sme ba�l� olarak sat�r� renklendirme.
----------------------------------------------------
'word den kelime alma
Sub GrabUsage()
Dim FName As String, FD As FileDialog
Dim WApp As Object, WDoc As Object, WDR As Object
Dim ExR As Range
'repeat
WApp.Selection.HomeKey Unit:=6
WApp.Selection.Find.ClearFormatting
WApp.Selection.Find.Execute "Period of Report:"
WApp.Selection.MoveRight Unit:=2, Count:=8
WApp.Selection.MoveRight Unit:=2, Count:=3, Extend:=1
WDoc.Close
WApp.Quit
End Sub
----------------------------------------------------
'Se�ili alan� pdf olarak kaydet
Sub TestExportAsFixedFormat()
' For information about the final parameter, see this page:
' http://msdn.microsoft.com/en-us/library/aa338206.aspx
rng.ExportAsFixedFormat Type:=xlTypePDF, _
fileName:=fileName, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=True, _
From:=1, To:=1, OpenAfterPublish:=True
End Sub
For i = 8 To [b24].End(3).Row
Cells(i, 2) = Replace(Replace(Cells(i, 2), degiskenilk, ""), degiskenson,
"")
Cells(i, 2).Value = degiskenilk & Cells(i, 2) & degiskenson
Next i
For k = 36 To [b51].End(3).Row
Cells(k, 2) = Replace(Replace(Cells(k, 2), degiskenilk, ""), degiskenson,
"")
Cells(k, 2).Value = degiskenilk & Cells(k, 2) & degiskenson
Next k
End Sub
----------------------------------------------------
'Ba��na sonuna ekleme
Sub ekle()
For i = 8 To [b24].End(3).Row
If Left(Cells(i, 2).Value, 9) <> "BALIKES�R" Then
Cells(i, 2).Value = "BALIKES�R" & "-" & Cells(i, 2)
End If
Next i
For k = 36 To [b51].End(3).Row
If Left(Cells(k, 2).Value, 9) <> "BALIKES�R" Then
Cells(k, 2).Value = "BALIKES�R" & "-" & Cells(k, 2)
End If
Next k
End Sub
----------------------------------------------------
'se�ili h�creleri tek bir h�cre i�ine alma
Sub TEST()
Sheets("Sayfa1").Select
ReDim Liste(1 To 1)
For Each Veri In Selection
If Veri <> "" Then
Say = Say + 1
ReDim Preserve Liste(1 To Say)
Liste(Say) = Veri
End If
Next
Sheets("Sayfa2").Range("A1") = Join(Liste, ",")
----------------------------------------------------
'mail g�nderme
Dim OutApp As Object
Dim NewMail As Object
Dim ShName As String, WbName As String
Dim ModX As Object, VBComp As Object
Sub mail_gonder()
Sheets("form").Select
Set OutApp = CreateObject("Outlook.Application")
Set NewMail = OutApp.CreateItem(0)
With NewMail
.To = Cells(33, "B").Value
.cc = Cells(34, "B").Value & ";" & Cells(35, "B").Value & ";" & Cells(36,
"B").Value
.Subject = "S�STEM VER�LER� D�ZELTME / �PTAL TALEB�"
.Body = "D�zeltme / �ptal talebiniz ba�ar�yla sonu�lanm�t�r."
.Send
End With
On Error GoTo 0
End Sub
----------------------------------------------------
'web sayfas� login
Sub giris()
Dim URL As String
Dim HTML_Body As Object
Dim IE As Object
URL = "https://otohasar.anadolusigorta.com.tr/loginfrm.php?ml="
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate URL
.Visible = True
Do Until IE.ReadyState = 4: DoEvents: Loop
Do While IE.Busy: DoEvents: Loop
IE.Document.all("user_name").Value = Cells(1, "a")
IE.Document.all("user_pass").Value = Cells(1, "b")
IE.Document.all("customer_code").Value = Cells(1, "c")
IE.Document.forms(0).submit
End With
Set IE = Nothing
Set HTML_Body = Nothing
MsgBox ("Bitti ")
End Sub
----------------------------------------------------
'Sayfalar� birle�tir
Sub Voltran_Voltran_Voltran()
a = Worksheets.Count
'Sayfa ekleme
Worksheets.Add(, Sheets(a)).Name = "Voltran"
For b = 1 To a
Sheets(b).Range("A1:IV" & Sheets(b).UsedRange.Rows.Count).Copy
Cells(ActiveSheet.UsedRange.Rows.Count + 1, 1)
Next b
MsgBox "G��, Sizinle Olsun... :)"
End Sub
----------------------------------------------------
Sub TEST()
For i1 = 1 To 4
For i2 = 1 To 4
For i3 = 1 To 4
For i4 = 1 To 4
For i5 = 1 To 4
For i6 = 1 To 4
For i7 = 1 To 4
For i8 = 1 To 4
For i9 = 1 To 4
For i10 = 1 To 4
For i11 = 1 To 4
For i12 = 1 To 4
For i13 = 1 To 4
For i14 = 1 To 4
For i15 = 1 To 4
say = say + 1
Next i15,i14,i13,i12,i11,i10,i9,i8,i7,i6,i5,i4,i3,i2,i1
[a1] = say
End Sub
----------------------------------------------------
'Ta�� kaydet temizle
Sub menu()
Application.DisplayAlerts = False
Call tasi
Call sirala
Call kaydet
Application.DisplayAlerts = True
End Sub
Sub tasi()
Sheets("Emekli-Fesih").Select
sonsatir = Cells(Rows.Count, "D").End(3).Row
If sonsatir = 2 Then Exit Sub
Rows("3:" & sonsatir).Select
Selection.Copy
Sheets("Genel Liste").Select
sonsatir = Cells(Rows.Count, "D").End(3).Row + 1
Range("A" & sonsatir).Select
Selection.Insert Shift:=xlDown
Range("B1").Select
Sheets("Emekli-Fesih").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("A3").Select
End Sub
Sub sirala()
Sheets("Genel Liste").Select
sonsatir = Cells(Rows.Count, "D").End(3).Row
Range("A3:AD" & sonsatir).Select
ActiveWorkbook.Worksheets("Genel Liste").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Genel Liste").Sort.SortFields.Add Key:=Range( _
"A3:A" & sonsatir), SortOn:=xlSortOnValues, Order:=xlAscending,
DataOption:= _
xlSortNormal
With ActiveWorkbook.Worksheets("Genel Liste").Sort
.SetRange Range("A3:AD" & sonsatir)
.Header = xlGuess
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Range("A3").Select
End Sub
Sub kaydet()
ActiveWorkbook.Save
End Sub
----------------------------------------------------
'metnin ba��ndaki say�lar� ay�rma ayr� kolona yazma
Sub kod()
Application.ScreenUpdating = False
Application.ScreenUpdating = True
MsgBox "B i t t i "
End Sub
----------------------------------------------------
'Saati ay�rma saat dakika saniye
=MID(TEXT(B1;"ss:dd:nn");4;2)
----------------------------------------------------
'Excel de se�ili bir alan� yeni kitap ile mail atma
Sub ExcelArsivi_Mail_Secim()
'Se�ilen alan� kopyalay�p, yeni kitaba aktaran ve mail olarak g�nderen kod;
'2000-2010 versiyonlar�nda �al��r
Dim HucreAraligi As Range
Dim Kitap As Workbook
Dim AktifKitap As Workbook
Dim GeciciDosyaYolu As String
Dim GeciciDosyaAdi As String
Dim DosyaUzantisi As String
Dim DosyaFormatNumarasi As Long
Dim I As Long
If ActiveWindow.SelectedSheets.Count > 1 Or _
Selection.Cells.Count = 1 Or _
Selection.Areas.Count > 1 Then
MsgBox "Bir hata olu�tu :" & vbNewLine & vbNewLine & _
"Bir sayfaan fazlas� se�ilmi�," & vbNewLine & _
"Tek h�cre se�ilmi�," & vbNewLine & _
"Veya bir alandan daha fazlas� se�ilmi� olabilir." & vbNewLine &
vbNewLine & _
"L�tfen do�ru bir se�im ile tekrar deneyiniz!", vbOKOnly
Exit Sub
End If
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
HucreAraligi.Copy
With Kitap.Sheets(1)
.Cells(1).PasteSpecial Paste:=8
.Cells(1).PasteSpecial Paste:=xlPasteValues
.Cells(1).PasteSpecial Paste:=xlPasteFormats
.Cells(1).Select
Application.CutCopyMode = False
End With
With Kitap
.SaveAs GeciciDosyaYolu & GeciciDosyaAdi & DosyaUzantisi, _
FileFormat:=DosyaFormatNumarasi
On Error Resume Next
For I = 1 To 3
.SendMail "", _
"Kullan�m i�ine al�nacak cariler hakk�nda"
If Err.Number = 0 Then Exit For
Next I
On Error GoTo 0
.Close SaveChanges:=False
End With
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
End Sub
---------------------------------------------------
'KTF kullan�c� tan�ml� fonksiyon
=KB�RLE�T�R(B2:F2;".")
---------------------------------------------------
'Enter ile h�creye yazma
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Intersect(ActiveCell, [d3:u29]) Is Nothing Then Exit Sub
ActiveCell = "10"
End Sub
---------------------------------------------------
'dola��rken renk de�i�tirme
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
[c2:c29].Interior.ColorIndex = 5
[c2:c29].Font.ColorIndex = 2
If Intersect(ActiveCell, [c:c]) Is Nothing Then Exit Sub
If ActiveCell = [c:c] Then
ActiveCell.Interior.ColorIndex = 6
ActiveCell.Font.ColorIndex = 5
End If
End Sub
---------------------------------------------------
'TUIK den veri �ekmek
Sub PHP_den_Al()
Dim i As Integer, j As Integer
Range("a:j").ClearContents
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate URL
With ie.Document.GetElementsByTagName("table").Item(2)
For i = 1 To .Rows.Length - 1
For j = 0 To .Rows(1).Cells.Length - 1
Cells(i, j + 1) = .Rows(i).Cells(j).innertext
Next
Next
End With
'Veriler...
With ie.Document.GetElementsByTagName("table").Item(3)
For i = 1 To .Rows.Length - 1
For j = 0 To .Rows(1).Cells.Length - 1
Cells(i + 2, j + 1) = .Rows(i).Cells(j).innertext
Next
Next
End With
---------------------------------------------------
'Bir sayfay� 40 l� sat�rlara ay�r�r farkl� sayfalarda.
Sub sayfa_ayir()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Sheets(1).Select
sonsatir = Cells(Rows.Count, "A").End(3).Row
For i = Sheets.Count To 2 Step -1
Sheets(i).Delete
Next i
sayfasayisi = sonsatir / 40
For i = 1 To sayfasayisi + 1
satirlar = "1:40"
Rows(satirlar).Select
Selection.Cut
Set NewSh = Sheets.Add(After:=Sheets(Sheets.Count))
NewSh.Name = i
Cells(1, 1).Select
Selection.Insert Shift:=xlDown
Sheets(1).Select
Rows(satirlar).Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Next i
Application.DisplayAlerts = True
Application.ScreenUpdating = True
Sheets(1).Select
Cells(1, 1).Select
End Sub
---------------------------------------------------
'alt alta olan verileri yan yana getirir.
Sub menu()
Call kontrol
Call bos_satir_sil
End Sub
Sub kontrol()
Application.ScreenUpdating = False
Sheets("Sayfa1").Select
sonsatir = Cells(Rows.Count, "A").End(3).Row
'Columns("C:Z").Select
'Selection.ClearContents
'Range("B1").Select
eskifirma = ""
say = 0
For i = sonsatir To 1 Step -1
firma = Cells(i, 1).Value
tel = Cells(i, 2).Value
eskifirma = firma
Next i
Application.ScreenUpdating = False
End Sub
Sub bos_satir_sil()
sonsatir = Cells(Rows.Count, "A").End(3).Row
For i = sonsatir To 1 Step -1
If Cells(i, 1).Value = "" Then Rows(i).Delete
Next i
End Sub
--------------------------------------------------
'adresten il ay�rma �ehir
Sub MENU()
Call kontrol
End Sub
Sub kontrol()
Application.ScreenUpdating = False
Sheets("Sayfa2").Select
sonsatiradres = Cells(Rows.Count, "A").End(3).Row
Columns("B:B").Select
Selection.ClearContents
Range("B1").Select
Sheets("Sayfa1").Select
sonsatiril = Cells(Rows.Count, "A").End(3).Row
For i = 1 To sonsatiril
Sheets("Sayfa1").Select
sehir = buyukharf(Cells(i, 1).Value)
For j = 1 To sonsatiradres
Sheets("Sayfa2").Select
adres = buyukharf(Cells(j, 1).Value)
adresorg = Cells(j, 1).Value
If InStr(adres, sehir) > 0 Then
basla = InStr(adres, sehir)
Cells(j, 2).Value = Mid(adres, basla, Len(sehir))
'Bu b�l�m c�mleden ��kar�r.
Cells(j, 1).Value = Left(adresorg, basla - 1) & Mid(adresorg, basla +
Len(sehir), Len(adresorg))
End If
Next j
Next i
Application.ScreenUpdating = False
End Sub
--------------------------------------------------
'Fatura numaralar� kar��la�t�rma. ka��nc� karakter hatal�.
Sub kontrol()
Application.ScreenUpdating = False
Columns("B:B").Select
Selection.ClearContents
Range("B1").Select
For i = 1 To 10
Sheets("Sayfa1").Select
kod1 = Cells(i, 1).Value
Sheets("Sayfa2").Select
kod2 = Cells(i, 1).Value
For Z = 1 To Len(kod1)
If Mid(kod1, Z, 1) <> Mid(kod2, Z, 1) Then
Sheets("Sayfa1").Select
Cells(i, 2).Value = Z & ". karakter hatal�"
Exit For
End If
Next Z
Next i
Application.ScreenUpdating = False
Sheets("Sayfa1").Select
End Sub
-------------------------------------------------
'dizi array i�lemleri
Sub Test1()
Dim S1 As Worksheet, S2 As Worksheet, X As Long, Son As Long, Say As Long,
Liste(), Veri(), Zaman As Double
Dim Hesap As String
Zaman = Timer
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
.EnableEvents = False
End With
Set S1 = Sheets("Veri")
Set S2 = Sheets("�zle")
Hesap = S2.Range("H3").Value
End If
Next
End If
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
.EnableEvents = True
End With
End Sub
-------------------------------------------------
'Sayfa lardan topla icmal sayfas�nda ortalamay� yazd�r
Sub TEST()
syf = Array([Sayfa1], [Sayfa2], [Sayfa3], [Sayfa4], [Sayfa5], [Sayfa6])
son = syf(0).Cells(Rows.Count, "B").End(3).Row
ReDim w(1 To son - 1, 1 To 102)
lst = syf(0).Range("A2:C" & son).Value
For i = 1 To son - 1
w(i, 1) = i
For ii = 2 To 3
w(i, ii) = lst(i, ii)
Next ii
Next i
For s = 0 To 5
lst = syf(s).Range("e2:r" & son).Value '1 to 14 sutun
For i = 1 To son - 1
For ii = 1 To 14
w(i, ((ii - 1) * 7) + s + 5) = lst(i, ii)
Next ii
Next i
Next s
For i = 1 To son - 1
For ii = 11 To 102 Step 7
w(i, ii) = WorksheetFunction.Average(w(i, ii - 1), w(i, ii - 2), w(i,
ii - 3), w(i, ii - 4), w(i, ii - 5), w(i, ii - 6))
Next ii
Next i
Sheets("net kar��la�t�rma").[b5].Resize(UBound(w), UBound(w, 2)).Value = w
End Sub
-------------------------------------------------
'Filtreden se�ip yazd�rma.
Dim firmalar(1000) As String
Dim firmasayisi As Integer
Sub menu()
Call firmalari_al
Call yazdir
End Sub
Sub yazdir()
sonsatir = Cells(Rows.Count, "A").End(3).Row
sec = "$A$2:$K$" & sonsatir
ActiveSheet.Range(sec).AutoFilter Field:=1
For i = 1 To firmasayisi
ActiveSheet.Range(sec).AutoFilter Field:=1, Criteria1:=firmalar(i)
'ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True,
IgnorePrintAreas:=False
'Application.Wait (Now + TimeValue("00:00:05"))
Next i
End Sub
Sub firmalari_al()
Sheets("1").Select
sonsatir = Cells(Rows.Count, "A").End(3).Row
sec = "$A$2:$K$" & sonsatir
ActiveSheet.Range(sec).AutoFilter Field:=1
Range("A3:A1000").Select
Selection.Copy
Range("ZZ1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
-------------------------------------------------
'Regular exp. regex ad� soyad� ay�rma sonuan karakter ekleme
Sub test()
Set dic = CreateObject("scripting.dictionary")
dic.comparemode = vbTextCompare
[c:c].ClearContents
With CreateObject("VBScript.RegExp")
.Global = True
.Pattern = "\[\w+\]"
For i = 1 To Cells(Rows.Count, 1).End(3).Row
For Each r In Split(Cells(i, 1).Value, ",")
If .test(r) Then r = Trim(.Replace(r, ""))
If r <> "-" And r <> "" Then
dic.Item(Trim(r) & ";-@-;-@-;-") = ""
End If
Next r
Next i
End With
kys = Application.Transpose(dic.keys)
[c1].Resize(UBound(kys)).Value = kys
Range("c:c").Sort Key1:=[c1], Order1:=xlAscending
End Sub
-------------------------------------------------
'Outlook hesap se�imi
Sub Which_Account_Number()
'Don't forget to set a reference to Outlook in the VBA editor
Dim OutApp As Outlook.Application
Dim X As Long
For X = 1 To OutApp.Session.Accounts.Count
MsgBox OutApp.Session.Accounts.Item(X) & " : This is account number " & X
Next X
End Sub
-------------------------------------------------
'Say�y� string e �evirme
Sub Makro()
txt1 = "KIYAS: "
veri1 = WorksheetFunction.Min(Columns("AM")) - 30 + Range("AB13").Value
veri1 = Format(veri1, "#,##0.00")
veri1 = Replace(veri1, ",", "+")
veri1 = Replace(veri1, ".", ",")
veri1 = Replace(veri1, "+", ".")
txt = CStr(txt1 & veri1)
MsgBox txt
End Sub
-------------------------------------------------
'Textbox da capslock s�rekli a��k, b�y�k harf yazd�rma
Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Long
-------------------------------------------------
'Kaydetmeden �nce i�lem yapt�rma.
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("Sayfa1").Select
[a1] = [a1] + 1
End Sub
------------------------------------------------
'ctrl+f yada ctrl+h aramas�nda de�erlerin se�ili gelmesi.
Private Sub Workbook_Open()
Cells.Find What:="", LookIn:=xlValues
End Sub
------------------------------------------------
'Ba�ka bir program� aktif etme
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Sub ShowXL()
Dim h As Long
h = FindWindow("", "Microsoft Word") 'Grab Excel Handle
If CBool(h) Then
Call ShowWindow(h, 3) 'Maximize App
Call SetForegroundWindow(h) 'Focus on App
End If
End Sub
Sub Macro1()
On Error Resume Next
AppActivate "Microsoft Wor"
Application.Wait Now + TimeSerial(0, 0, 3)
AppActivate ThisWorkbook.Name
End Sub
-----------------------------------------------
'Ba�ka bir program� aktif etme
Option Explicit
End Sub
If level = 0 Then
If hWndStart = 0 Then hWndStart = GetDesktopWindow()
End If
level = level + 1
sWindowText = Space$(255)
r = GetWindowText(hWnd, sWindowText, 255)
sWindowText = Left(sWindowText, r)
sClassname = Space$(255)
r = GetClassName(hWnd, sClassname, 255)
sClassname = Left(sClassname, r)
Exit Do
End If
Loop
level = level - 1
End Function
End Function
-----------------------------------------------
'Mail g�nder aoutlook kapal� hesap se�imli
Option Explicit
Sub Mail_Gonder()
Dim OutApp As Object, OutMail As Object
Dim Alan As Range, Son As Long, Veri As Range
Application.ScreenUpdating = False
Application.ScreenUpdating = True
End Sub
-----------------------------------------------
'autofilter da dizin de�i�ken kullanmak.
strCritAry = Array("Data1","Data2","Data3")
Criteria1:=Array(strCritAry(0), strCritAry(2))
Criteria1:=strCritAry
-----------------------------------------------
'sat�rlar� s�t�n yapmak
Sub kod()
Application.ScreenUpdating = False
Dim S1 As Worksheet: Set S1 = Sheets("Sayfa1")
Dim S2 As Worksheet: Set S2 = Sheets("FaturaArsiv")
Dim WF As WorksheetFunction: Set WF = Application.WorksheetFunction
For i = 2 To sonsat�r
If WF.CountIf(S2.Range("A2" & ":A" & i), S2.Cells(i, "A")) = 1 Then
S1.Cells(sat, "A") = S2.Cells(i, "A")
S1.Cells(sat, "B") = S2.Cells(i, "B")
S1.Cells(sat, "C") = S2.Cells(i, "C")
S1.Cells(sat, "D") = WF.SumIfs(S2.Range("E2:E" & sonsat�r),
S2.Range("A2:A" & sonsat�r), S2.Cells(i, "A"), S2.Range("D2:D" & sonsat�r),
se�im(1))
S1.Cells(sat, "E") = WF.SumIfs(S2.Range("G2:G" & sonsat�r),
S2.Range("A2:A" & sonsat�r), S2.Cells(i, "A"), S2.Range("D2:D" & sonsat�r),
se�im(1))
S1.Cells(sat, "F") = WF.SumIfs(S2.Range("E2:E" & sonsat�r),
S2.Range("A2:A" & sonsat�r), S2.Cells(i, "A"), S2.Range("D2:D" & sonsat�r),
se�im(2))
S1.Cells(sat, "G") = WF.SumIfs(S2.Range("G2:G" & sonsat�r),
S2.Range("A2:A" & sonsat�r), S2.Cells(i, "A"), S2.Range("D2:D" & sonsat�r),
se�im(2))
S1.Cells(sat, "H") = WF.SumIfs(S2.Range("E2:E" & sonsat�r),
S2.Range("A2:A" & sonsat�r), S2.Cells(i, "A"), S2.Range("D2:D" & sonsat�r),
se�im(3))
S1.Cells(sat, "I") = WF.SumIfs(S2.Range("G2:G" & sonsat�r),
S2.Range("A2:A" & sonsat�r), S2.Cells(i, "A"), S2.Range("D2:D" & sonsat�r),
se�im(3))
sat = sat + 1
End If
Next i
Application.ScreenUpdating = True
MsgBox "B i t t i "
End Sub
-----------------------------------------------
'Farkl� excel dosyalar�n�n ayn� bilgilerini bir sayfada toplama
Sub verial()
For Each dosya In
CreateObject("Scripting.FileSystemObject").GetFolder("C:\Documents and
Settings\adeuya\shift").Files
Set yeni = CreateObject("Excel.Application")
yeni.Workbooks.Open "C:\Documents and Settings\adeuya\shift\" & dosya.Name
Set s1 = yeni.Workbooks(dosya.Name).Sheets(1)
s1.Range("a2:i" & s1.[a65536].End(3).Row).Copy
sat = [a65536].End(3).Row
Cells(sat + 1, "a").Select
ActiveSheet.Paste
yeni.Quit
Set yeni = Nothing
Next
End Sub
-------------------------------------------
'Word de kelimeleri bul
Sub FindText2()
wrdApp.Selection.WholeStory
wrdApp.Selection.Find.ClearFormatting
For i = 2 To 27
FindWord = Sheet1.Range("A" & i).Value
With wrdApp.Selection.Find
.Text = FindWord
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = True
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
If .Execute Then
Sheet1.Range("B" & i).Value = "Yes"
Else
Sheet1.Range("B" & i).Value = "No"
End If
End With
Next
wrdApp.Quit SaveChanges:=0 ' wdDoNotSaveChanges (Word constant not defined in
Excel)
End Sub
-------------------------------------------
'text dosyadan oku ba�ka programa yap�t�r.
Private Sub CommandButton1_Click()
Set fso = CreateObject("Scripting.FileSystemObject")
Filename = "C:\1.txt"
Set MyFile = fso.OpenTextFile(Filename, 1)
If MyFile.AtEndOfStream Then
ReadAllTextFile = ""
Else
ReadAllTextFile = MyFile.ReadAll
MyFile.Close
MsgBox ReadAllTextFile
End If
Set MyFile = Nothing
Unload Me
AppActivate Shell("NOTEPAD", 1)
SendKeys "^{v}", True
End Sub
-------------------------------------------
'd�eyara son bulunan� getir
=ARA(2;1/(A1:A13="A");B1:B13)
---------------------------------------------------------------------------------
'Plaka ay�rma 34AAA1983, 34AA93
'34 AAA 1983, 34 AA 93
=LEFT(A1;2)&" "&MID(A1;3;LEN(A1)-SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1;
{1;2;3;4;5;6;7;8;9;0};""))))&" "&RIGHT(A1;SUMPRODUCT(LEN(A1)-LEN(SUBSTITUTE(A1;
{1;2;3;4;5;6;7;8;9;0};"")))-2)
=SOLDAN(A1;2)&" "&PAR�AAL(A1;3;UZUNLUK(A1)-TOPLA.�ARPIM(UZUNLUK(A1)-
UZUNLUK(YER�NEKOY(A1;{1;2;3;4;5;6;7;8;9;0};""))))&"
"&SA�DAN(A1;TOPLA.�ARPIM(UZUNLUK(A1)-UZUNLUK(YER�NEKOY(A1;
{1;2;3;4;5;6;7;8;9;0};"")))-2)
---------------------------------------------------------------------------------
Function kelimebul(aranankelime As String) As Boolean
On Error Resume Next
bulunan = Columns("AX:AX").Find(what:=aranankelime)
If bulunan = aranankelime Then kelimebul = True
End Function
Sub BUL()
if kelimebul("Z�M")
End Sub
---------------------------------------------------------------------------------
Option Explicit
iFile = FreeFile()
End Sub
---------------------------------------------------------------------------------
Example 1: VBA Statements to Print Objects with Default Options
1. VBA code to print ActiveWorkbook
view plaincopy to clipboardprint?
Function PrintActiveWorkbook()
ActiveWorkbook.PrintOut
End Function
---------------------------------------------------------------------------------
2. VBA code to print Active Sheet
view plaincopy to clipboardprint?
Function PrintActiveSheet()
ActiveSheet.PrintOut
End Function
---------------------------------------------------------------------------------
3. VBA code to print all WorkSheets
view plaincopy to clipboardprint?
Function PrintAllWorkSheets()
WorkSheets.PrintOut
End Function
---------------------------------------------------------------------------------
4. VBA code to print a Single Sheet
view plaincopy to clipboardprint?
Function PrintOneSheet()
Sheets("Sheet1").PrintOut 'Sheet1 is the name of the Sheet which you want
to Print
End Function
---------------------------------------------------------------------------------
5. VBA code to print more than one Sheet
view plaincopy to clipboardprint?
Function PrintMultipleSheets()
Sheets(Array("Sheet1" , "Sheet2", "Sheet3").PrintOut
End Function
---------------------------------------------------------------------------------
6. VBA code to print Selected area of a Sheet
view plaincopy to clipboardprint?
Function PrintSelectedArea()
Selection.PrintOut
End Function
---------------------------------------------------------------------------------
7. VBA code to print Range of Worksheet
view plaincopy to clipboardprint?
Function PrintRange()
Range("A1:D5").PrintOut
End Function
---------------------------------------------------------------------------------
8. VBA code to print Excel Chart
view plaincopy to clipboardprint?
Function PrintChart()
Sheets("Sheet1").ChartObjects("Chart1").Chart.PrintOut 'Chart1 is name of
the Chart
End Function
---------------------------------------------------------------------------------
9. VBA code to print All Charts in a WorkSheet
view plaincopy to clipboardprint?
Function PrintAllChart()
Dim ExcelCharts As Object
Set ExcelCharts = Sheets("Sheet1").ChartObjects
For Each Chart In ExcelCharts
Chart.Chart.PrintOut
Next
End Function
---------------------------------------------------------------------------------
10. VBA code to print All Charts in a Workbook
view plaincopy to clipboardprint?
Function PrintAllChart()
Dim ExcelCharts As Object
For Each Sheet In Sheets
Set ExcelCharts = Sheet.ChartObjects
For Each Chart In ExcelCharts
Chart.Chart.PrintOut
Next
Set ExcelCharts = Nothing
Next
End Function
---------------------------------------------------------------------------------
Example 2: VBA Statements to Print Objects with different parameters passed
1. VBA code to print From Page Number X to Page Number Y
view plaincopy to clipboardprint?
=D��EYARA(A1;DOLAYLI("'"&�ND�S({"Sayfa1"\"Sayfa2"\"Sayfa3"};KA�INCI(1;--(
E�ERSAY(DOLAYLI("'"&{"Sayfa1"\"Sayfa2"\"Sayfa3"}&"'!A1:A100");A1)>0);0))&"'!
A1:B100");2;0)
-----------------------------------------------------------------
'Text file yazd�rma
Dim yol As String
Sub ensonsatirne()
Else
ensonsatir = Rows.Count
ensonsutun = Columns.Count
End If
End Sub
Sub MENU_csv()
Call dosyaoku
End Sub
Sub dosyaoku()
'Dosya se�me
'anadosya = ActiveWorkbook.Name
Sheets("MagazaKod").Select
Cells.Clear
Sheets("Data").Select
ActiveSheet.Range("$A$1:$D$65000").AutoFilter Field:=1
Range("A3").Select
Columns("A:A").Select
Selection.Copy
Sheets("MagazaKod").Select
Range("A1").Select
ActiveSheet.Paste
Columns("A:A").Select
Application.CutCopyMode = False
Rows("1:1").Select
Selection.Delete Shift:=xlUp
Columns("A:A").Select
ActiveWorkbook.Worksheets("MagazaKod").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("MagazaKod").Sort.SortFields.Add Key:=Range("A1"), _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("MagazaKod").Sort
.SetRange Range("A1:A65000")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
Call ensonsatirne
magazasonsatir = ensonsatir
For i = 1 To magazasonsatir
Sheets("MagazaKod").Select
Sheets("Data").Select
Range("A1").Select
Call ensonsatirne
Range("B2:D2").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Range("B5").Select
Application.CutCopyMode = False
Application.DisplayAlerts = False
ChDir yol
Application.DisplayAlerts = True
Do Until EOF(1)
Close #1
Close #2
On Error Resume Next
Kill dosyaadi
On Error GoTo 0
Next i
Sheets("Data").Select
ActiveSheet.Range("$A$1:$D$65000").AutoFilter Field:=1
Range("A3").Select
End Sub
----------------------------------
Sub dosya_al()
Dim sy As Worksheet
Set sy = Sheets("Sayfa1")
tema = web_Doc.all.tags("table").Item(2).innerHTML
b = InStr(1, tema, "yoresi-turkuleri.html", vbBinaryCompare)
sn = InStr(b + Len("yoresi - turkuleri.HTML"), tema, "</a>", vbBinaryCompare)
Call CloseIE
'Metni par�ala
--------------------------------
'metin gibi tarih, tarihe �evir
Sub tarihecevir()
Selection.NumberFormat = "m/d/yyyy"
Application.Calculation = xlCalculationManual
kolon = ActiveCell.Column
sonsatir = Cells(Rows.Count, kolon).End(3).Row
For j = 1 To sonsatir
gec = Trim(Cells(j, kolon).Value)
Select Case Left(gec, 1)
Case "0", "1", "2", "3", "4", "5", "6", "7", "8", "9": Cells(j,
kolon).Value = CDate(gec)
Case 0, 1, 2, 3, 4, 5, 6, 7, 8, 9: Cells(j, kolon).Value = CDate(gec)
End Select
Next j
Application.Calculation = xlCalculationAutomatic
End Sub
--------------------------------------
'A��k excel dosyas�ndan sorgu �al�t�rma
Private Sub CommandButton1_Click()
Sayfa1.Columns("L:Z").Delete
Call SqlSorgusuListObjects ' Ekledi�imiz metodumuzu �a��rarak ba�l�yoruz
Dim cn As Object ' Ba�lant� tan�ml�yoruz
Dim rs As Object ' Recordset tan�ml�yoruz
Dim strFile$, strCon$, strSQL$
strFile = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name ' Dosyam�z�n yolunu
belirtiyoruz
strCon = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFile & ";Extended
Properties=""Excel 8.0;HDR=Yes;IMEX=1"";"
' Connection string tan�ml�yoruz
Set cn = CreateObject("ADODB.Connection")
Set rs = CreateObject("ADODB.Recordset")
cn.Open strCon
strSQL = TextBox1.Text ' Sql sorgumuzu textboxtan ald�k
Sub SqlSorgusuListObjects()
Const Prefix = "Sql"
Dim x, WSh, i&
With ThisWorkbook
For Each WSh In .Worksheets
i = i + 1
For Each x In WSh.ListObjects
.Names.Add Prefix & i & x.Name, x.Range, True
Next
Next
End With
End Sub
-------------------------------------
'Excel SQL den okuma kolon ba�l�klar� ile beraber
Option Explicit
Private CN As ADODB.Connection
If Connected Then
' If connected run query and disconnect
Call Query(SQL)
Call Disconnect
Else
' Couldn't connect
MsgBox "Could Not Connect!"
End If
End Sub
Function Disconnect()
' Close connection
CN.Close
End Function
Dim RS As ADODB.Recordset
Dim Field As ADODB.Field
With CN
' Create connecting string
.ConnectionString = "Provider=SQLOLEDB.1;" & _
"Integrated Security=SSPI;" & _
"Server=" & Server & ";" & _
"Database=" & Database & ";"
.Open
End With
' Check connection state
If CN.State = 0 Then
Connect = False
Else
Connect = True
End If
End Function
-------------------------------------
' Excel SQL den okuma
Option Explicit
Private CN As ADODB.Connection
Private objMyConn As ADODB.Connection
Private objMyCmd As ADODB.Command
Private objMyRecordset As ADODB.Recordset
Sub GetDataFromADO()
'Declare variables'
Set objMyConn = New ADODB.Connection
Set objMyCmd = New ADODB.Command
Set objMyRecordset = New ADODB.Recordset
'Open Connection'
'objMyConn.ConnectionString = "Provider=SQLOLEDB;Data
Source=TESTNET2014;User ID=sa;Password=sifre;"
objMyConn.ConnectionString = "Provider=SQLOLEDB;Data
Source=localhost;Initial Catalog=TESTNET2014;Trusted_connection=yes;"
objMyConn.Open
'Set and Excecute SQL Command'
Set objMyCmd.ActiveConnection = objMyConn
objMyCmd.CommandText = "select * from TBLCARIPLASIYER"
objMyCmd.CommandType = adCmdText
objMyCmd.Execute
'Open Recordset'
Set objMyRecordset.ActiveConnection = objMyConn
objMyRecordset.Open objMyCmd
End Sub
-------------------------------------
'kapal� dosyadan bilgi okuma
locConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
& "Data Source=" & parExcelFileName & ";" _
& "Extended Properties=""Excel 8.0;HDR=YES"";"
locConnection.Open ConnectionString:=locConnectionString
locRst.Open Source:=locQuery, ActiveConnection:=locConnection
If locRst.EOF Then 'Empty sheet or only one row
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''' FIX: an empty sheet returns "F1"
'''''' http://support.microsoft.com/kb/318373
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If locRst.Fields.Count = 1 And locRst.Fields(0).Name = "F1" Then Exit Function
'Empty sheet
ReDim locResult(1 To 1, 1 To locRst.Fields.Count) As Variant
For i = 1 To locRst.Fields.Count
locResult(1, i) = locRst.Fields(i - 1).Name
Next i
Else
locCols = locRst.GetRows
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''''' FIX: an empty sheet returns "F1"
'''''' http://support.microsoft.com/kb/318373
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
If locRst.Fields.Count = 1 And locRst.Fields(0).Name = "F1" And UBound(locCols,
2) = 0 And locCols(0, 0) = "" Then Exit Function 'Empty sheet
For j = 1 To UBound(locResult, 2)
locResult(1, j) = locRst.Fields(j - 1).Name
Next j
For i = 2 To UBound(locResult, 1)
For j = 1 To UBound(locResult, 2)
locResult(i, j) = locCols(j - 1, i - 2)
Next j
Next i
End If
locRst.Close
locConnection.Close
Set locRst = Nothing
Set locConnection = Nothing
getDataFromClosedExcelFile = locResult
Exit Function
error_handler:
'Wrong file name, sheet name, or other errors...
'Errors (#N/A, etc) on the sheet should be replaced by Null but should not raise
an error
If locRst.State = ADODB.adStateOpen Then locRst.Close
If locConnection.State = ADODB.adStateOpen Then locConnection.Close
Set locRst = Nothing
Set locConnection = Nothing
End Function
End Function
-------------------------------------
'Binary to decimal
For P = 1 To Len(S) - 1
Ans = Ans + Val(Mid$(S, P, 1)) * K
K = K * 2
Next P
Bin2Dec = Ans + Val(Mid$(S, P, 1)) * K
End Function
Sub TestIt()
Dim S As String
S = "11111111111111111111111111111111"
Cells(2, 1).Value = Len(S)
Cells(1, 1).Value = Bin2Dec(S)
End Sub
------------------------------
Private Sub dinle ()
MSComm1.CommPort = 1
' 9600 baud, no parity, 8 data, 1 stop bit.
MSComm1.Settings = "9600,N,8,1"
MSComm1.PortOpen = True
Do
DoEvents
textbox1 = textbox1 & MSComm1.Input
Loop Until commandbutton1.caption = "dinle"
MSComm1.PortOpen = False
End Sub
------------------------------
'COM1 port veri okuma
Sub Receive_COM5()
recLen = Len(record)
'Open COM5 port with baud rate 2400, No parity, 8 data bits and 1 stop bit
COM5file = FreeFile
Open "COM5:2400,N,8,1" For Random As #COM5file Len = recLen
Debug.Print "Started"
For i = 1 To recLen
inputByte = Asc(Mid(record, i, 1))
If inputByte = 0 Then
'No character in this position
ElseIf inputByte >= 32 And inputByte <= 126 Then
'Printable character
Debug.Print "<" & inputByte & "> "; Chr(inputByte)
Else
'Non-printable character
Debug.Print "<" & inputByte & ">"
End If
Next
End If
DoEvents
Sleep 200
Wend
Close #COM5file
Debug.Print "Finished"
End Sub
----------------------------------------
'Text dosyaya yazma
'Or put it to a file
'dim vFF as long
'vff=freefile
'open "C:\thehtml.txt" for output as #vff
'print #vff,vie.document.body.innerhtml
'close #vff
----------------------------------------
'A��k internet explorer dan linkleri alma
Sub Hyperlinks_of_IE_windows()
Dim a(), w
Dim App As String, Title As String, Url As String
Dim i As Long, j As Long
With CreateObject("Shell.Application")
ReDim a(1 To .Windows.Count, 1 To 2)
On Error Resume Next
For Each w In .Windows
App = w.Application
If App = "Internet Explorer" Then
Url = Replace(w.LocationURL, "%20", " ")
Title = Replace(w.LocationName, "%20", " ")
i = i + 1
a(i, 1) = Title
a(i, 2) = Url
'Debug.Print Title, Url
App = vbNullString
End If
Next
End With
If i Then
Range("A1").Resize(i).Value = a()
For j = 1 To i
Cells(j, 1).Hyperlinks.Add anchor:=Cells(j, 1), Address:=a(j, 2)
Next
End If
End Sub
--------------------------------------
'Excel �al�ma kitab� ekleme isim verme
so
--------------------------------------------------
'A1 h�cresindeki tarihi g�re tarih sayma
=E�ERSAY(B1:B100;"<="&A1)
-------------------------------------------------
' her 20 sat�rda bir sayac� artt�r.
=E�ER(SATIR()=1;1;E�ER(MOD(SATIR();20)=1;A1+1;A1))
-------------------------------------------------
'b�y�k data kar��la�t�rma diziler ile
Option Explicit
Sub Fast_Vlookup()
Dim Zaman As Double, Dizi As Variant, X As Long
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Zaman = Timer
With CreateObject("Scripting.Dictionary")
For X = 2 To UBound(Dizi, 1)
.Item(Dizi(X, 1)) = Dizi(X, 4) & "#" & Dizi(X, 3) & "#" & Dizi(X, 2)
Next
For X = 2 To UBound(Dizi, 1)
If .Exists(Dizi(X, 1)) Then
Dizi(X, 10) = Split(.Item(Dizi(X, 1)), "#")(0)
Dizi(X, 11) = Split(.Item(Dizi(X, 1)), "#")(1)
Dizi(X, 12) = Split(.Item(Dizi(X, 1)), "#")(2)
Else
Dizi(X, 10) = "Stat�s�z"
Dizi(X, 11) = "Stat�s�z"
Dizi(X, 12) = "Stat�s�z"
End If
Next
End With
------------------------------------------------
------------------------------------------------
'Web den veri al parse ile
Sub veri_Al()
On Error Resume Next
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate link
satsay = 0
Application.Wait Now + TimeSerial(0, 0, 3)
say = say + 1
Cells(satir, say).Value = magaza
Exit For
End If
say = say + 1
Cells(satir, say).Value = magaza
End If
Next j
End If
i = i + 1
Loop
son:
IE.Quit
Set IE = Nothing
End Sub
-----------------------------------------------
Sub Gonderene_Gore_Outlook_Maillerini_Kaydetme()
Dim ns As Namespace
Dim Inbox As MAPIFolder
Dim Item As Object
Dim Atmt As Attachment
Dim FileName As String
If Inbox.Items.Count = 0 Then
MsgBox "Hi�bir Mesaja Rastlanmad�.", vbInformation, _
"Hi�bir �ey Bulunamad�"
Exit Sub
End If
For Each Item In Inbox.Items
'If Item.SenderEmailAddress = "deneme@deneme.com" Then
For Each Atmt In Item.Attachments
FileName = "C:\" & Atmt.FileName
Atmt.SaveAsFile FileName
Next Atmt
'End If
Next Item
hata:
End Sub
-----------------------------------------------
'internet explorer t�m�n� se� ve kopyala
or
ie.ExecWB 17, 2
ie.ExecWB 12, 0
OLECMDID_OPEN = 1
OLECMDID_NEW = 2
OLECMDID_SAVE = 3
OLECMDID_SAVEAS = 4
OLECMDID_SAVECOPYAS = 5
OLECMDID_PRINT = 6
OLECMDID_PRINTPREVIEW = 7
OLECMDID_PAGESETUP = 8
OLECMDID_SPELL = 9
OLECMDID_PROPERTIES = 10
OLECMDID_CUT = 11
OLECMDID_COPY = 12
OLECMDID_PASTE = 13
OLECMDID_PASTESPECIAL = 14
OLECMDID_UNDO = 15
OLECMDID_REDO = 16
OLECMDID_SELECTALL = 17
OLECMDID_CLEARSELECTION = 18
OLECMDID_ZOOM = 19
OLECMDID_GETZOOMRANGE = 20
OLECMDID_UPDATECOMMANDS = 21
OLECMDID_REFRESH = 22
OLECMDID_STOP = 23
OLECMDID_HIDETOOLBARS = 24
OLECMDID_SETPROGRESSMAX = 25
OLECMDID_SETPROGRESSPOS = 26
OLECMDID_SETPROGRESSTEXT = 27
OLECMDID_SETTITLE = 28
OLECMDID_SETDOWNLOADSTATE = 29
OLECMDID_STOPDOWNLOAD = 30
OLECMDID_ONTOOLBARACTIVATED = 31
OLECMDID_FIND = 32
OLECMDID_DELETE = 33
OLECMDID_HTTPEQUIV = 34
OLECMDID_HTTPEQUIV_DONE = 35
OLECMDID_ENABLE_INTERACTION = 36
OLECMDID_ONUNLOAD = 37
OLECMDID_PROPERTYBAG2 = 38
OLECMDID_PREREFRESH = 39
OLECMDID_SHOWSCRIPTERROR = 40
OLECMDID_SHOWMESSAGE = 41
OLECMDID_SHOWFIND = 42
OLECMDID_SHOWPAGESETUP = 43
OLECMDID_SHOWPRINT = 44
OLECMDID_CLOSE = 45
OLECMDID_ALLOWUILESSSAVEAS = 46
OLECMDID_DONTDOWNLOADCSS = 47
OLECMDID_UPDATEPAGESTATUS = 48
OLECMDID_PRINT2 = 49
OLECMDID_PRINTPREVIEW2 = 50
OLECMDID_SETPRINTTEMPLATE = 51
OLECMDID_GETPRINTTEMPLATE = 52
OLECMDID_PAGEACTIONBLOCKED = 55
OLECMDID_PAGEACTIONUIQUERY = 56
OLECMDID_FOCUSVIEWCONTROLS = 57
OLECMDID_FOCUSVIEWCONTROLSQUERY = 58
OLECMDID_SHOWPAGEACTIONMENU = 59
OLECMDID_ADDTRAVELENTRY = 60
OLECMDID_UPDATETRAVELENTRY = 61
OLECMDID_UPDATEBACKFORWARDSTATE = 62
OLECMDID_OPTICAL_ZOOM = 63
OLECMDID_OPTICAL_GETZOOMRANGE = 64
OLECMDID_WINDOWSTATECHANGED = 65
OLECMDID_ACTIVEXINSTALLSCOPE = 66
OLECMDEXECOPT_DODEFAULT = 0
OLECMDEXECOPT_PROMPTUSER = 1
OLECMDEXECOPT_DONTPROMPTUSER = 2
OLECMDEXECOPT_SHOWHELP = 3
-----------------------------------------------------------
'weben bilgi okuma tablo ve h�cre
---------------------------------------------------------
'Her 12 saturda bir numaray� bir artt�r
=YUKARIYUVARLA((SATIR()-X)/12;0)
X yerine hangi sat�rdan ba�layacaksan�z 1 say� eksi�ini giriniz.
Yani ; E6 dan itibaren kullanacaksan�z; X yerine 5 yaz�n�z.
=YUKARIYUVARLA((SATIR()-5)/12;0)
---------------------------------------------------------
'Bul de�i�tir.
Sub Degistir3()
Dim bul As Range, say As Integer, i As Byte
say = Range("A65000").End(3).Row
----------------------------------
'Web sayfas�ndaki tablolar� g�ster
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal
nCmdShow As Long) As Long
Sub Tablolari_Goster()
Dim URL As String
Dim ie As Object
Range("A1:�v5000").ClearContents
URL = "http://application2.ibb.gov.tr/IBBWC/HalFiyatlari.aspx"
Set ie = CreateObject("InternetExplorer.Application")
sat = 1
With ie
.Navigate URL
.Visible = 1
ShowWindow ie.hwnd, 6
Do Until ie.ReadyState = 4: DoEvents: Loop
Do While ie.Busy: DoEvents: Loop
On Error Resume Next
For k = 1 To 20
Set t = ie.document.GetElementsByTagName("table").Item(k)
For i = 0 To t.Rows.Length - 1
For j = 0 To t.Cells.Length - 1
Cells(sat, j + 1) = k & " " & i & " " & j & " " & t.Rows(i).Cells(j).innertext
Next
sat = sat + 1
Next
Next
---------------------------------
'Plaka Ay�rma form�l�
=IF(OR(MID(B2;4;1)="0";MID(B2;4;1)="1";MID(B2;4;1)="2";MID(B2;4;1)="3";MID(B2;4;1)=
"4";MID(B2;4;1)="5";MID(B2;4;1)="6";MID(B2;4;1)="7";MID(B2;4;1)="8";MID(B2;4;1)="9"
);CONCATENATE(MID(B2;1;2);" ";MID(B2;3;1);"
";MID(B2;4;100));IF(OR(MID(B2;5;1)="0";MID(B2;5;1)="1";MID(B2;5;1)="2";MID(B2;5;1)=
"3";MID(B2;5;1)="4";MID(B2;5;1)="5";MID(B2;5;1)="6";MID(B2;5;1)="7";MID(B2;5;1)="8"
;MID(B2;5;1)="9");CONCATENATE(MID(B2;1;2);" ";MID(B2;3;2);"
";MID(B2;5;100));CONCATENATE(MID(B2;1;2);" ";MID(B2;3;3);" ";MID(B2;6;100))))
----------------------------------
'Ad soyad ay�rma regular expression d�zenli ifadeler.
Sub test()
Dim arr(1 To 4), reg As Object, colReg As Object, i As Integer
reg.Global = True
reg.Pattern = "[a-zA-ZI����������]+([a-zA-ZI����������]+)?"
For i = 1 To 4
Next
End Sub
--------------------------------------------
'Excel dilini ��renmek. language code
code 1033 ingilizce
code 1055 T�rk�e
Sub GetXlLang()
Dim lngCode As Long
lngCode = Application.LanguageSettings.LanguageID(msoLanguageIDUI)
MsgBox "Code is: " & lngCode & vbNewLine & GetTxt(lngCode)
End Sub
-------------------------------------
'#YOK #NA gibi hatalar� silmek i�in
Dim Rky As Range
Range("G:U").Select
For Each Rky In Selection.SpecialCells(2)
If IsError(Rky.Value) Then
Rky.ClearContents
End If
Next Rky
Set Rky = Nothing
-----------------------------------------
'URL html otomatik giri�
Sub giris()
Dim URL As String
Dim HTML_Body As Object
Dim IE As Object
URL = "https://otohasar.anadolusigorta.com.tr/loginfrm.php?ml="
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate URL
.Visible = True
Do Until IE.ReadyState = 4: DoEvents: Loop
Do While IE.Busy: DoEvents: Loop
IE.Document.all("user_name").Value = Cells(1, "a")
IE.Document.all("user_pass").Value = Cells(1, "b")
IE.Document.all("customer_code").Value = Cells(1, "c")
IE.Document.forms(0).submit
End With
Set IE = Nothing
Set HTML_Body = Nothing
MsgBox ("Bitti ")
End Sub
---------------------------------
'her kelimeden 10 dan fazla ise uyar� yaz.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("J8:J150,H8:H150")) Is Nothing Then Exit Sub
Say = WorksheetFunction.SumIf(Range("J:J"), Cells(Target.Row, "J"),
Range("H:H"))
If Say > 10 Then
MsgBox Cells(Target.Row, "J") & " limiti doldu!", vbCritical
Cells(Target.Row, "H") = ""
Cells(Target.Row, "J") = ""
Exit Sub
End If
End Sub
--------------------------------
'M�kerrer kay�tlar� ��kar.
Sub kod()
Range("B1") = ""
For i = 1 To [A65536].End(3).Row
If WorksheetFunction.CountIf(Range("A1:A" & i), Cells(i, "A")) = 1 Then
Range("B1") = Range("B1") & Cells(i, "A") & ", "
End If
Next i
End Sub
--------------------------------
Sub ucgen()
x = 16 * 2
satir = 30
kolon = 1
Cells.Clear
For j = x To 1 Step -4
satir = satir - 1
kolon = kolon + 2
For i = 1 To j
End Sub
-----------------------------------------------------------------------------------
----
Option Compare Text
Sub SartliSil()
Application.ScreenUpdating = False
Application.ScreenUpdating = True
End Sub
-----------------------------------------------------------------------------------
----
Option Compare Text
Sub SartliSil()
Application.ScreenUpdating = False
End Sub
---------------------------------------
reg test
http://regex101.com/
-------------------------------------------------------
'10 dan b�y�k 50 den k���k numaralar� alma
Sub RegEx_Test2()
Dim deger As String
deger = "100"
With CreateObject("VBScript.Regexp")
.Pattern = "(?:[1-4]\d){2}|50"
MsgBox .test(deger)
End With
End Sub
------------------------------------------------------------------
'Tckimlik numaralar�n� ay�rma
Sub test()
Set reg = CreateObject("VBScript.Regexp")
reg.Pattern = "\b\d{11}\b"
-------------------------------------------------------------------
'vba regular exp. c�mle i�inden belirli kelimeleri alma
Sub regular_exp()
Dim Rky As Object, i%
Set Rky = CreateObject("VBScript.RegExp")
Rky.Global = True
Rky.Pattern = "([0-9]{2,5})"
On Error Resume Next
For i = 1 To Range("A65536").End(3).Row
Cells(i, "B") = CLng(Rky.Execute(Cells(i, "A")).Item(0))
Next i
i = Empty: Set Rky = Nothing
End Sub
-------------------------------------------------------------------
'aktif h�cre renklendirme
End Sub
-------------------------------------------------------------------
'aktif sat�r renklendirme, h�cre renklendirme
--------------------------------------------------
'Sat�rlarda belirli bir kelimeyi sayma
=E�ERSAY(A:A;"*istanbul*")
--------------------------------------------------
'Kelimelere b�lme i�lemi
---------------------------------------------
k�dem y�l� hesaplama 7 y�l 8 ay 20 g�n
=ETAR�HL�(A1;BUG�N();"y")&" "&"YIL"&" "&ETAR�HL�(A1;BUG�N();"ym")&" "&"AY"&"
"&ETAR�HL�(A1;BUG�N();"md")&" "&"G�N"
-------------------------------------------
'ka��nc� hafta, y�l�n haftas�.
Function kacincihafta(d)
Dim t
t = DateSerial(Year(d + (8 - Weekday(d)) Mod 7 - 3), 1, 1)
kacincihafta = ((d - t - 3 + (Weekday(t) + 1) Mod 7)) \ 7 + 1
End Function
---------------------------------------------
'Excel resimleri silmek
Sub resimlerisil1()
Dim syf as worksheet, shp as shape
For each syf in thisworkbook.worksheets
For each shp in syf
Shp.delete
Next shp
Next syf
Set shp = nothing: set syf = nothing
End sub
---------------------------------------------
'excel sayfallar�ndaki resimleri silmek.
Sub resimleri_sil()
Dim syf as worksheet
For each syf in thisworkbook.worksheets
Syf.drawingobjects.delete
Next syf
Set syf = nothing
End sub
-------------------------------------------
'c�mlede ilk 3 �� kelimeyi almak
=PAR�AAL(A1;1;MBUL(" ";A1)) & PAR�AAL(PAR�AAL(A1;MBUL(" ";A1)+1;1000);1;MBUL("
";PAR�AAL(A1;MBUL(" ";A1)+1;1000))) & PAR�AAL(PAR�AAL(PAR�AAL(A1;MBUL("
";A1)+1;1000);MBUL(" ";PAR�AAL(A1;MBUL(" ";A1)+1;1000))+1;1000);1;MBUL("
";PAR�AAL(PAR�AAL(A1;MBUL(" ";A1)+1;1000);MBUL(" ";PAR�AAL(A1;MBUL(" ";A1)+1;1000))
+1;1000)))
------------------------------------------
'bir �st sat�rdan kod al ekle yaz.
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [B:B]) Is Nothing Then Exit Sub
On Error GoTo son
If Len(Target.Value) = 3 Or Len(Target.Value) = 2 Then
sut = ActiveCell.Column
sat = ActiveCell.Row - 1
girilensayi = Cells(sat, sut).Value
Cells(sat, sut).Value = Left(Cells(sat - 1, sut).Value, 4) & girilensayi
End If
son:
End Sub
-------------------------------------
'Makro ya k�sayol tu� atamas�
Application.OnKey "{F9}", "HTML"
-------------------------------------
'sadece rakamlar kals�n
Sub RemoveAlphas()
Dim intI As Integer
Dim rngR As Range, rngRR As Range
Dim strNotNum As String, strTemp As String
Set rngRR = Selection.SpecialCells(xlCellTypeConstants, _
xlTextValues)
For Each rngR In rngRR
strTemp = ""
For intI = 1 To Len(rngR.Value)
If Mid(rngR.Value, intI, 1) Like "[0-9.]" Then
strNotNum = Mid(rngR.Value, intI, 1)
Else: strNotNum = ""
End If
strTemp = strTemp & strNotNum
Next intI
rngR.Value = strTemp
Next rngR
End Sub
-----------------------------
'Tablo alan�na ve de�erlerine g�re sorgu olu�turma
="UPDATE TBLOZLUK SET
"&$D$1&"='"&D2&"',"&$E$1&"='"&E2&"',"&$F$1&"='"&F2&"',"&$G$1&"='"&G2&"',"&$H$1&"='"
&H2&"',"&$I$1&"='"&I2&"',"&$J$1&"='"&J2&"',"&$K$1&"='"&K2&"',"&$L$1&"='"&L2&"',"&$M
$1&"='"&M2&"' WHERE "&$A$1&"='"&A2&"' AND "&$B$1&"='"&B2&"' AND "&$C$1&"='"&C2&"'"
'tarihi netsis e �evir
=YIL(E491)
&"."&E�ER(AY(E491)<10;"0"&AY(E491);AY(E491))&"."&E�ER(G�N(E491)<10;"0"&G�N(E491);G�
N(E491))&" 00:00:00.000"
--------------------------------------------------------
'a1 h�cresi ile PAYIN ADI aras�ndaki sat�rlar� siler.
Sub Sat�rsil()
Set Aranan = Sheets("sektor").Cells.Find("PAYIN ADI", , xlValues, xlWhole)
If Not Aranan Is Nothing Then
Sheets("sektor").Rows(1 & ":" & Aranan.Row - 1).Delete
End If
End Sub
------------------------------------------------------
'bo� sat�rlar� gizle.
Range("D18:D25").SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True
------------------------------------------------------
'selection star rows , end row
'se�im alan� ba�lama ve biti� sat�r�
i = Selection.Count
j = Selection.Rows.Count
X = Selection.Rows(1).Row
y = Selection.Rows.Count + X - 1
------------------------------------------------------
'Kelime bul o h�crenin sat�r numaras�n� al.
Sub Sil()
Application.ScreenUpdating = False
End Sub
------------------------------------------------------
'ikili sat�rlar� s�t�nlara �evir
Sub Duzenle()
Dim i As Long, _
j As Long, _
Kol As Integer, _
ShL As Worksheet, _
ShD As Worksheet
Application.ScreenUpdating = False
ShL.Range("A:A").Clear
Kol = ShD.Cells.Find("*", SearchOrder:=xlByColumns,
SearchDirection:=xlPrevious).Column
ShL.Cells.EntireColumn.AutoFit
With Application
.ScreenUpdating = True
.CutCopyMode = False
End With
End Sub
------------------------------------------
Nedir �u Option Explicit -- Option Base -- Option Compare
Bunlar�n ���de deklarasyon kesiminde yer al�r
----------------------------------
'Kredi faizi hesaplama
'= ( kreditutari * faizorani/100 ) / ( 1 - ( 1 / ( 1+ faizorani/100)^vade ) )
----------------------------------
'sgk e bildirge sayfas�na otomatik giri�
https://ebildirge.sgk.gov.tr/WPEB/amp/loginldap?
j_username=********&isyeri_kod=**&j_password=****&isyeri_sifre=****
---------------------------------------
'D�ng�l� sayfa de�i�tirme.
Sub aral�kl�_cal�st�r()
Application.OnTime Now + TimeValue("00:02:00"), "sayfalar"
End Sub
Sub sayfalar()
Sheets("1").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("2").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("3").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("4").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("5").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("6").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("7").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("8").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("9").Select
Application.Wait Now + TimeValue("00:00:10")
Sheets("10").Select
Application.Wait Now + TimeValue("00:00:10")
Call aral�kl�_cal�st�r
End Sub
---------------------------------------
'Outlook adres defterine ekleme
Dim ExcelceOUT As Boolean
'B�lent �zt�rk - 12.04.2012 - www.excelce.net/forum
Sub OutlookaExceldenAdresEkle()
Dim ekle As Boolean
ekle = ExcelceAdresEkle
End Sub
Say = 1
Kisi_ad = KisiDetay(Say, 1)
Kisi_soyad = KisiDetay(Say, 2)
Kisi_mail = KisiDetay(Say, 3)
Kisi_firma = KisiDetay(Say, 4)
Kisi_firma_tel = KisiDetay(Say, 5)
Kisi_firma_fax = KisiDetay(Say, 6)
Kisi_ev_tel = KisiDetay(Say, 7)
Kisi_cep_tel = KisiDetay(Say, 8)
Set ExcelceKisi = olApp.CreateItem(2)
With ExcelceKisi
.FirstName = Kisi_ad
.LastName = Kisi_soyad
.Email1Address = Kisi_mail
.CompanyName = Kisi_firma
.BusinessTelephoneNumber = Kisi_firma_tel
.BusinessFaxNumber = Kisi_firma_fax
.HomeTelephoneNumber = Kisi_ev_tel
.MobileTelephoneNumber = Kisi_cep_tel
End With
Say = Say + 1
Loop
ExcelceAdresEkle = True
GoTo Bitir
Hata:
ExcelceAdresEkle = False
Bitir:
Set ExcelceKisi = Nothing
If ExcelceOUT Then
olApp.Quit
End If
Set olApp = Nothing
End Function
------------------------------------------
'son harfi bul, ktf
Function sonharfibul(hucre As Range, aranan As String, duyarlilik As Integer)
fonksiyon = Array("FIND", "SEARCH")
kontrol = IsError(Evaluate(fonksiyon(duyarlilik) & "(" & """" & aranan & """,""" &
hucre & """,1)"))
If kontrol = False Then
sonharfibul = Len(hucre) - Evaluate(fonksiyon(duyarlilik) & "(" & """" & aranan &
""",""" & StrReverse(hucre) & """,1)") + 1
Else
sonharfibul = 0
End If
End Function
----------------------------------------
'dosya isimlerini de�i�tir.
Sub Fihrist()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Set Index = ActiveWorkbook
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Yol = CreateObject("Shell.Application").BrowseForFolder _
(0, "L�tfen bir klasor se�in !", 1)
If Not TypeName(Yol) = "Nothing" Then Set YolItem = Yol.self
MyPath = YolItem.Path
Columns(1).ClearContents
Cells(1, 1) = MyPath & "\"
sat = 1
For Each dosya In FSO.GetFolder(MyPath).Files
uzanti = FSO.GetExtensionName(MyPath & dosya.Name)
If uzanti = "JPG" Or uzanti = "jpg" Then
sat = sat + 1
Index.Sheets("Sayfa1").Cells(sat, 1) = dosya.Name
End If
Next
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
'Tahsin Beyin kodlar�
Sub isim_degistir()
On Error Resume Next
Dim i As Long, say As Long
'If MsgBox("D:\Deneme klas�r� i�ersindeki dosyalar�n isimleirini de�i�tirmek
istiyormusunuz..!!??", _
vbYesNo + vbQuestion, Application.UserName) = vbNo Then Exit Sub
For i = 2 To Cells(65536, "A").End(xlUp).Row
If Dir(Cells(1, 1) & Cells(i, "A").Value) <> "" Then
Name (Cells(1, 1) & Cells(i, "A").Value) As (Cells(1, 1) & Cells(i,
"B").Value)
say = say + 1
End If
Next i
MsgBox say & " dosya isimi de�i�tirildi..", vbOKOnly + vbInformation,
Application.UserName
End Sub
--------------------------------------------
'web sitesindeki kutular�n listelerin i�eri�inin al�nmas�
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal
nCmdShow As Long) As Long
Application.DisplayAlerts = False
'Application.VBE.MainWindow.Visible = False
On Error Resume Next
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate URL
'.Visible = True
.Visible = 1
ShowWindow IE.hwnd, 6
For t = 1 To IE.document.all("stockDropDownList").Length - 1
IE.document.all("stockDropDownList").selectedIndex = t
IE.document.all("stockDropDownList").OnChange
Do Until IE.ReadyState = 4: DoEvents: Loop
Do While IE.Busy: DoEvents: Loop
Do Until IE.ReadyState = 4: DoEvents: Loop
sat2 = 10
For j = 0 To IE.document.all("bilancoDropDownList").Length - 1
IE.document.all("bilancoDropDownList").selectedIndex = j
IE.document.all("bilancoDropDownList").OnChange
Do Until IE.ReadyState = 4: DoEvents: Loop
Do While IE.Busy: DoEvents: Loop
Do Until IE.ReadyState = 4: DoEvents: Loop
Sheets("data").Cells(sat, sat2).Value = "Y�l / D�nem"
Sheets("data").Cells(sat, sat2).Interior.ColorIndex = 44
sat2 = sat2 + 1
For n = 0 To IE.document.all("donem1DropDownList").Length - 1
Sheets("data").Cells(sat, sat2).Value = IE.document.all.donem1DropDownList(n).Text
sat2 = sat2 + 1
Next
Sheets("data").Cells(sat, sat2).Value = "son"
sat2 = sat2 + 1
Next j
sat = sat + 1
Next t
End Sub
--------------------------------------------
'� yat�r�m dan bilan�o verilerinin al�nmas� sendkey kullan�m�
Private Declare Function InternetCheckConnection Lib "wininet.dll" Alias
"InternetCheckConnectionA" (ByVal lpszUrl As String, ByVal dwFlags As Long, ByVal
dwReserved As Long) As Long
Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal
nCmdShow As Long) As Long
UserForm1.ComboBox3.Clear
UserForm1.ComboBox4.Clear
UserForm1.ComboBox5.Clear
UserForm1.ComboBox6.Clear
If ComboBox2.ListCount > 0 Then
UserForm1.ComboBox2.Text = UserForm1.ComboBox2.List(ComboBox2.ListCount - 1)
End If
End Sub
i = UserForm1.ComboBox1.ListIndex + 2
say = UserForm1.ComboBox2.ListIndex + 1
yer = 0
For j = 10 To Worksheets("data").Cells(i, 255).End(xlToLeft).Column
If Worksheets("data").Cells(i, j).Value = "Y�l / D�nem" Then
yer = yer + 1
End If
End If
Next j
UserForm1.ComboBox3.Text = UserForm1.ComboBox4.List(0)
UserForm1.ComboBox4.Text = UserForm1.ComboBox4.List(1)
UserForm1.ComboBox5.Text = UserForm1.ComboBox5.List(2)
UserForm1.ComboBox6.Text = UserForm1.ComboBox6.List(3)
End Sub
Application.CutCopyMode = False
UserForm1.Hide
ZBasla = TimeValue(Now)
Label1 = "Bas " & ZBasla
Cells(1, 6).Value = "Bas " & ZBasla
Dim URL As String
Dim HTML_Body As Object
Dim IE As Object
Dim deg1
URL = "http://www.isyatirim.com.tr/C_LT_financial.aspx"
If (InternetCheckConnection(URL & "/", &H1, 0&) = 0) Then MsgBox "internet
ba�lant�s� yok": Exit Sub
'
IE.document.all("btnSubmit").Click
'For t = 0 To IE.document.all("stockDropDownList").Length - 1
'If IE.document.all.stockDropDownList(t).Text = UserForm1.ComboBox1.Text Then
'IE.document.all("stockDropDownList").selectedIndex = t
'Exit For
'End If
'Next
'For n = 0 To IE.document.all("bilancoDropDownList").Length - 1
'If IE.document.all.bilancoDropDownList(n).Text = UserForm1.ComboBox2.Text Then
'IE.document.all("bilancoDropDownList").selectedIndex = n
'IE.document.all("bilancoDropDownList").OnChange
'Exit For
'End If
'Next
IE.document.all("donem4DropDownList").Focus
SendKeys ("{TAB}"), True
basla = Timer
bekle = 2
While Timer < basla + bekle
DoEvents
Wend
SendKeys "^{a}"
SendKeys "^{c}"
Windows(dosya_ad�).Activate
basla = Timer
bekle = 2
While Timer < basla + bekle
DoEvents
Wend
Range("A2").Select
ActiveSheet.Paste
Range("A1").Select
Set IE = Nothing
Set HTML_Body = Nothing
zBitis = TimeValue(Now)
Cells(1, 7).Value = "Bit " & zBitis
Cells.UnMerge
MsgBox ("Bitti ")
SendKeys "^{x}"
SendKeys "^{ESC}"
Application.CutCopyMode = False
End Sub
End Sub
End Sub
Dim say1(12)
say1(1) = "January"
say1(2) = "February"
say1(3) = "March"
say1(4) = "April"
say1(5) = "May"
say1(6) = "June"
say1(7) = "July"
say1(8) = "August"
say1(9) = "September"
say1(10) = "October"
say1(11) = "Nowember"
say1(12) = "December"
URL = "http://www.timeanddate.com/worldclock/fullscreen.html?n=19"
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate URL
.Visible = False
Do Until IE.ReadyState = 4: DoEvents: Loop
'Do While IE.Busy: DoEvents: Loop
Set html_tba = IE.document.GetElementsByTagName("Body")
adres = Replace(Replace(WorksheetFunction.Trim(html_tba(0).innertext), Chr(13),
""), Chr(10), " ")
For j = 1 To Len(adres)
i = InStr(j, adres, ",", vbTextCompare)
deg6 = Mid(adres, i + Len(","), Len(adres))
bolme = Split(deg6, " ")
Exit For
Next
For i = 1 To 12
If bolme(2) = say1(i) Then
bolme(2) = Format(i, "00")
Exit For
End If
Next
If IE.LocationURL = URL Then IE.Quit
MsgBox "Tarih :" & Format(bolme(1) & "." & bolme(2) & "." & bolme(3),
"dd.mmmm.yyyy") & Chr(10) & Chr(10) & _
"Saat :" & Format(bolme(4), "hh:nn:ss"), vbInformation, "UYARI!"
Label3 = Format(bolme(1) & "." & bolme(2) & "." & bolme(3), "dd.mmmm.yyyy") & "
Tarih " & Format(bolme(4), "hh:nn:ss") & " Saat "
End With
Set IE = Nothing
Set HTML_Body = Nothing
End Sub
Dim say1(12)
say1(1) = "January"
say1(2) = "February"
say1(3) = "March"
say1(4) = "April"
say1(5) = "May"
say1(6) = "June"
say1(7) = "July"
say1(8) = "August"
say1(9) = "September"
say1(10) = "October"
say1(11) = "Nowember"
say1(12) = "December"
URL = "http://www.timeanddate.com/worldclock/fullscreen.html?n=19"
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Navigate URL
.Visible = False
Do Until IE.ReadyState = 4: DoEvents: Loop
'Do While IE.Busy: DoEvents: Loop
Set html_tba = IE.document.GetElementsByTagName("Body")
adres = Replace(Replace(WorksheetFunction.Trim(html_tba(0).innertext), Chr(13),
""), Chr(10), " ")
For j = 1 To Len(adres)
i = InStr(j, adres, ",", vbTextCompare)
deg6 = Mid(adres, i + Len(","), Len(adres))
bolme = Split(deg6, " ")
Exit For
Next
For i = 1 To 12
If bolme(2) = say1(i) Then
bolme(2) = Format(i, "00")
Exit For
End If
Next
If IE.LocationURL = URL Then IE.Quit
MsgBox "Tarih :" & Format(bolme(1) & "." & bolme(2) & "." & bolme(3),
"dd.mmmm.yyyy") & Chr(10) & Chr(10) & _
"Saat :" & Format(bolme(4), "hh:nn:ss"), vbInformation, "UYARI!"
Label3 = Format(bolme(1) & "." & bolme(2) & "." & bolme(3), "dd.mmmm.yyyy") & "
Tarih " & Format(bolme(4), "hh:nn:ss") & " Saat "
End With
Set IE = Nothing
Set HTML_Body = Nothing
End Sub
------------------------------------------
'�nternet var m� yok mu?
Private Sub CommandButton8_Click()
If (InternetCheckConnection("http://www.tcmb.gov.tr/yeni/kurlar/kurlar_tr.php/",
&H1, 0&) = 0) Then
MsgBox "Ba�lant� Yok"
Else
MsgBox "Ba�lant� Var"
End If
End Sub
----------------------------------------
'T�m sayfay� temizle
Private Sub CommandButton7_Click()
End Sub
------------------------------------
'T�m IE leri kapat
Private Sub CommandButton5_Click()
Set uygulama = CreateObject("Shell.Application")
For Each nesne In uygulama.Windows
If TypeName(nesne.document) = "HTMLDocument" Then
nesne.Quit
End If
Next
End Sub
--------------------------------------------------------
'S� tu� bi�imlendir iste�euyarlanm�
@*. bu bicimlendirmemizin sonundaki �.� isareti tekrarlanmasini istedigimiz
isarettir bunu istediginiz gibi degistirebilirsiniz, ornegin @*_ seklinde
yaparsaniz �_� isareti tekrarlanicaktir, iyi calismalar..
------------------------------------------------------
'Excel den web login i�lemleri
Private Sub CommandButton1_Click()
On Error Resume Next
i = ComboBox1.ListIndex
Select Case i
Case 0
Call hotmail
Case 1
Call gmail
Case 2
Call facebook
Case 3
Call yahoo
Case 4
Call youtube
End Select
End Sub
Set ie = CreateObject("internetexplorer.application")
ie.navigate ("http://www.hotmail.com")
ie.Visible = True
Set ie = CreateObject("internetexplorer.application")
ie.navigate ("http://www.gmail.com")
ie.Visible = True
Set ie = CreateObject("internetexplorer.application")
ie.navigate ("http://www.facebook.com/")
ie.Visible = True
End Sub
Private Sub yahoo()
On Error Resume Next
Set ie = CreateObject("internetexplorer.application")
ie.navigate ("https://login.yahoo.com/config/login_verify2?.intl=tr&.src=ym")
ie.Visible = True
Set ie = CreateObject("internetexplorer.application")
ie.navigate ("https://www.google.com/accounts/ServiceLogin?
uilel=3&service=youtube&passive=true&continue=http%3A%2F%2Fwww.youtube.com%2Fsignin
%3Faction_handle_signin%3Dtrue%26nomobiletemp%3D1%26hl%3Den_US%26next%3D
%252Findex&hl=en_US<mpl=sso")
ie.Visible = True
---------------------------------------------
'Bo� sat�r silmek,
Sub Satir_tamamen_bos_ise_sil()
For i = 1 To sonsatir
i1 = i1 + 1 'Ka� sat�r i�leme girmi�
If i1 > sonsatir Then Exit For
Next i
End Sub
-------------------------------
***********************************************************************************
************************
'if and kullan�m�
Public Function ikili(sayi As Variant) As String
Dim hane As Integer
Do
If (sayi And 2 ^ hane) = 2 ^ hane Then
ikili = "1" + ikili
Else
ikili = "0" + ikili
End If
hane = hane + 1
Loop Until 2 ^ hane > sayi
End Function
Private Sub Command1_Click()
Dim veri As String
veri = InputBox("binary sistemine �evrilecek say�y� giriniz")
MsgBox (ikili(veri))
End Sub
�f kontrol� diyorki:. 29 AND 16=16 ise 1 yaz de�ilse 0 yaz... and opr hemen �u
i�lemi yap�yor...
29 kar��l��� 11101
16 kar��l��� 10000
--------------------- and operat�r�ne g�re a�a�� do�ru kar��la�t�rma yapal�m
sonu�-----10000
sonu� 10000 bitleri 16 n�n kar��l��� dolay�s�yla if kontrol� e�itli�i do�ru olmu�
oldu...
yani sonu� 16=16 oldu... �art do�rulu�u sa�land���ndan i�lem 1 olur....
===============================================
�f kontrol� diyorki:. 29 AND 2=2 ise 1 yaz de�ilse 0 yaz... yani 29 la 2 nin
bitlerini kar��la�t�r.. sonuca bak..��kan bitler 2 nin bitlerimi... and opr hemen
�u i�lemi yap�yor...
29 kar��l��� 11101
2 kar��l���_ 00010
---------------------and operat�r�ne g�re a�a�� do�ru kar��la�t�rma yapal�m
sonu�-----00000
sonu� 00000 ��kt�...bu bitler 2 nin kar��l��� de�il... s�f�r�n kar��l���...
dolay�s�yla if kontrol� e�itli�i yanl� olmu� oldu... ve else den sonraki i�lem
al�n�yor...ve sonu� 0 olur...
===============================================
�imdi if e bakal�m
11101 and 01000 =01000 yani 8=8 aranan e�itlik do�ru oldu�u i�in elseden �nceki
i�lem yap�l�yor ... ikili de�eri 1 olmu� oldu...
b�ylece s�rayla her katsay�, bizim veri�imiz say� ile k�yaslanm� olmakta...
bir �nceki konuda hesaplama bi�imi ile ilgili ifadeler sanki and �yle i�lem
yap�yomu� gibi bir durum olu�turmu�..
***********************************************************************************
************************
------------------------------------
'Gelen mailleri listeleme
Sub GetFromInbox()
Const olFolderInbox = 6
Dim olApp As Object, olNs As Object
Dim oRootFldr As Object
Dim lCalcMode As Long
x = Date
lRow = 2
lCalcMode = Application.Calculation
Application.Calculation = xlCalculationManual
'Application.ScreenUpdating = False
GetFromFolder oRootFldr
' Application.ScreenUpdating = True
Application.Calculation = lCalcMode
End Sub
Sub mail_yolla()
user = Environ("UserName")
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = ""
.Item.To = "MUSTAFA ASLAN;"
.Item.cc = ""
.Item.Subject = "HAFTALIK SHIFT"
.Item.Body = "AYLIK PUANTAJ"
.Item.attachments.Add "C:\Documents and Settings\" & user &
"\Desktop\shift.xlsx"
.Item.Send
End With
ActiveWorkbook.EnvelopeVisible = False
End Sub
-------------------------------
'Excel dosyay� 20 �erli gruplar halinde text olarak olu�turmak
Sub test_son()
f = Environ("userprofile") & "\Desktop\" & _
Replace(ThisWorkbook.Name, ".xls", "_text")
s = 1
For z = 1 To Sheets("sayfa2").[a65536].End(3).Row
End If
s = 1
For z = 1 To Sheets("sayfa2").[c65536].End(3).Row
End If
End Sub
-------------------------------
'dosyay� text olarak kaydetmek.
Sub test()
End Sub
-------------------------------
'bir kelime nin ka� sat�r da ge�ti�ini saymak
=E�ERSAY($A$1:$A$65536;"*deneme*")
-------------------------------
'google translate vba web sorgu
Sub Translate_Test()
MsgBox Translate("seni seviyorum", "tr", "sv")
End Sub
URL = "http://translate.google.com.tr"
Set IE = CreateObject("InternetExplorer.Application")
With IE
.navigate URL
.document.all("sl").Value = kaynak_dil
.document.all("tl").Value = hedef_dil
.document.all("text").Value = kaynak_metin
.document.forms(0).submit
res = .document.all("result_box").innertext
.Quit
End With
Set IE = Nothing
-------------------------------
'Bu form�ll� topla.�arp�m � a�a��da macro ile yazmak
'=TOPLA.�ARPIM(('aaa'!J$3:J$30000>=GRAF�K!$B$4)*('a aa'!J$3:J$30000<=GRAF�K!
$B$5)*('aaa'!E$3:E$30000=G RAF�K!A14)*('aaa'!I$3:I$30000))
Option Explicit
Sub tarih_aras�_kriterli_topla_61()
Dim ts, kaplan, trabzonspor, hamsi As Date
Dim bordo, mavi
Set bordo = Sheets("aaa")
Set mavi = Sheets("GRAF�K")
For ts = 14 To 24
For kaplan = 3 To bordo.Cells(Rows.Count, "A").End(xlUp).Row
If bordo.Cells(kaplan, "F") >= mavi.Range("B4") And _
bordo.Cells(kaplan, "F") <= mavi.Range("B5") And _
bordo.Cells(kaplan, "A") = mavi.Cells(ts, "A") Then
mavi.Cells(ts, "B") = bordo.Cells(kaplan, "E")
End If
If bordo.Cells(kaplan, "J") >= mavi.Range("B4") And _
bordo.Cells(kaplan, "J") <= mavi.Range("B5") And _
bordo.Cells(kaplan, "A") = mavi.Cells(ts, "A") Then
mavi.Cells(ts, "C") = bordo.Cells(kaplan, "K")
End If
Next
Next
End Sub
-------------------------------
'Linki g�r�nmeyen sayfalar i�in
'|Gecikme Zamm� ve Faizi","javascript:loadAJAXUsingPOST('dispatch2', 'contentivd',
'cmd=IVD_HSP_GECIKMEZAMMI')", "", "", "", "", "", "", "", "", "", ],
'"/index.jsp?page=" sabit eklendikten sonra, "cmd=IVD_HSP_GECIKMEZAMMI" deki =
sonras� linke eklenir.
URL = "https://intvd.gib.gov.tr/internetvd/index.jsp?page=IVD_HSP_GECIKMEZAMMI"
-------------------------------
'sayfa sonu ekleme
Sub SayfaSonuBelirle()
On Error Resume Next
For i = 1 To ActiveSheet.HPageBreaks.Count - 1
ActiveSheet.HPageBreaks(i).Delete
Next
For j = 2 To [a65536].End(3).Row
If Cells(j, "a") <> Cells(j + 1, "a") Then
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=Cells(j + 1, "a")
End If
Next
End Sub
----------------------------------
'alt toplam sayfa sonu ekleme
Sub InsertSubTotal()
Range("A1").Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(4, 6), _
Replace:=True, PageBreaks:=True, SummaryBelowData:=True
End Sub
---------------------------------
'Cari koddan Muhasebe kodu olu�tur.
="120-60-"&SOLDAN(C596;2)&"-"&PAR�AAL(C596;3;2)&"-"&SA�DAN(C596;9)
--------------------------------------
'web sorgu click
ie.Document.getElementById("submitButton").Click
-------------------------------------------------
'Toplam �arp�m farkl� kullan�mlar vba da
Verilen Dizilerde Kar��l�k Gelen Bile�enleri �arpar.
Kod:
Sub SumProduct1()
sRangeC = Range("c1:c2").Address
sRangeD = Range("d1:d2").Address
MsgBox WorksheetFunction.SumProduct(Range(sRangeC), Range(sRangeD))
'�al�ma Mant���
'C1*D1 =2
'C2*D2 =64
'Sonu�= 66
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
End Sub
Sub SumProduct2()
MsgBox [SumProduct((a1:a2="sevgi")*(b1:b2="veli")*(c1:c2))]
'�al�ma Mant���
'a1:a2 aral��� sevgi ismine e�it ise ve
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda kod i�inde de�i�ken tan�mlanam�yor.
End Sub
Sub SumProduct3()
MsgBox [SumProduct((a1:a3=f1)*(b1:b3=f2)*(c1:c3))]
'�al�ma Mant���
'a1:a2=f1 h�cresine e�it ise ve
'b1:b2=f2 h�cresine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda, h�cre referanslar� haricinde, kod i�inde de�i�ken
tan�mlanam�yor.
End Sub
Sub SumProduct4()
MsgBox Evaluate("=SumProduct((a1:a2=" & """sevgi""" & ")*(b1:b2=" & """veli"""
& ")*(c1:c2))")
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise ve
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda, kod i�inde sabitleri de�i�tirebiliyosunuz.
End Sub
Sub SumProduct5()
sRangeA = Range("a1:a2").Address
sRangeB = Range("b1:b2").Address
sRangeC = Range("c1:c2").Address
Criter1 = "sevgi"
Criter2 = "veli"
MsgBox Evaluate("=SumProduct((" & sRangeA & "=""" & Criter1 & """)*(" & sRangeB
& "=""" & Criter2 & """)*(" & sRangeC & "))")
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda, kod i�inde, Criter1 ve Criter2 de�i�kenlerine farkl� de�erler
verebilirsiniz.
End Sub
Sub SumProduct6()
MsgBox Evaluate("=SumProduct(--($a$1:$a$2 = """ & "sevgi" & """)*--($b$1:$b$2 =
""" & "veli" & """)*--($c$1:$c$2))")
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
End Sub
Sub SumProduct7()
[g3] = "=SUMPRODUCT((a1:a2=""sevgi"")*(b1:b2=""veli"")*(c1:c2))"
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
'G3 h�cresinde form�l olu�turuluyor.
End Sub
Sub SumProduct8()
[g3] = "=SUMPRODUCT((a1:a2=""sevgi"")*(b1:b2=""veli"")*(c1:c2))"
[g3] = [g3].Value
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
'G3 h�cresinde form�l�n de�eri olu�turuluyor.
End Sub
Sub SumProduct9()
[g3] = "=SUMPRODUCT((a1:a2=""sevgi"")*(b1:b2=""veli"")*(c1:c2))"
Application.Evaluate ("g3")
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
'G3 h�cresinde form�l olu�turuluyor.
End Sub
Sub SumProduct10()
Criter1 = "sevgi"
Criter2 = "veli"
[g3] = "=SUMPRODUCT((a1:a2=" & """" & Criter1 & """" & ")*(b1:b2=" & """" & Criter2
& """" & ")*(c1:c2))"
Application.Evaluate ("g3")
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
'G3 h�cresinde form�l olu�turuluyor.
End Sub
Sub SumProduct11()
[g3].FormulaR1C1 =
"=SUMPRODUCT((R1C1:R2C1=""sevgi"")*(R1C2:R2C2=""veli"")*(R1C3:R2C3))"
'�al�ma Mant���
'a1:a2=aral��� sevgi ismine e�it ise
'b1:b2=aral��� veli ismine e�it ise
'c1:c2=ko�ullara e�it olanlar�n c1:c2 aras�ndaki kar��l�klar�n� bul topla.
'Sonu�=8
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
'G3 h�cresinde form�l olu�turuluyor.
End Sub
Sub SumProduct12()
BuAy_Basi = Format(DateSerial(Year(Date), Month(Date), 1), "00000")
BuAy_Sonu = Format(DateSerial(Year(Date), Month(Date) + 1, 0), "00000")
MsgBox Evaluate("=SumProduct((a1:a10>=" & BuAy_Basi & " ) * (a1:a10<=" &
BuAy_Sonu & "))")
'�al�ma Mant���
'�ki tarih aras� tarihleri topla.
'Sonu�=4
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
End Sub
Sub SumProduct13()
sRangeA = Range("a1:a10").Address
sRangeB = Range("b1:b10").Address
sRangeC = Range("c1:c10").Address
Criter1 = Format("06/01/2010", "00000")
Criter2 = Format("08/02/2010", "00000")
MsgBox Evaluate("=SumProduct((" & sRangeA & ">=" & Criter1 & ")*(" & sRangeB &
"<=" & Criter2 & ")*(" & sRangeC & "))")
'�al�ma Mant���
'�ki tarih aras� tarihleri topla.
'Sonu�=12
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
End Sub
Sub SumProduct14()
sRangeA = Range("a1:a10").Address
sRangeB = Range("b1:b10").Address
sRangeC = Range("c1:c10").Address
Criter1 = Format(DateSerial(Year(Date), Month(Date), 1), "00000")
Criter2 = Format(DateSerial(Year(Date), Month(Date) + 1, 0), "00000")
MsgBox Evaluate("=SumProduct((" & sRangeA & ">=" & Criter1 & ")*(" & sRangeB &
"<=" & Criter2 & ")*(" & sRangeC & "))")
'�al�ma Mant���
'�ki tarih aras� tarihleri topla.
'Sonu�=4
'Bu kullan�mda ile kod i�inde de�i�ken tan�mlanabiliyor.
End Sub
--------------------------------
'son kelime yi almak
Sub sonbul()
For i = 1 To 400
hcr = (Cells(i, "A"), " ")
Cells(i, 2).Value = hcr(UBound(hcr))
Next i
End Sub
--------------------------
'isim vererek sayfa ekleme
Set NewSh = Sheets.Add(After:=Sheets(Sheets.Count))
NewSh.Name = "393 Mut"
--------------------------
'De�erleri TEXT olarak bi�imlendir.
Sub textyap()
For i = 2 To 8000
Cells(i, 2).Value = Cells(i, 2).Text
Next
End Sub
--------------------------
'SQL ilk 200 kayd� g�stermek
--------------------------
'Sadece say�alr kals�n
_____6.585,13_
__120,15
__12.255,19___
=--YER�NEKOY(A1;"_";"")
yada
=E�ER(EHATALIYSA(--YER�NEKOY(A1;"_";""));0;--YER�NEKOY(A1;"_";""))
--------------------------
'KTF kullan�c� tan�ml� fonksiyon
'harf say� ay�rma
bDigits de�erini FALSE yaparsan�z MET�N, TRUE yaparsan�z SAYI karakterlerini verir.
TRUE=DO�RU=1
FALSE=YANLI�=0
---------------------------
'Harf Say� ay�rmak
A1 de abcd12345
B1 de =YER�NEKOY(A1;C1;"")
C1 de =DE���T�R(A1;1;M�N(MBUL({0;1;2;3;4;5;6;7;8;9};A1&"0123456789"))-1;"")
---------------------------
'Say�ya �evir
=SAYIYA�EV�R(SA�DAN(A2;3)) bu �ekilde de�i�tirebilece�imiz gibi,
=--SA�DAN(A2;3)
Bu �ekildede yazabiliriz.
Buradaki -- simgesi
SifreUzunlugu = Len(sifre)
SonrakiSifre = sifre
End Function
Sub SifreBul()
Dim sifre As String
sifre = "000000"
satir = 1
sutun = 1
Do
satir = satir + 1
If satir = 65536 Then
satir = 1
sutun = sutun + 1
End If
Loop
End Sub
---------------------------
'Hata verirsen dahi devam et
On Error Resume Next
---------------------------
'Se�im say�s�, se�ilen ka� say�
sonsatir = Application.CountA(Selection)
----------------------------
'sayfalar� birle�tir.
Sub pctopla()
z = 1
For i = 3 To Sheets.Count
For i1 = 2 To 100
Sheets(i).Select
gec = Cells(i1, 1).Value
If gec = "" Then Exit For
gec = Trim(Str(i1)) & ":" & Trim(Str(i1))
Rows(gec).Select
Selection.Copy
Sheets("GENEL PC").Select
z = z + 1
gec = Trim(Str(z)) & ":" & Trim(Str(z))
Rows(gec).Select
ActiveSheet.Paste
Cells(z, 1).Value = z - 1
Next i1
Sheets(i).Select
Cells(2, 1).Select
Next i
End Sub
Sub yazicitopla()
z = 1
For i = 5 To Sheets.Count
For i2 = 2 To 100
Sheets(i).Select
gec = Cells(i2, 1).Value
If gec = "S.No" Then Exit For
Next i2
i2 = i2 + 1
For i1 = i2 To 100
Sheets(i).Select
gec = Cells(i1, 1).Value
If gec = "" Then Exit For
gec = Trim(Str(i1)) & ":" & Trim(Str(i1))
Rows(gec).Select
Selection.Copy
Sheets("GENEL YAZICI").Select
z = z + 1
gec = Trim(Str(z)) & ":" & Trim(Str(z))
Rows(gec).Select
ActiveSheet.Paste
Cells(z, 1).Value = z - 1
Next i1
Sheets(i).Select
Cells(2, 1).Select
Next i
End Sub
----------------------------
'farkl� kaydet
Sub farkli_kaydet()
Application.DisplayAlerts = False
yol = ActiveWorkbook.Path
ChDir yol
yol = yol + "\" + "Sonuc_" + ActiveWorkbook.Name
ActiveWorkbook.SaveAs Filename:=yol
Application.DisplayAlerts = True
End Sub
---------------------------
'program son a��lan yerden dosya se�sin.
yol = ActiveWorkbook.Path
ChDir (yol)
-----------------------
21.11.2010
'Toplam almak, eleman saymak,en b�y�k bulmak."
Sub yerlestir2()
Dim deg As Variant, varTemp As Variant
Range("e3:j65536").ClearContents
G�n = WorksheetFunction.CountA(Range("d3:d" & [d65536].End(3).Row))
Nobet = Val(WorksheetFunction.Sum(Range("c3:c" & [b65536].End(3).Row)))
Sat = 0
Say = 1
For x = 3 To [b65536].End(3).Row
If Cells(x, "c") > 0 Then
For y = 1 To Cells(x, "c")
Sat = Sat + 1
deg(Sat, Say) = Cells(x, "b")
If Sat = G�n Then Sat = 0: Say = Say + 1
Next
End If
Next
yenile:
satir = 3
For i = 1 To 6
Tpl = UBound(deg)
Do
Tekrar:
If Son > 3000 Then Son = 0: Range("e3:j65536").ClearContents: GoTo yenile: Exit For
sayi = Int(Rnd() * Tpl + 1)
varTemp = deg(Tpl, i)
deg(Tpl, i) = deg(sayi, i)
sorgu = deg(sayi, i)
deg(sayi, i) = varTemp
If deg(sayi, i) <> "" Then
Sy = ,(Range(Cells(satir, 5), Cells(satir, 10)), sorgu)
If Sy > 0 Then
For knt = 3 To Cells(65536, i + 4).End(3).Row
Srg1 = WorksheetFunction.CountIf(Range(Cells(knt, 5), Cells(knt, 10)), sorgu)
Srg2 = WorksheetFunction.CountIf(Range(Cells(satir, 5), Cells(satir, 10)),
Cells(knt, i + 4))
If Srg1 = 0 And Srg2 = 0 Then
Cells(satir, i + 4) = Cells(knt, i + 4)
Cells(knt, i + 4) = sorgu
GoTo tmm
End If
Next
Tpl = UBound(deg)
Range(Cells(3, i + 4), Cells(33, i + 4)).ClearContents
satir = 3
Son = Son + 1
GoTo Tekrar
End If
End If
Cells(satir, i + 4) = sorgu
tmm:
satir = satir + 1
Tpl = Tpl - 1
Loop While Tpl <> 0
satir = 3
Next
End Sub
----------------------
'21.11.2010
'Son kelime sil, adres ten il silme
Sub SonSozcukSil()
Dim hcr
Dim i As Long, j As Integer, son As Integer, Sozcuk As String
End Sub
----------------------
'21.11.2010
'par�ala, ay�r, b�l
Sub Rakam()
Dim i As Long
For i = 2 To Cells(Rows.Count, "A").End(3).Row
Cells(i, "B") = StrReverse(Split(StrReverse(Cells(i, "A")), "/")(0))
Next i
End Sub
----------------------
'21.11.2010
'Barkod kontrol check
=MOD(10-MOD(S16*3+S17;10);10)
Sub epostaayir()
On Error Resume Next
Set s1 = Sheets("soru")
Set s2 = Sheets("cevap")
For a = 2 To s1.[a65536].End(3).Row
deg = Split(s1.Cells(a, "a"), "@")
s2.Cells(a, "a") = deg(0)
s2.Cells(a, "b") = Split(deg(1), ".")(0)
s2.Cells(a, "c") = Split(deg(1), ".")(1)
s2.Cells(a, "d") = Split(deg(1), ".")(2)
Next
End Sub
!Farkl� y�ntem
B2 h�cresine;
=E�ER(A2="";"";SOLDAN(A2;MBUL("@";A2)-1))
C2 h�cresine;
=E�ER(A2="";"";SOLDAN(YER�NEKOY(A2;B2&"@";"");MBUL(".";YER�NEKOY(A2;B2&"@";""))-1))
D2 h�cresine;
=E�ER(A2="";"";SOLDAN(YER�NEKOY(A2;B2&"@"&C2&".";"");MBUL(".";YER�NEKOY(A2;B2&"@"&C
2&".";""))-1))
E2 h�cresine;
=E�ER(A2="";"";YER�NEKOY(A2;B2&"@"&C2&"."&D2&".";""))
----------------------
20.11.2010
'Sayfa1 deki farkl� olanlar� Sayfa2 de en alta ekle
Sub excelvba()
For i = 1 To Range("d65536").End(3).Row
If WorksheetFunction.CountIf(Sheets("data").Range("a1:a65536"), Cells(i, 4)) < 1
Then
Sheets("data").Range("a" & Sheets("data").Range("a65536").End(3).Row + 1).Value =
Cells(i, 4).Value
End If
Next i
End Sub
----------------------
11.11.2010
'SLEEP komutu, geciktirme, yava�lat
Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Sub SleepVBA()
Do Until i = 5
i = i + 1
Range("A1") = i
Sleep 1000
Loop
End Sub
----------------------
'iki nokta aras� alma
10.11.2010
Function noktaarasi_59(ByVal hcr As Range) As String
Dim deg
deg = Split(hcr.Value, ".")
If UBound(deg) >= 1 Then noktaarasi_59 = deg(1)
End Function
--------------------
30.10.2010
sonsatir=Cells(Rows.Count, "A").End(3).Row
Application.ScreenUpdating = False
--------------------
17.10.2010
'hucrede de�i�tikce i�lem yap
Private Sub Worksheet_Change(ByVal Target As Range) ' Bu ba�l�k kal�p halinde
kalmal�
---------------------------
'Sayfa sonu sonlar�n� iptal etmek
'Kodu farkjl� olanlar� ayr� sayfalarda ��karmak
Sub Makro1()
ActiveSheet.ResetAllPageBreaks
'Yaz�c� ayarlar�nda �st bo�luk ve alt bo�luk 1 cm olmal�
For i = 8 To 79
If Cells(i, "j") <> Cells(i - 3, "j") Then
Cells(i, "a").Select
ActiveWindow.SelectedSheets.HPageBreaks.Add Before:=ActiveCell
End If
Next
End Sub
----------------------------
'Birle�tir tarih ve say�lar
=B�RLE�T�R("(02)";B3;"(12)";METNE�EV�R(D3;"yyaagg");"(34)";F3)
-----------------------------
'30 saniye de bir web sitesi a�mak
Sub webac()
web = Array("www.excel.web.tr", "www.google.com.tr")
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
For a = 0 To UBound(web)
With IE
.Navigate web(a)
Do Until .ReadyState = 4: DoEvents: Loop
Do While .Busy: DoEvents: Loop
End With
If a < UBound(web) Then Application.Wait Now + TimeValue("00:00:30")
Next
Set IE = Nothing
End Sub
--------------------------------
'web sayas� a�mak
Const URL3 As String = "http://www.google.com.tr"
Sub WebPageOpen()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = False 'True olursa web sayfas� g�r�nt�lenir.
.Navigate URL3 'Web adresi a��l�yor.
Do Until .ReadyState = 4: DoEvents: Loop 'Y�kleme tamamlay�ncaya
Do While .Busy: DoEvents: Loop 'kadar bekleme
'.Quit 'Kapat
End With
Set IE = Nothing
End Sub
--------------------------------
'A4 h�cresine Ocak yazd���m zaman B4 h�cresine �ubat yazs�n
'Birinci listeye kar��l�k, ikin listeden se�im getirmek
B4 h�cresine;
=ARA(A4;
{"A�ustos";"Aral�k";"Ekim";"Eyl�l";"Haziran";"Kas�m";"Mart";"May�s";"Nisan";"Ocak";
"�ubat";"Temmuz"};
{"Eyl�l";"Ocak";"Kas�m";"Ekim";"Temmuz";"Aral�k";"Nisan";"Haziran";"May�s";"�ubat";
"Mart";"A�ustos"})
---------------------------------
'S�tun s�ralama
Sub excelcs�tun_s�rala()
Range("B3:E65536").Sort key1:=Range("C3"), ORDER1:=xlDescending 'Azalan
Range("B3:E65536").Sort key1:=Range("C3"), ORDER1:=xlAscending 'Artan
MsgBox "S�ralama Yap�lm�t�r.", , "�hsan Tank"
End Sub
--------------------------------
'Text dosyan�n sonundaki bo� sat�rlar� silmek
Sub Test()
Dim MyFile As String, MyTempFile As String
Dim FileNum1 As Long, FileNum2 As Long
MyFile = "C:\Test.txt"
MyTempFile = "C:\Temp.txt"
FileNum1 = FreeFile
Open MyFile For Input As #FileNum1
FileNum2 = FreeFile
Open MyTempFile For Output As #FileNum2
While Not EOF(FileNum1)
Line Input #FileNum1, TextData
If TextData = "" Then GoTo ResumeLoop:
Print #FileNum2, TextData
ResumeLoop:
Wend
Close #FileNum2
Close #FileNum1
Kill MyFile
Name MyTempFile As MyFile
End Sub
----------------------------------
'm�kerrer, benzer, benzersiz, tek, �ift kay�tlar� silmek ve bir tanesini b�rakmak.
Sub Test()
Dim NoBG As Long
Dim MyRng As Range
Dim MyCell As Range
NoBG = Range("BG65536").End(xlUp).Row
Set MyRng = Range("BG1:BG" & NoBG)
For Each MyCell In MyRng
If WorksheetFunction.CountIf(MyRng, MyCell) > 1 Then
Rows(MyCell.Row).Delete
End If
Next
End Sub
---------------------------------
'Renkli sat�rlar� silmek
Sub renklisatirsil1()
Dim hucre, a As Integer
For hucre = 300 To 1 Step -1
If Cells(hucre, 1).Interior.ColorIndex = 3 Or Cells(hucre, 1).Interior.ColorIndex =
41 Then
Cells(hucre, 1).EntireRow.Delete
End If
Next
End Sub
----------------------------------
'M�kerrer, benzersiz, �ift, tek, kay�tlar� silmek t�m sat�r da
Sub D��me1_T�klat()
For a = [c65536].End(3).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("c1:c" & a), Cells(a, "c")) > 1 Then
Rows(a).Delete
Next
End Sub
-------------------------------
'Alt alta olan sat�rlar tamamen ayn� ise, sil
Sub benzersiz()
Dim k As Byte, i As Long, j As Long
Dim z As Byte, hucredeg As String, dizideg As String
ReDim myarr(2 To 28, 1 To 1)
Application.ScreenUpdating = False
Set t = CreateObject("Scripting.Dictionary")
t.CompareMode = vbTextCompare
a = 1
For i = 2 To Cells(65536, "B").End(xlUp).Row
hucredeg = ""
For j = 2 To 28
hucredeg = hucredeg & Cells(i, j).Value
Next j
'---------------------------------
If Not t.exists(hucredeg) Then
t.Add hucredeg, Nothing
ReDim Preserve myarr(2 To 28, 1 To a)
For z = 2 To 28
myarr(z, a) = Cells(i, z).Value
Next z
a = a + 1
End If
Next i
Range("B2:AB" & Cells(65536, "B").End(xlUp).Row).ClearContents
[B2].Resize(UBound(myarr, 2), 27) = Application.Transpose(myarr)
Application.ScreenUpdating = True
MsgBox "�lem Tamam..!!"
End Sub
-----------------------------
'Form�l�n sonucu 0 ise, Sub Macro2()
For Each H�cre In Columns("A:A").SpecialCells(xlCellTypeFormulas, 1)
If H�cre.Value = 0 Then MsgBox "Merhaba " & H�cre.Address
Next H�cre
End Sub
-----------------------------
'�zel h�cre se�imleri
Sub Makro2()
[a1:a1000].SpecialCells(1).Select
'A��klamalar
End Sub
Sub Makro3()
[a1:a1000].SpecialCells(2).Select
'Sabitler
End Sub
Sub Makro4()
[a1:a1000].SpecialCells(3).Select
'Form�ller
End Sub
Sub Makro5()
[a1:a1000].SpecialCells(3, 1).Select
'Form�ller(say�lar)
End Sub
---------------------------
'caner ge�n t�m sat�rlar� silmek
Sub D��me1_T�klat()
s = Application.InputBox("Silinecek Veri Girin")
If s = "" Then Exit Sub
If s = cancel = True Then Exit Sub
Cells.Find(s).EntireRow.Delete
End Sub
--------------------------
'Bo� h�creleri sayfaya girerken gizle, ��karken g�ster
A�a��daki kodlar� Projenizin "�N�ZLEME" sayfas�na yap�t�r�n...
----------------------------
'M�kerrer, �ift, benzer
'kay�tlar� silip sadece bir tane kay�t b�rakmak
sub sil()
application.screenupdating=false
for a=[a65536].end(3).row to 1 step -1
if worksheetfunction.countif([a:a],cells(a,"a"))>1 then rows(a).delete
next
end sub
---------------------------
'Belirli kolonlar� silmek i�in
Range("B:B,D:D,F:CH").Delete
-------------------------
'Sat�r�n tamam� bo� ise sat�r� sil. ilk �� kolon bo� ise
Sub sil()
Application.ScreenUpdating = False
Dim i As Integer
t = ActiveSheet.UsedRange.Rows.Count
For i = t To 1 Step -1
If IsEmpty(Cells(i, 1)) And IsEmpty(Cells(i, 2)) And
IsEmpty(Cells(i, 3)) And IsEmpty(Cells(i, 4)) Then
Rows(i).Delete Shift:=xlUp
End If
Next i
Application.ScreenUpdating = True
End Sub
------------------------
'Her 5 sat�r� sil 6. kals�n.
Private Sub CommandButton1_Click()
son = [a65536].End(3).Row
For i = 1 To son
Rows(i & ":" & i + 4).Delete
Next
End Sub
----------------------
'M�kerrer, benzersiz, �ift kay�tlar� renklendirme
Sub Dene()
Sat = Cells(65536, "b").End(3).Row
Cells(Sat, "b").Interior.ColorIndex = 0
For i = 2 To [b65536].End(3).Row
If WorksheetFunction.CountIf(Range(Cells(2, "b"), Cells(Sat, "b")), Cells(i, "b"))
> 1 Then
Cells(i, "b").Interior.ColorIndex = 6
End If
Next i
Range("A2:E" & Sat).Sort Key1:=Range("B2")
End Sub
----------------------
'h�cre de�eri, negatif olan sat�rlar� sil. Each i�in �rnek
Sub Sil()
Dim hucre As Range
For Each hucre In Range("C2:C10000")
If hucre = "NEGAT�F" Then
hucre.Rows.Select
Selection.EntireRow.Delete
End If
Next hucre
End Sub
--------------------
'�nce silinecek sat�rlar� tespit et, sonra sil
Sub temizle()
Dim say As Byte, i As Long, satir As Collection
Set satir = New Collection
say = 1
Application.ScreenUpdating = False
For i = 50 To Cells(65536, "A").End(xlUp).Row
If say <= 12 Then satir.Add i
If say = 50 Then
say = 1
Else
say = say + 1
End If
Next i
Application.ScreenUpdating = True
For i = satir.Count To 1 Step -1
Rows(satir.Item(i)).Delete (xlUp)
Next
MsgBox "�lem tamam"
End Sub
--------------
'm�kerrer , benzersiz renklendir.
Sub mukerrerrenkle()
Dim sat As Integer
[a1:a10000].Interior.ColorIndex = xlNone
For sat = Cells(65536, "a").End(xlUp).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("a1:A" & sat), Cells(sat, "a")) > 1 Then
ilksat = WorksheetFunction.Match(Cells(sat, "a"), [a:a], 0)
Cells(sat, "a").Interior.ColorIndex = 6
Cells(ilksat, "a").Interior.ColorIndex = 6
End If
Next
End Sub
---------------
Benzersiz , m�kerrer i�lemi filtreleme y�ntemi ile yap�m�
* A s�tununu se�in
* F5
* �zel
* Bo�luklar
* Sa� Klik
* Sil (t�m sat�r)
* Tamam
veya
T�m bo� h�celeri silmek i�in alan� se�in.
Edit - Goto - Special... - Blanks
---------------------------
'G�n�n tarihinden k���k sat�rlar� sil
Sub ssil()
Dim sat As Long
For sat = Cells(65536, "b").End(xlUp).Row To 2 Step -1
If Cells(sat, "b") < Date Then
Range(Cells(sat, "b"), Cells(sat, "d")).Delete shift:=xlUp
End If
Next
End Sub
---------------------------------
'Ahmet ile ba�layan sat�rlar� sil
Sub ahmet()
Dim k As Range, sat As Long
sat = Cells(65536, "B").End(xlUp).Row
Set k = Range("B:B").Find("ahmet*", , xlValues, xlWhole)
If Not k Is Nothing Then
Rows(k.Row & ":" & sat).Delete
End If
MsgBox "Silme yap�ld�"
End Sub
-------------------------------------
'banka var m�, aranan de�er var m�?
Sheets("TAKAS �EKLER�").Select
Set BUL = Sheets("TAKAS �EKLER�").Range("B1:B65536").Find(banka)
If Not BUL Is Nothing Then bankavar = True
-----------------------------
'D�ey ara bul ba�ka kolondakini de�i�tir.
---------------------------------
'Se�ilen kolondaki bo� sat�rlar� sil
Sheets("ACY DATA GECICI").[A:A].SpecialCells(xlCellTypeBlanks).EntireRow.Delete
Range("A:A").SpecialCells(xlCellTypeBlanks).Entire Row.Delete
------------------------
'berlili bir alan� s�rala, kolona g�re, s�ralama
Range("a2:h" & sat).Sort Range("c2"), xlDescending
----------------------
'Bo� h�cre sil, hem bo� hem s�f�r
Sub Sil()
Dim i As Long
i = [K65536].End(3).Row
For i = i To 1 Step -1
If Cells(i, "K") = 0 Or Cells(i, "K") = "" Then Cells(i, "K").Delete
Shift:=xlUp
Next i
End Sub
--------------------------
'H�creye de�er girildi�i gibi kontrol, 0 ise kolon sil
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, [B:B]) Is Nothing Then Exit Sub
On Error GoTo son
If Target.Value <> "" And Target.Value = 0 Then Rows(Target.Row).Delete
son:
End Sub
--------------------------------
'Belirli bir h�cre aral���n� silip yukar� �ekmek
Range("J" & X & ":S" & X).Delete Shift:=xlUp
-------------------------------
'Belirli bir h�creyi silip yukar� �ekmek
Range("C" & X).Delete Shift:=xlUp
-------------------------------
'benzer, m�kerrer kay�tlar�n tamam�n� siler.
Sub BENZER_KAYITLARI_S�L()
For X = 1 To [A65536].End(3).Row
SAY = WorksheetFunction.CountIf([A:A], Cells(X, 1))
If SAY > 1 Then
Columns(1).Replace What:=Cells(X, 1), Replacement:=""
End If
Next
Columns(1).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
MsgBox "��LEM�N�Z TAMAMLANMI�TIR.", vbInformation
End Sub
-------------------------------
'M�kerrer, benzer kay�tlar� teke indirme,s�ral� olmasa da olur
'Birden fazla kolona g�re kontrol
Sub M�KERRER_KAYITLARI_S�L()
[IV:IV].ClearContents
[IV1] = "=A1 & B1 & C1 & D1 & E1 & F1 & G1"
[IV1].AutoFill Destination:=Range("IV1:IV" & [A65536].End(3).Row),
Type:=xlFillDefault
[IV:IV].Value = [IV:IV].Value
For X = [IV65536].End(3).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("IV1:IV" & X), Cells(X, "IV")) > 1 Then
Rows(X).Delete
Next
[IV:IV].ClearContents
MsgBox "M�KERRER KAYITLAR S�L�NM��T�R.", vbInformation
End Sub
--------------------------------
'M�kerrer, benzer kay�tlar� teke indirme,s�ral� olmasa da olur
Sub M�KERRER_KAYITLARI_S�L()
For X = [A65536].End(3).Row To 1 Step -1
If WorksheetFunction.CountIf(Range("A1:A" & X), Cells(X, "A")) > 1 Then
Rows(X).Delete
Next
MsgBox "M�KERRER KAYITLAR S�L�NM��T�R.", vbInformation
End Sub
---------------------------------
'Benzer, m�kerrer kay�rlar� silme,
Sub BenzerSil()
Range("A2:G100").sort key1:=[A2]
For i = [A65536].End(3).Row To 2 Step -1
If Cells(i, "A") = Cells(i - 1, "A") Then Rows(i).Delete
Next i
End Sub
------------------------------
'Kapal� dosyadan veri okumak
Sub verial()
Set s1 = Sheets("cevaplar")
For Each Dosya In
CreateObject("Scripting.FileSystemObject").GetFolder("C:\ABK�").Files
For b = 2 To 502
c = c + 1
For a = 5 To 175
s1.Cells(c + 4, a) = ExecuteExcel4Macro("'C:\ABK�\[" & Dosya.Name & "]cevaplar'!R"
& b & "C" & a)
Next
10 Next
Next
End Sub
------------------------------
B�y�kten k����e s�ralamak i�in:
Kod:
-----------------------------------------------------------------
'�zet rapor olu�turma, farkl� sayfalarda, farkl� tarihlerde, farkl� de�i�kenlerde
Option Explicit
Sub �ZET_RAPOR()
Dim SAYFA As Worksheet, X As Byte, Y As Byte
Dim BUL As Range, ADRES As String
Application.ScreenUpdating = False
For X = 2 To 13
For Each SAYFA In ThisWorkbook.Worksheets
If SAYFA.Name <> "AYLARA G�RE �CMAL" Then
For Y = 3 To 15
If Cells(1, Y) <> "" Then
Set BUL = SAYFA.Range("A6:A65536").Find(Cells(1, Y))
If Not BUL Is Nothing Then
ADRES = BUL.Address
Do
If BUL.Offset(0, 1) = Cells(X, "A") Then
Cells(X, Y) = Cells(X, Y) + BUL.Offset(0, 8)
End If
Application.ScreenUpdating = True
------------------------------
'Sayfalarda topla
H�crede kullan�m �ekli;
Kod:
=SAYFALARDA_TOPLA(�lk_Sayfa_Ad�;Toplanacak_H�cre_Aral���)
�rnek;
Kod:
=SAYFALARDA_TOPLA("Sayfa1";A1:A100)
Option Explicit
Application.Volatile True
For X = 1 To Sheets.Count
If Sheets(X).Name = �LK_SAYFA Then
For Y = X To Sheets.Count
SAYFALARDA_TOPLA = SAYFALARDA_TOPLA +
WorksheetFunction.Sum(Sheets(Y).Range(ARALIK.Address))
Next
End If
Next
End Function
--------------------------
'�lk iki nokta aras�ndakini almak
AE.ET�KET.001.01
=PAR�AAL(PAR�AAL(A1;MBUL(".";A1)+1;100);1;MBUL(".";PAR�AAL(A1;MBUL(".";A1)+1;100))-
1)
-----------------------
'D�eyara
Private Sub Worksheet_Change(ByVal Target As Range)
Dim mcet As Worksheet
Dim mkys As Worksheet
Dim i As Long
Dim sat As Long
Son = mcet.Range("AM65536").End(3).Row
sat = 6
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
mkys.Range("A7:J65536").ClearContents
mkys.Range("F1:F3").ClearContents
For i = 2 To Son
'mkys.Cells(sat, "A") =
mkys.Cells(sat, "B") = mcet.Cells(i, "A")
mkys.Cells(sat, "C") = mcet.Cells(i, "B")
mkys.Cells(sat, "D") = mcet.Cells(i, "C")
mkys.Cells(sat, "E") = mcet.Cells(i, "D")
mkys.Cells(sat, "F") = mcet.Cells(i, "AK")
mkys.Cells(sat, "G") = mcet.Cells(i, "AM")
End If
Next
mkys.Cells(1, "F") = WorksheetFunction.SumProduct(mkys.Range("D7:D65536"),
mkys.Range("F7:F65536"))
mkys.Cells(2, "F") = sat - 6
mkys.Cells(3, "F") = WorksheetFunction.SumProduct(mkys.Range("D7:D65536"),
mkys.Range("J7:J65536"))
Application.Calculation = xlCalculationManual
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
MsgBox "Sayfa G�ncellenmi�tir." & vbLf & sat - 6 & " Adet Sonu� Bulunmu�tur.",
vbInformation
End Sub
-----------------------
'D�eyara makrolu
Form�l ile,
=E�ER(B7="";0;D��EYARA(B7;'Mukayese Cetveli'!A4:'Mukayese Cetveli'!AW201;2;0))
Makro ile,
Range("A2") = IIf(Range("B7") = "", 0, WorksheetFunction.VLookup(Range("B7"),
Sheets("Mukayese Cetveli").Range("A:AW"), 2, 0))
Sub dusey_ara()
Next
End Sub
--------------------------------
'Veri giri�inde belirli h�crelere atlama
Option Explicit
Sub H�CRE_SE�()
Dim Adres As String
------------------------------------------
6 farkl� d�eyara y�ntemi
=DOLAYLI(E3)
=TOPLA(E�ER(B4:B7=$E$3;C4:C7))
=VAL(B3:C7;C3;E2:E3)
=D��EYARA(E3;B4:C7;2;YANLI�)
=�ND�S(C4:C7;KA�INCI(E3;B4:B7;YANLI�))
=ETOPLA(B4:B7;E3;C4:C7)
------------------------------------------
=etopla(a1:a10;">0") s�f�rdan b�y�kler i�in.
Dim i As Long
Dim j As Integer
Dim d() As String
Dim s1 As Worksheet
Set s1 = Sheets("Sayfa1")
s1.Select
Application.ScreenUpdating = False
For i = 2 To [B65536].End(3).Row
d = Split(Application.WorksheetFunction.Trim(Cells(i, "F")), " ")
For j = 0 To UBound(d)
If d(j) Like "05*" Or d(j) Like "5*" Then
If Len(Cells(i, "K")) = 0 Then
Cells(i, "K") = d(j)
Else
Cells(i, "K") = Cells(i, "K") & " - " & d(j)
End If
End If
Next j
Next i
Application.ScreenUpdating = True
End Sub
-----------
�ki kriterinde ayn� olanlar�nda sadece tek de�er ver.
=�ND�S($C$1:$C$1000;TOPLA.�ARPIM(KA�INCI(F1&"#"&G1;$A$1:$A$1000&"#"&$B$1:$B$1000;0)
))
-----------------
"�STANBULDA" OTURANLAR VE "ERKEK" OLANLAR VE ADI "AL�" OLANLARIN SAYISI
=TOPLA.�ARPIM((A1:A10="�STANBUL")*(B1:B10="ERKEK")*(C1:C10="AL�"))
-----------------
Ben h�crelerden birine girdi�im tarihten itibaren 7 g�nl�k girilen verileri
toplam�n� elde etmek istiyorum.��yleki
A kolonunda tarihler B kolonunda rakamlar var, diyelimki C1'e 05/10/2006 tarihini
girdi�imde bu tarih dahil 7 g�nl�k
toplam� elde etmek istiyorum.Hatta biraz daha zor lacak belki ama her ay�n sayfas�
farkl� 12 ay i�in 12 sayfa mevcut
bu durumda 30 �eken bir ayda benim girece�im tarih 25 i ise 7 g�n toplayaca�� i�in
bir sonraki ay�n 2 si olacak fakat
her ay�n sayfas�da farkl� oldu�u i�in sadece 5 g�nl�k bir toplam� vericek bu
durumda di�er sayfadanda o 2 g�n� veya ka�
g�n fark varsa ald�rabilirsek daha etkili olacakt�r
=TOPLA.�ARPIM((A2:A32>=C1)*(A2:A32<C1+7)*(B2:B32))
veya
=TOPLA.�ARPIM((SATIR(A1:A20)>=KA�INCI(ARA(C1;A1:A20;A1:A20);A1:A20;0))*(B1:B20))-
(TOPLA.�ARPIM(((SATIR(A1:A20)>=KA�INCI(ARA(C1;A1:A20;A1:A20);A1:A20;0)+7))*(B1:B20)
))
-----------------
iki tarih aras�nda belirledi�im gidere ait ne kadar harcama yapm��m, hesaplatmak
istiyorum.
Tarih verileriniz A1:A1000 aral���nda (gg.aa.yyyy format�nda)
Gider �e�itleriniz B1:B1000 aral���nda (K�rtasiye, Maa�, Elektrik, Su vs.)
Giderlerin tutarlar� C1:C1000 aral���nda (YTL format�nda)
=TOPLA.�ARPIM((A$1:A$1000>TAR�HSAYISI(METNE�EV�R(G$1;"gg.aaa.yyyy"))-
1)*(B$1:B$1000=E1)*(C$1:C$1000))-
TOPLA.�ARPIM((A$1:A$1000>TAR�HSAYISI(METNE�EV�R(G$2;"gg.aa.yyyy")))*(B$1:B$1000=E1)
*(C$1:C$1000))
---------------
40-45 ya� aras�nda erkek ve opel marka arabas� olanlar�n say�s�
=TOPLA.�ARPIM(($A$2:$A$30>=40)*($A$2:$A$30<=45)*($B$2:$B$30="erkek")*($C$2:$C$30="o
pel"))
--------------------
1970 ve 1 olanlar� say
=TOPLA.�ARPIM((A1:A10=1970)*(B1:B10=1))
veya
=TOPLA.�ARPIM(E�ER(A1:A100=1970;1;0);E�ER(B1:B100= 1;0;1))
=DOLAYLI("C"&TOPLA.�ARPIM(($A$2:$A$6<=G2)*($B$2:$B$6>=G2)*(SATIR($C$2:$C$6))))
Form�l�n a��klamas�:
TOPLA.�ARPIM (SUMPRODUCT) �ok kriterli aramalarda b�y�k avantaj sa�layan bir dizi
fonksiyonudur. Her parantez i�i bir kriteri belirlerken son parantez i�i bulunacak
verinin bulundu�u aral��� temsil eder.
Her iki kritere uyan sat�rdaki veride (SATIR($C$2:$C$6))) parantezi ile bulunur.
Peki SATIR fonksiyonu burada neden kullan�lm�t�r. Bunuda a��klamaya �al�ay�m.
-----------------------------------
'Ko�ullu en b�y�k de�eri bulmak
=MAK(E�ER($A$1:$A10=D7;$B$1:$B$10))
-------------------------------------
Soru 1: M�terimiz Ay�e bize nekadar �r�n sipari�i vermi�tir?
Soru 4: Adlar� "han" ile biten m�terilerimiz yani G�rhan ile Ayhan bize nekadar
�r�n sipari�i vermi�tir?
Soru 4: Adlar�nda "�r" harfleri ge�en m�terilerimiz yani G�rhan ile M�rsel bize
nekadar �r�n sipari�i vermi�tir?
-------------------------------------
Sub dogum_gunu_kontrolu()
For i = 2 To 1000
gec = Cells(i, 5).Value
If gec = "" Then Exit For
Next i
End Sub
------------------------------
Sub Satir_tamamen_bos_ise_sil()
For i = 1 To sonsatir
i1 = i1 + 1 'Ka� sat�r i�leme girmi�
If i1 > sonsatir Then Exit For
Next i
End Sub
----------------------
'Son satir tespit ediliyor
Dim LastRow As Long
With ActiveSheet.UsedRange
sonsatir = .Rows(.Rows.Count).Row
End With
----------------------
'BT09_GB09_Dosyalarini_Ac
Sub BT09_GB09_Dosyalarini_Ac()
With Application.FileSearch
.NewSearch
.LookIn = "M:\zeki\09BT"
.Filename = "*.xls"
.SearchSubFolders = True
.MatchTextExactly = True
.Execute
Set ds = CreateObject("Scripting.FileSystemObject")
End With
With Application.FileSearch
.NewSearch
.LookIn = "M:\zeki\10BT"
.Filename = "*.xls"
.SearchSubFolders = True
.MatchTextExactly = True
.Execute
Set ds = CreateObject("Scripting.FileSystemObject")
End With
End Sub
-------------------
'alan se�mek
Range(Cells(5, i), Cells(sonsatir, i)).Select
------------------
Liste i�inden se�mek i�in
Veri Do�rulama dan liste ekle :)
-----------------------
=hasformula(J3)=TRUE
Function HasFormula(cell)
HasFormula = cell.HasFormula
End Function
Sub Kayit()
SAY = Excel.Application.Windows.Count
If SAY > 0 Then
For X = 1 To SAY
Workbooks(X).Save
Next
End If
End Sub
Sub sifreleri_kaldir()
For i = 1 To Sheets.Count
Sheets(i).Select
ActiveSheet.Unprotect "Nad1969"
Next i
End Sub
Sub sifreleri_ekle()
For i = 1 To Sheets.Count
Sheets(i).Select
ActiveSheet.Protect "Nad1969"
Next i
End Sub
Dim i As Integer
Sub is09_fark_duzenle()
sor = MsgBox("� Avans dosyalar� yeni hafta makrosu �al�t�r�ls�n m�?", vbYesNo)
If sor = vbNo Then Exit Sub
With Application.FileSearch
.NewSearch
.LookIn = "M:\zeki\09 ��\"
.Filename = "*.xls"
.SearchSubFolders = True
.MatchTextExactly = True
.Execute
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
dosyaadi = .FoundFiles(i)
If dosyaadi = "M:\Zeki\09 ��\� Av �zet.xls" Then
GoTo son
End If
Sheets(Array("� Av", "Maa� Av", "Pers Borcu", "Ort Cari", "Deposito", "Say
Tes", "Teminat", _
"128 ��pheli", "120 ��pheli", "Pers ��pheli", "Avukat � Av")).Select
Sheets("� Av").Activate
Range("F3:F1000").Select
Selection.Copy
Range("D3").Select
Range("H3:H1000").Select
Application.CutCopyMode = False
Selection.ClearContents
Sheets("�zet").Select
Range("A1").Select
'ActiveWorkbook.Save
'ActiveWindow.Close
son:
Next i
End If
End With
End Sub
Sheets("Avukat � Av").Select
Sheets.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Pers ��pheli"
With ActiveWindow
.DisplayGridlines = False
.DisplayZeros = False
End With
Sheets("Say Tes").Select
Application.DisplayAlerts = False
Cells.Select
Selection.Copy
Sheets("Pers ��pheli").Select
Cells.Select
ActiveSheet.Paste
Range("C3:F52").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("H3:H52").Select
Selection.ClearContents
Range("H3").Select
Sheets("�zet").Select
Rows("17:17").Select
Selection.Insert Shift:=xlDown
Rows("16:16").Select
Selection.Copy
Rows("17:17").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Rows("17:17").Select
Selection.Replace What:="120 ��pheli", Replacement:="Pers ��pheli", LookAt _
:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="$Q$", Replacement:="$R$", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Rows("10:10").Select
Selection.Delete Shift:=xlUp
Rows("20:20").Select
Selection.Delete Shift:=xlUp
Range("A19").Select
Application.DisplayAlerts = True
End Sub
'------------------
Sub MUT_Sayfa_Duzenle()
Sheets("Firma Mut").Select
Set NewSh = Sheets.Add(After:=Sheets(Sheets.Count))
NewSh.Name = "393 Mut"
Sheets("393 Mut").Select
ActiveWorkbook.Sheets("393 Mut").Tab.ColorIndex = 6
ActiveWindow.TabRatio = 0.8
Range("M30").Select
With ActiveWindow
.DisplayGridlines = False
.DisplayZeros = False
End With
Application.DisplayAlerts = False
Sheets("Say Tes").Select
Cells.Select
Selection.Copy
Sheets("393 Mut").Select
Cells.Select
ActiveSheet.Paste
Range("C3:C52").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("H3:H52").Select
Selection.ClearContents
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("�zet").Select
Rows("24:24").Select
Selection.Insert Shift:=xlDown
Rows("23:23").Select
Selection.Copy
Rows("24:24").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Replace What:="Firma Mut", Replacement:="393 Mut", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="$U$", Replacement:="$V$", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
ActiveWindow.SmallScroll Down:=3
Rows("25:25").Select
Selection.Replace What:="23", Replacement:="24", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.DisplayAlerts = True
End Sub
'Sigorta ekle
Sub sigorta_sayfasi_ekle()
Sheets("Teminat").Select
Sheets.Add
Sheets("Sheet1").Select
Sheets("Sheet1").Name = "Sigorta"
With ActiveWindow
.DisplayGridlines = False
.DisplayZeros = False
End With
Sheets("Say Tes").Select
Application.DisplayAlerts = False
Cells.Select
Selection.Copy
Sheets("Sigorta").Select
Cells.Select
ActiveSheet.Paste
With ActiveWindow
.DisplayGridlines = False
.DisplayZeros = False
End With
Range("C3:F52").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("H3:H52").Select
Selection.ClearContents
Range("H3").Select
Sheets("�zet").Select
Rows("9:9").Select
Selection.Insert Shift:=xlDown
Rows("8:8").Select
Selection.Copy
Rows("9:9").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Rows("9:9").Select
Selection.Replace What:="Say Tes", Replacement:="Sigorta", LookAt _
:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Selection.Replace What:="$N$", Replacement:="$O$", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Rows("10:10").Select
Selection.Replace What:="8", Replacement:="9", LookAt _
:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Application.DisplayAlerts = True
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
'YB09 D D�zenle
Sub YB09_D_Duzenle()
gecicidosya = ActiveWorkbook.Name
Sheets("M").Select
Set NewSh = Sheets.Add(Before:=Sheets("M"))
NewSh.Name = "D"
Range("C28").Select
Sheets("D").Select
With ActiveWindow
.DisplayGridlines = False
.DisplayZeros = False
End With
Sheets("D").Select
ActiveWorkbook.Sheets("D").Tab.ColorIndex = 44
Windows("YB09 KON.xls").Activate
Sheets("D").Select
Cells.Select
Selection.Copy
Windows(gecicidosya).Activate
Cells.Select
ActiveSheet.Paste
Range("B15").Select
Application.DisplayAlerts = False
Sheets(Array("D", "M", "GT", "G", "DG�", "DGE", "600", "610", "611", "621",
"602", "Z", _
"DB", "PB", "PP", "T", "TB", "TP", "SP", "Ko")).Select
Sheets("D").Activate
Cells.Replace What:="'[YB09 KON.xls]D'!", Replacement:="D!", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets(Array("D", "M", "GT", "G", "DG�", "DGE", "600", "610", "611", "621",
"602", "Z", _
"DB", "PB", "PP", "T", "TB", "TP", "SP", "Ko")).Select
Sheets("D").Activate
Cells.Replace What:="Zeki\09DG", Replacement:="Zeki\09BT\09DG", LookAt:=xlPart,
_
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Sheets("D").Select
Application.DisplayAlerts = True
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
-------------------------------------
'dizindeki t�m dosyalarda i�lem yap
Dim i As Integer
Sub is09_fark_duzenle()
With Application.FileSearch
.NewSearch
.LookIn = "D:\muhasebe\zeki\09 ��\"
.Filename = "*.xls"
.SearchSubFolders = True
.MatchTextExactly = True
.Execute
If .Execute() > 0 Then
For i = 1 To .FoundFiles.Count
dosyaadi = .FoundFiles(i)
If dosyaadi = "D:\muhasebe\zeki\09 ��\� Av �zet.xls" Then
GoTo son
End If
Sheets(Array("� Av", "Maa� Av", "Ort Cari", "Deposito", "Say Tes", "Teminat", _
"128 ��pheli", "120 ��pheli", "Avukat � Av")).Select
Sheets("� Av").Activate
Range("G3:G1000").Select
Selection.Copy
Range("D3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H3:H1000").Select
Application.CutCopyMode = False
Selection.ClearContents
Sheets("�zet").Select
Range("A1").Select
ActiveWorkbook.Save
ActiveWindow.Close
son:
Next i
End If
End With
End Sub
---------------------------------
sub sifreleri_kaldir
For i = 1 To Sheets.Count
ActiveSheet.Unprotect "sifreniz"
next i
endsub
--------------------------------
'� lar� I, i leri � yapmak
Private Sub CommandButton1_Click()
[b1] = UCase(Replace(Replace([a1], "i", "�"), "�", "I"))
End Sub
--------------------------------
'Sa�dan bo�lu�a g�re par�ala
Sub ilceayikla()
For i = 2 To 2900
gec = Cells(i, 5).Value
For j = Len(gec) To 1 Step -1
If Mid(gec, j, 1) = " " Then Exit For
Next j
Cells(i, 6).Value = Mid(gec, j, Len(gec))
Next i
End Sub
--------------------------------------
'Sayfa birle�tir.
Sub Birlestir()
Application.ScreenUpdating = False
Cells.ClearContents
For i = 2 To Sheets.Count
Satir = [A65536].End(3).Row + 1
SonSat = Sheets(i).[A65536].End(3).Row
Sheets(i).[C5] = Sheets(i).[G2]
Sheets(i).Range("A5:C" & SonSat).Copy Range("A" & Satir)
Next i
MsgBox "Aktar�m Tamamlanm�t�r..."
End Sub
---------------------------------------------
'D�ey aran�n solunda kalanlar�n� bulmak i�in
=�ND�S(A2:A3;KA�INCI(E2;C2:C3;);1)
=�ND�S(B2:B3;KA�INCI(E2;C2:C3;);1)
Sub and_()'VE
If Range("a1") = "ali" And Range("b1") = "ali" And Range("c1") = "ali" Then
MsgBox "�� h�credeki veride ko�ula uymaktad�r."
Else
MsgBox "h�crelerdeki verilerden bir veya ikisi istenilen ko�ula uymamaktad�r"
End If
End Sub
Sub or_()'VEYA
If Range("a1") = "veli" Or Range("b1") = "selo" Or Range("c1") = "ahmet" Then
MsgBox "�� h�creden en az biri istenen ko�ula uymaktad�r."
Else
MsgBox "�� ko�uldan hi� birisi istenen ko�ula uymamaktad�r."
End If
End Sub
Sub if_()'E�ER
If Range("a1") = "Pazartesi" Then
MsgBox "haftan�n birinci g�n�"
End If
If Range("a1") = "Sal�" Then
MsgBox "haftan�n ikinci g�n�"
End If
If Range("a1") = "�ar�amba" Then
MsgBox "haftan�n ���nc� g�n�"
End If
If Range("a1") <> "Pazartesi" And Range("a1") <> "Sal�" And Range("a1") <>
"�ar�amba" Then
MsgBox "se�ilen g�n i�lemede de�il"
End If
End Sub
Sub selectcase_()
Select Case Range("a1")
Case "1"
MsgBox "sonu�1"
Case "2"
MsgBox "sonu�2"
Case "3"
MsgBox "sonu� 3"
Case Else
MsgBox "istenen sonu� al�namad�"
End Select
End Sub
-----------------------------------------------------------------------------------
------------------
Sub left_()'SOL
Range("b1") = Left(Range("a1"), 6)
MsgBox "al�nan de�er " & Range("b1")
End Sub
-----------------------------------------------------------------------------------
------------------
Sub right_()'SA�
Range("b2") = Right(Range("a2"), 5)
MsgBox "al�nan de�er " & Range("b2")
End Sub
-----------------------------------------------------------------------------------
------------------
Sub lcase_()'K���K HARF
abir = LCase(Replace(Replace(Range("a1"), "I", "�"), "�", "i"))
Range("b1") = abir
End Sub
-----------------------------------------------------------------------------------
------------------
Sub ucase_()'B�Y�K HARF
abir = UCase(Replace(Replace(Range("a1"), "i", "�"), "�", "I"))
Range("b2") = abir
End Sub
-----------------------------------------------------------------------------------
------------------
Sub mid_()'PAR�A AL
Range("b1") = Mid(Range("a1"), 4, 7)
End Sub
-----------------------------------------------------------------------------------
------------------
Sub val_()'SAYISAL DE�ER
Range("b1") = Val(Range("a1"))
End Sub
-----------------------------------------------------------------------------------
------------------
Sub countA_()'DOLU SAY
Range("b1") = WorksheetFunction.CountA(Range("a1:a5"))
End Sub
-----------------------------------------------------------------------------------
------------------
Sub countblank_()'BO�LUK SAY
Range("b1") = WorksheetFunction.CountBlank(Range("a1:a5"))
End Sub
-----------------------------------------------------------------------------------
------------------
Sub countif_()'E�ER SAY
Range("b1") = WorksheetFunction.CountIf(Range("a1:a5"), "1")
End Sub
-----------------------------------------------------------------------------------
------------------
Sub vlookup_()'D��EY ARA
On Error GoTo hata
For sut = 1 To 3
Range("d" & sut) = WorksheetFunction.vlookup(Range("c" & sut), Range("a:b"), 2, 0)
Next
Exit Sub
hata:
MsgBox "c s�tununda verisiz h�creyi doldurmal�s�n�z."
End Sub
-----------------------------------------------------------------------------------
------------------
Sub max_()'B�Y�K
Range("c1") = WorksheetFunction.max(Range("a1:a10"))
End Sub
Sub min_()'K���K
Range("c2") = WorksheetFunction.Min(Range("a1:a10"))
End Sub
Sub sum_()'TOPLA
Range("b1") = WorksheetFunction.sum(Range("a1:a5"))
End Sub
Sub find_()'BUL
Range("a1:a10").find("haziran").Select
End Sub
Sub find1_()'BUL
On Error GoTo hata
deg = InputBox("aranacak de�eri giriniz.")
Range("a1:a10").find(deg).Select
Exit Sub
hata:
MsgBox "aran�lan de�er bulunamad�."
End Sub
Sub product_()'�ARP
Range("b1") = WorksheetFunction.Product(Range("a1:a2"))
End Sub
-----------------------------------------------------------------------------------
------------------
Sub sirala_a_z()'SIRALA
Range("a:b").Sort key1:=Range("a1"), order1:=xlAscending
End Sub
-----------------------------------------------------------------------------------
------------------
Sub sirala_z_a()'SIRALA
Range("a:b").Sort key1:=Range("a1"), order1:=xlDescending
End Sub
-----------------------------------------------------------------------------------
------------------
'topla.�arp�m kullan�m�
Sub topla_�arp�m()
Range("d1") = Evaluate("=SumProduct(--(a1:a10=a1),--(b1:b10=b1),--(c1:c10))")
End Sub
-----------------------------------------------------------------------------------
------------------
Split VE UBound
Sub AYIR()
For SUT = 1 To [A65536].End(3).Row
A = Split(Range("A" & SUT), "-")
Range("B" & SUT) = A(UBound(A))
Next
End Sub
Split verdi�imiz ayra� ile bir dizedeki de�erleri b�lerek stringlere atamam�z�
sa�lar
UBound dizideki i�erisindeki eleman say�s�n� verir,
-----------------------------------------------------------------------------------
------------------
--------------------------------------
'case kullan�m�
Sub selectcase_()
Select Case Range("a1")
Case "1"
MsgBox "sonu�1"
Case "2"
MsgBox "sonu�2"
Case "3"
MsgBox "sonu� 3"
Case Else
MsgBox "istenen sonu� al�namad�"
End Select
End Sub
-------------------------------------------------
'userformdan bask� �n izlemeyi a�ma ve tekrar forma d�nme sayfa yazd�rma
UserForm1.Hide
ActiveWindow.SelectedSheets.PrintPreview
UserForm1.Show
Sub yazd�r()
Sheets("Sayfa2").PageSetup.PrintArea = "A1:H35"
Sheets("Sayfa2").PrintOut Copies:=1
End Sub
------------------------
'TAR�H ��LEM�
Sub TEST()
'e�er g�n�n tarihi b�y�k veya e�itse 24.09.2007'ye
If Date >= CDate("24.09.2007") Then
'ilgili kod yaz�lacak
MsgBox "dosya kaydedildi"
End If
End Sub
------------------------------
'Tam ekran normal ekran iyisi
--------------------------------
'SIRALAMA
Sub sirala()
'a:e s�tunlar�n� se�iyoruz c1 h�cresini s�ralama �l��t� yap�yoruz
'yukar�dan a��a��ya s�ral�yoruz(tersi xlDescending)
Range("A:E").Sort key1:=Range("C1"), ORDER1:=xlAscending
End Sub
------------------------------
'Sayiyi Yaziya �ev�rme Ve Ytl-ykr Uygulamasi
Function yaziyla(sayi)
On Error Resume Next
Dim deg(3), s(3), deger(2)
a = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz", "dokuz")
b = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�", "seksen",
"doksan")
c = Array("", "", "bin", "milyon", "milyar", "trilyon")
deger(1) = Int(sayi)
deger(2) = Round(sayi - deger(1), 2) * 100
If sayi = 0 Then son = "s�f�r"
For g = 1 To 2
yazi = deger(g)
For d = 1 To Len(yazi) Step 3
e = e + 1
deg(1) = Mid(yazi, Len(yazi) - d - 1, 1)
deg(2) = Mid(yazi, Len(yazi) - d, 1)
deg(3) = Mid(yazi, Len(yazi) - d + 1, 1)
If deg(1) <> 0 Then s(1) = Replace(a(deg(1)) & "y�z", "biry�z", "y�z")
s(2) = b(deg(2))
s(3) = a(deg(3)) & c(e)
If deg(1) + deg(2) + deg(3) = 0 Then s(3) = ""
son = s(1) & s(2) & s(3) & son
If Left(son, 6) = "birbin" Then son = Replace(son, "birbin", "bin")
For f = 1 To 3
deg(f) = ""
s(f) = ""
Next: Next
If g = 1 And deger(1) <> 0 Then ytl = son & " YTL"
If g = 2 And deger(2) <> 0 Then ykr = " " & son & " YKR"
son = ""
e = 0
Next
yaziyla = ytl & ykr
End Function
--------------------------------
'SAYFA KORUMASI ��Z
Sub KORU()
Sheets("Sayfa1").Protect
End Sub
Sub KORUAC()
Sheets("Sayfa1").Unprotect
End Sub
----------------------------------
'sayfa koruma i�lemleri
Sub Kitabi_Koru()
ActiveWorkbook.Protect "1234"
End Sub
Sub Koruma_iptal()
ActiveWorkbook.Unprotect "1234"
End Sub
'Metin kullanacaksan�z " " aras�nda, say� kullanacaksan�z sadece say�y� yaz�n. Hem
metin, hem say� i�erecekse �ifreniz; " " aras�nda yazmal�s�n�z..
ActiveSheet.Unprotect "sifreniz"
ActiveSheet.Protect "sifreniz"
------------------------------------
'sayfa gizleme ve g�sterme
Sub goster()
Worksheets("sayfa1").Visible = True
End Sub
Sub gizle()
Worksheets("sayfa1").Visible = False
End Sub
---------------------------------------
'sat�r ve sutun geni�li�ini otomatik ayarlama
--------------------------------------
'progress bar �al�t�r�r ilerleme �ubu�u
-----------------------------------
'msgbox uzun metin mesajlar�
MsgBox "Mesaj boxlarda sat�r ba�� yapam�yorum." & vbCrlf & "Bunun bir yolu
olmal� !" & vbCrlf & "Acaba vbCrlf kullan�rsam ne olur?", vbinformation
------------------------------------
klas�r ve dosya ilgili �e�itli kod �rnekleri
1 ) A�a��daki kodlar ile bir dizin alt�na sanki bir klas�r olu�turuyormu�uz gibi
bir dizin olu�turuyoruz:
Sub Dizin_�smi_Olu�tur()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.BuildPath("C:\SXS�", "\A")
MsgBox a
End Sub
2) A�a��daki kodlar ile ad� ge�en klas�rdeki t�m Excel dosyalar�n� SXS klas�r�ne
kopyal�yoruz:
Sub Dosya_Kopyala()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.CopyFile "D:\Excel�rnekleri\*.xls", "C:\SXS"
End Sub
3) Yukar�daki koda benzer bir kod ; ama burada t�m klas�r kopyalan�yor:
Sub Klas�r_Kopyala()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.CopyFolder "D:\Excel�rnekleri", "C:\SXS"
End Sub
Sub Klas�r_Olu�tur()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.CreateFolder "C:\SXS\Deneme"
End Sub
5) Burada ise bir TXT dosyas� olu�turuyoruz.Dosya isminden sonra False yazarsak
eski bilgilerin �st�ne yaz�lmaz ve �File Already Exists� yani �Dosya Zaten Var�
uyar�s� gelir.True yazarsak,eski bilgiler silinir,yenileri yaz�l�r.Bu �rnekte bilgi
yazma k�sm�na yer vermedik.Bilgi yazma k�sm� makalemizin ikinci k�sm�nda,Alt FSO
b�l�m�nde bulunmaktad�r.
�kinci k�s�m False olursa dosya ASCII,True olursa UNICODE olur.
Sub Text_Dosyas�_Olu�tur()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.CreateTextFile("C:\SXS\Deneme.txt", True, False) '�lk true
Overwrite,�kinci False ASCII true olursa Unicode
End Sub
6) Dosya silmeye yarar.Dosya isminden sonra gelen yere ,dosya Salt okunursa True
yazmal�s�n�z.Yoksa "Access Denied" yani "Giri� Reddedildi" der.
Sub Dosya_Sil()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.DeleteFile "C:\SXS\Deneme.txt", True
End Sub
Sub Klas�r_Sil()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.DeleteFolder "C:\SXS\Deneme"
End Sub
Sub S�r�c�_Say�s�()
Dim ds, dc, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set dc = ds.Drives
s = dc.Count
MsgBox s
End Sub
Sub dosya_ara()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.FileExists("C:\testfile.txt")
If a = True Then
MsgBox "Bu isimde bir dosya var"
Else
MsgBox "Bu isimde bir dosya yok"
End If
End Sub
Sub klas�r_ara()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.FolderExists("C:\SXS�")
If a = True Then
MsgBox "Bu isimde bir klas�r var"
Else
MsgBox "Bu isimde bir klas�r yok"
End If
End Sub
Sub Tam_Dizin_�smi()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.GetAbsolutePathName("")
MsgBox a
End Sub
14) Bir dizindeki en son klas�r ya da dosya ismini verir. �rnekte msgbox olarak
sadece �Ben� verilir:
Sub Dizindeki_Son_�sim()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.GetBaseName("C:\SXS�\Deneme\Ben.txt")
MsgBox a
End Sub
Sub Uzant�_�smi()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.GetExtensionName("D:\Excel�rnekleri\Soru.xls")
MsgBox f
End Sub
17) Tek ba��na bir i�e yaramayan bir kod.Bahsi ge�en dosya ismi haf�zada tutuluyor
ve i�lemler bu dosya �zerinden yap�l�yor. �rnekler ikinci b�l�mde verilecektir.
Sub Dosya_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFile("D:\Excel�rnekleri\Soru.xls")
MsgBox f
End Sub
Sub Dosya_�smi_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.GetFileName("D:\Excel�rnekleri\Soru.xls") 'Sadece Dosya ismi al�nd��� i�in
SET tabiri kullan�lmaz
MsgBox f
End Sub
Sub Klas�r_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("D:\Excel�rnekleri")
End Sub
Sub Alt_Klas�r_�smi_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.GetParentFolderName("D:\Excel�rnekleri\Vergi �ade")
MsgBox f
End Sub
Sub �zel_Klas�r_�smi_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetSpecialFolder(0) '0 Windows,1 Sistem,2 Ge�ici Klas�rlerinin yerini
verir.
MsgBox f
End Sub
Sub Ge�ici_Dosya_�smi_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.GetTempName
MsgBox f
End Sub
Sub Dosya_Ta��()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.MoveFile("D:\Excel�rnekleri\Move.xls", "C:\")
End Sub
Sub
Sub Text_Dosyas�_A�()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
'For Reading Sadece Okur,For Appending ise hem Okur hem Yazar
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.OpenTextFile("c:\testfile.txt", ForAppending, TristateFalse)
'TristateUseDefault'da System Default,TristateTrue 'da Unicode,TristateFalse'da
ASCII kullan�l�r.
End Sub
ALT FILE_SYSTEM_OBJECT
1) Create_Text_File_Alt_FSO
Sub Text_Dosyas�_Olu�tur_Yaz()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.CreateTextFile("C:\Deneme.txt", True, False) '�lk true Overwrite,�kinci
False ASCII true olursa Unicode
a.WriteLine ("�lk Sat�r")
a.Close
End Sub
2) Get_Drive_Alt_FSO
A)
Sub S�r�c�_Harfi_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.DriveLetter
MsgBox s
End Sub
B)
Sub S�r�c�_Tipi_G�ster()
On Error GoTo hata:
Dim ds, d, s, t
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("F:\")
Select Case d.DriveType
Case 0: t = "Bilinmiyor"
Case 1: t = "��kar�labilir"
Case 2: t = "HardDisk"
Case 3: t = "A�"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
s = "S�r�c� " & d.DriveLetter & ": " & t
MsgBox s
End
hata:
MsgBox "B�yle Bir S�r�c� Yok"
End Sub
C)
Sub Dosya_Sistemi_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.FileSystem
MsgBox s
End Sub
D)
Sub Bo�_Alan_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive(ds.GetDriveName("C:\"))
s = UCase(d) & " S�r�c�s�nde Bo� Alan:" & Chr(13) _
+ vbCrLf & FormatNumber(d.AvailableSpace)
s = s & " Bytes"
MsgBox s
End Sub
E)
Sub S�r�c�_Haz�r_M�_G�ster()
On Error GoTo hata:
Dim ds, d, s, t
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("F:\")
Select Case d.DriveType
Case 0: t = "Bilinmiyor"
Case 1: t = "��kar�labilir"
Case 2: t = "HardDisk"
Case 3: t = "A�"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
s = "S�r�c� " & d.DriveLetter & ": " & t
If d.IsReady Then
s = s & vbCrLf & "S�r�c� Haz�r."
Else
s = s & vbCrLf & "S�r�c� Haz�r De�il."
End If
MsgBox s
End
hata:
MsgBox "B�yle Bir S�r�c� Yok"
End Sub
F)
Sub K�k_Dosya_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.RootFolder
MsgBox s
End Sub
G)
Sub S�r�c�_Seri_Numaras�_G�ster()
On Error GoTo hata:
Dim ds, d, s, t
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
Select Case d.DriveType
Case 0: t = "Bilinmiyor"
Case 1: t = "��kar�labilir"
Case 2: t = "HardDisk"
Case 3: t = "A�"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
s = "S�r�c� " & d.DriveLetter & ": " & t
If d.IsReady Then
s = s & vbCrLf & d.SerialNumber
MsgBox s
Else
s = s & vbCrLf & "S�r�c� Haz�r De�il."
MsgBox s
End If
End
hata:
MsgBox "B�yle Bir S�r�c� Yok"
End Sub
H)
Sub A�_Payla��m_�smini_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.ShareName
MsgBox s
End Sub
I)
Sub Toplam_Alan_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive(ds.GetDriveName("C:\"))
s = UCase(d) & " S�r�c�s�nde Toplam Alan:" & Chr(13) _
+ vbCrLf & FormatNumber(d.TotalSize)
s = s & " Bytes"
MsgBox s
End Sub
J)
Sub Cilt_�smini_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.VolumeName
MsgBox s
End Sub
3) Get_File_Alt_FSO
Sub Dosya_Bilgisi_G�ster()
Dim ds, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFile("D:\Excel�rnekleri\Soru.xls")
s = UCase("D:\Excel�rnekleri\Soru.xls") & vbCrLf
s = s & "Created: " & f.DateCreated & vbCrLf 'Olu�turma
s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf 'Son Eri�im
s = s & "Last Modified: " & f.DateLastModified 'Son De�i�tirilme
MsgBox s, 0, "Folder Access Info"
End Sub
B)
Sub Dosya_�zellikleri_Ayarla()
�zellik = InputBox("Dosyan�n De�i�tirmek �stedi�iniz �zelli�ini A�a��dan Se�ip" +
Chr(13) + _
"Bo�lu�a Sadece Özellik Numaras�n� Yaz�n�z:" + Chr(13) + vbCrLf + _
"Normal = 0, Salt Okunur = 1, Gizli = 2 , Sistem = 4, Volume = 8, Directory = 16 ,
Ar�iv = 32 , Link/K�sayol = 64 , S�k�t�r�lm� = 128")
Dim ds, f, r
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFile("C:\Deneme.txt")
If f.Attributes And �zellik Then
r = MsgBox("Dosya Özelli�i Zaten" & " " & �zellik & Chr(13) & _
"Silmek �stiyor musunuz?", vbYesNo, "Dosya �zelli�i Ayarla/Temizle")
If r = vbYes Then
f.Attributes = f.Attributes - �zellik
MsgBox "Dosya �zelli�i Temizlendi"
Else
MsgBox "Dosya �zelli�i Oldu�u Gibi B�rak�ld�"
End If
Else
r = MsgBox("Dosya �zelli�i Ayarlanmam�. �imdi ayarlamak �stiyor musunuz?", vbYesNo,
"Dosya �zelli�i Ayarla/Temizle")
If r = vbYes Then
f.Attributes = f.Attributes + �zellik
MsgBox "Dosya �zelli�i ayarland�."
Else
MsgBox "Dosya �zelli�i Oldu�u Gibi b�rak�ld�."
End If
End If
End Sub
4) Get_File_Name_Alt_FSO
Sub Klas�r_�smi_De�i�tir()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
dosya = ds.GetFileName("D:\Excel�rnekleri\Yeni")
dosya2 = ds.GetFileName("C:\SXS")
f = ds.MoveFolder(dosya, dosya2)
End Sub
5) Get_Folder_Alt_FSO
A)
Sub Klas�r_Bilgisi_G�ster()
Dim ds, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("D:\Excel�rnekleri")
s = UCase("D:\Excel�rnekleri") & vbCrLf
s = s & "Created: " & f.DateCreated & vbCrLf 'Olu�turma
s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf 'Son Eri�im
s = s & "Last Modified: " & f.DateLastModified 'Son De�i�tirilme
MsgBox s, 0, "File Access Info"
End Sub
B)
Sub Dosya_�simleri()
Dim ds, dc, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("C:\SXS")
Set dc = f.Files
For Each dosya In dc
s = s & vbCrLf & dosya.Name
Next
MsgBox s
End Sub
C)
Sub Dosya_Say�s�()
Dim ds, dc, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("C:\SXS")
Set dc = f.Files
s = dc.Count
MsgBox s
End Sub
D)
Sub Alt_Klas�r_�simleri()
Dim ds, f, f1, fc, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("C:\SXS")
Set fc = f.SubFolders
For Each f1 In fc
s = s & f1.Name
s = s & vbCrLf
Next
MsgBox s
End Sub
6) Open_Text_File_Alt_FSO
A)
Sub Text_Dosyas�_Test()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.OpenTextFile("c:\deneme.txt", 2)
f.write "Merhaba
f.Close
End Sub
B)
Sub sat�r_sonu()
Dim ds, a, son
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.OpenTextFile("c:\deneme.txt")
Do While a.AtEndOfline <> True
son = a.Read(2) '2 rakam� sat�r sonundaki 2 harfi verir.
Loop
MsgBox son
a.Close
End Sub
C)
Sub dosya_sonunda_t�m_sat�r()
Dim ds, a, son
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.OpenTextFile("c:\deneme.txt")
Do While a.AtEndOfStream <> True
son = a.Readline 'Dosya Sonundaki t�m sat�r� verir.
Loop
MsgBox son
a.Close
End Sub
D)
Sub dosya_sonunda_son_harf()
Dim ds, a, son
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.OpenTextFile("c:\deneme.txt")
Do While a.AtEndOfStream <> True
son = a.Read(1) 'Dosya Sonundaki son harfi verir.
Loop
MsgBox son
a.Close
End Sub
------------------------------------
'istedi�iniz renkteki h�creleri topla
Sub renk_topla()
'b1 h�cresine 0 de�eri at�yoruz
[b1].Value = 0
'a1:a10 aras� d�ng� kuruyoruz
For Each renk In [a1:a10]
'e�er a1:a10 aras� say�lar�n fon rengi k�rm�z� ise
'b1 h�cresinde k�rm�z� fontlu say�lar� topla
If renk.Font.ColorIndex = 3 Then [b1] = renk + [b1]
'd�ng� sonu
Next
End Sub
-------------------------------------
'istenilen h�cre aral���nda enter ile kod �al�t�rma
Sub auto_open()
'Enter tu�u ile makroyu ili�kilendirdik
Application.OnKey ("{RETURN}"), "ENTER"
End Sub
Sub ENTER()
'enter tu�unun sadece A1:A50 h�cre aral���nda �al�mas�n� sa�lad�k
If Intersect(ActiveCell, [A1:A50]) Is Nothing Then Exit Sub
'ko�ul ger�ekle�ti�inde yap�lacak i�lem
Call userform1.Show
End Sub
-------------------------------------
'b�y�k harf k���k harf �evir
Sub test()
'a1 c20 aras�n� d�ng� i�erisine al�yoruz
For Each buyuk In Range("a1:c20")
'd�ng�ye ald���m�z alan� b�y�k harfe �eviriyoruz.'LCase k���k harf i�in
buyuk.Value = UCase(buyuk.Value)
'd�ng� sonu
Next
End Sub
-------------------------------------
'find Bul ara
Sub test()
'bir hata ile kar��la�t���nda ATLA istenen yere git
On Error GoTo ATLA
'ver de�i�kenine inputboxu at�yoruz
ver = InputBox("Arayaca��n�z veriyi giriniz.")
'a s�tununda inputboxtaki de�eri arat�yoruz
Set bul = [a:a].Find(ver)
'bulunan veriyi se�iyoruz
bul.Select
'subdan ��k�yoruz
Exit Sub
'hata ile kar��la��ld���nda gelinecek yer
ATLA:
'bilgi mesaj�
MsgBox "ARADI�INIZ VER� BULUNAMDI"
End Sub
--------------------------------------
'�alisma sayfanizdaki �alisma alaninizi belirleyen ve iptal eden macrolar
Sub limitlialan()
'a1:a10 harici h�crelerde i�lem yap�lmas�n� engeller
ActiveSheet.ScrollArea = "A1:A10"
End Sub
Sub limitiptal()
'i�lemi eski haline getirir
ActiveSheet.ScrollArea = ""
End Sub
--------------------------------
'Otomatik makro devreye alma
Sub k()
'�al�t�r�ld�kta 5 saniye sonra Makro1 isimli makroyu devreye sokar
Application.OnTime Now + TimeValue("00:00:05"), "Makro1"
End Sub
Sub makro1()
'yukar�daki kodun devam�nda 5 saniye sonra �al��r
MsgBox "Zaman geldi"
End Sub
--------------------------------
'M�kerrer kay�tlar� tek kayda indir.
Sub m�kerer()
'a s�tununun en sonundan yukar�ya do�ru bir eksilterek d�ng� kuruyoruz
For sil = [a65536].End(3).Row To 1 Step -1
'e�er say ile ayn� olan de�erlerin birden fazlas�n� sildiriyoruz
If WorksheetFunction.CountIf(Range("A1:A" & sil), Range("A" & sil)) > 1 Then
Rows(sil).Delete
'd�ng� sonu
Next
'sub yordam�ndan ��k�
End Sub
------------------------------
'sonsat�r
sonsatir=[A65536].End(3).Row
------------------------------
Sub kucharf()
For Each c In Selection.Cells
c.Value = LCase$(c.Value)
Next c
End Sub
----------------
Sub buyharf()
For Each c In Selection.Cells
c.Value = UCase$(c.Value)
Next c
End Sub
-------------
Sub Form2Deger()
For Each c In Selection.C ells
c.Formula=c.Value
Next c
End Sub
---------------------------
Sub BoslukSil()
For Each c In Selection.Cells
c.Value=Application.Trim(c.Value)
Next c
End Sub
----------kod basla------
'b2 den b3 ge�ince b2 ye tarih yazs�n b3 den b4 de ge�ince b3 e saat yazs�n
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address(0, 0) = "B2" Then
[K1] = "B2"
End If
If Target.Address(0, 0) = "B3" And [K1] = "B2" Then
[B2] = Date
End If
If Target.Address(0, 0) = "B3" Then
[K2] = "B3"
End If
If Target.Address(0, 0) = "B4" And [K2] = "B3" Then
[B3] = Format(Now, "hh:mm")
End If
If Target.Row < 2 Or Target.Row > 4 And Target.Column <> 2 Then
Range("K1:K2").ClearContents
End If
End Sub
----------kod bitir------
----------kod basla------
'tarihin g�n�
Function DayName(InputDate As Date)
Dim DayNumber As Integer
DayNumber = Weekday(InputDate, vbSunday)
Select Case DayNumber
Case 1
DayName = "Sunday"
Case 2
DayName = "Monday"
Case 3
DayName = "Tuesday"
Case 4
DayName = "Wednesday"
Case 5
DayName = "Thursday"
Case 6
DayName = "Friday"
Case 7
DayName = "Saturday"
End Select
End Function
----------kod bitir------
----------kod basla------
yeni sayfa ekle
Set NewSh = Sheets.Add(After:=Sheets(Sheets.Count))
NewSh.Name = "DataSheet"
----------kod bitir------
----------kod basla------
'A s�t�nundaki bo� h�cre olan sat�rlar� sile
Sub Satirsil()
[A:A].SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End Sub
----------kod bitir------
----------kod basla------
'Kapal� dosyadan veri almak
'Const SourceFile As String = "C:\Demirba�\Demirba�.xls"
'Const SourceSheet As String = "Sayfa11"
'Const SourceRange As String = "A1:L1200"
'Call GetDataFromClosedWorkbook(SourceFile, SourceRange)
Dim i As Long
Dim gec, s, st As String
Sheets("CIRO").Select
For i = 1 To 3000
s = Cells(i, 1).Value
If i > 2 Then gec = Cells(i - 1, 1).Value Else gec = s
If s = "" Then GoTo son
If i = 82 Then
s = s
End If
If (s <> gec) And (gec <> "") Then
st = Str(i)
Rows(st).Select
Selection.Insert Shift:=xlDown
ActiveCell.Value = gec + "TOPLAM"
Selection.Interior.ColorIndex = 40
Selection.Font.Bold = True
i = i + 1
End If
Next i
son:
End Sub
----------kod bitir------
----------kod basla------
1 ) A�a��daki kodlar ile bir dizin alt�na sanki bir klas�r olu�turuyormu�uz gibi
bir dizin olu�turuyoruz:
Sub Dizin_�smi_Olu�tur()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.BuildPath("C:\SXS�", "\A")
MsgBox a
End Sub
2) A�a��daki kodlar ile ad� ge�en klas�rdeki t�m Excel dosyalar�n� SXS klas�r�ne
kopyal�yoruz:
Sub Dosya_Kopyala()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.CopyFile "D:\Excel�rnekleri\*.xls", "C:\SXS"
End Sub
3) Yukar�daki koda benzer bir kod ; ama burada t�m klas�r kopyalan�yor:
Sub Klas�r_Kopyala()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.CopyFolder "D:\Excel�rnekleri", "C:\SXS"
End Sub
Sub Klas�r_Olu�tur()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.CreateFolder "C:\SXS\Deneme"
End Sub
5) Burada ise bir TXT dosyas� olu�turuyoruz.Dosya isminden sonra False yazarsak
eski bilgilerin �st�ne yaz�lmaz ve �File Already Exists� yani �Dosya Zaten Var�
uyar�s� gelir.True yazarsak,eski bilgiler silinir,yenileri yaz�l�r.Bu �rnekte bilgi
yazma k�sm�na yer vermedik.Bilgi yazma k�sm� makalemizin ikinci k�sm�nda,Alt FSO
b�l�m�nde bulunmaktad�r.
�kinci k�s�m False olursa dosya ASCII,True olursa UNICODE olur.
Sub Text_Dosyas�_Olu�tur()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.CreateTextFile("C:\SXS\Deneme.txt", True, False) '�lk true
Overwrite,�kinci False ASCII true olursa Unicode
End Sub
6) Dosya silmeye yarar.Dosya isminden sonra gelen yere ,dosya Salt okunursa True
yazmal�s�n�z.Yoksa "Access Denied" yani "Giri� Reddedildi" der.
Sub Dosya_Sil()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.DeleteFile "C:\SXS\Deneme.txt", True
End Sub
Sub Klas�r_Sil()
Dim ds
Set ds = CreateObject("Scripting.FileSystemObject")
ds.DeleteFolder "C:\SXS\Deneme"
End Sub
Sub S�r�c�_Say�s�()
Dim ds, dc, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set dc = ds.Drives
s = dc.Count
MsgBox s
End Sub
Sub S�r�c�_�simleri()
Dim ds, dc, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set dc = ds.Drives
For Each s�r�c� In dc
s = s & vbCrLf & s�r�c�
Next
MsgBox s
End Sub
Sub dosya_ara()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.FileExists("C:\testfile.txt")
If a = True Then
MsgBox "Bu isimde bir dosya var"
Else
MsgBox "Bu isimde bir dosya yok"
End If
End Sub
Sub klas�r_ara()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.FolderExists("C:\SXS�")
If a = True Then
MsgBox "Bu isimde bir klas�r var"
Else
MsgBox "Bu isimde bir klas�r yok"
End If
End Sub
Sub Tam_Dizin_�smi()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.GetAbsolutePathName("")
MsgBox a
End Sub
14) Bir dizindeki en son klas�r ya da dosya ismini verir.�rnekte msgbox olarak
sadece �Ben� verilir:
Sub Dizindeki_Son_�sim()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.GetBaseName("C:\SXS�\Deneme\Ben.txt")
MsgBox a
End Sub
Sub S�r�c�_�smi()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.GetDriveName("C:\SXS�\Deneme\Ben.txt")
MsgBox a
End Sub
16) Dosya uzant�s�n� verir:
Sub Uzant�_�smi()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.GetExtensionName("D:\Excel�rnekleri\Soru.xls")
MsgBox f
End Sub
17) Tek ba��na bir i�e yaramayan bir kod.Bahsi ge�en dosya ismi haf�zada tutuluyor
ve i�lemler bu dosya �zerinden yap�l�yor.�rnekler ikinci b�l�mde verilecektir.
Sub Dosya_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFile("D:\Excel�rnekleri\Soru.xls")
MsgBox f
End Sub
Sub Dosya_�smi_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.GetFileName("D:\Excel�rnekleri\Soru.xls") 'Sadece Dosya ismi al�nd��� i�in
SET tabiri kullan�lmaz
MsgBox f
End Sub
Sub Klas�r_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("D:\Excel�rnekleri")
End Sub
Sub Alt_Klas�r_�smi_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.GetParentFolderName("D:\Excel�rnekleri\Vergi �ade")
MsgBox f
End Sub
Sub �zel_Klas�r_�smi_Al()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetSpecialFolder(0) '0 Windows,1 Sistem,2 Ge�ici Klas�rlerinin yerini
verir.
MsgBox f
End Sub
Sub Dosya_Ta��()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
f = ds.MoveFile("D:\Excel�rnekleri\Move.xls", "C:\")
End Sub
Sub
Sub Text_Dosyas�_A�()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
'For Reading Sadece Okur,For Appending ise hem Okur hem Yazar
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.OpenTextFile("c:\testfile.txt", ForAppending, TristateFalse)
'TristateUseDefault'da System Default,TristateTrue 'da Unicode,TristateFalse'da
ASCII kullan�l�r.
End Sub
ALT FILE_SYSTEM_OBJECT
1) Create_Text_File_Alt_FSO
Sub Text_Dosyas�_Olu�tur_Yaz()
Dim ds, a
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.CreateTextFile("C:\Deneme.txt", True, False) '�lk true Overwrite,�kinci
False ASCII true olursa Unicode
a.WriteLine ("�lk Sat�r")
a.Close
End Sub
2) Get_Drive_Alt_FSO
A)
Sub S�r�c�_Harfi_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.DriveLetter
MsgBox s
End Sub
B)
Sub S�r�c�_Tipi_G�ster()
On Error GoTo hata:
Dim ds, d, s, t
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("F:\")
Select Case d.DriveType
Case 0: t = "Bilinmiyor"
Case 1: t = "��kar�labilir"
Case 2: t = "HardDisk"
Case 3: t = "A�"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
s = "S�r�c� " & d.DriveLetter & ": " & t
MsgBox s
End
hata:
MsgBox "B�yle Bir S�r�c� Yok"
End Sub
C)
Sub Dosya_Sistemi_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.FileSystem
MsgBox s
End Sub
D)
Sub Bo�_Alan_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive(ds.GetDriveName("C:\"))
s = UCase(d) & " S�r�c�s�nde Bo� Alan:" & Chr(13) _
+ vbCrLf & FormatNumber(d.AvailableSpace)
s = s & " Bytes"
MsgBox s
End Sub
E)
Sub S�r�c�_Haz�r_M�_G�ster()
On Error GoTo hata:
Dim ds, d, s, t
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("F:\")
Select Case d.DriveType
Case 0: t = "Bilinmiyor"
Case 1: t = "��kar�labilir"
Case 2: t = "HardDisk"
Case 3: t = "A�"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
s = "S�r�c� " & d.DriveLetter & ": " & t
If d.IsReady Then
s = s & vbCrLf & "S�r�c� Haz�r."
Else
s = s & vbCrLf & "S�r�c� Haz�r De�il."
End If
MsgBox s
End
hata:
MsgBox "B�yle Bir S�r�c� Yok"
End Sub
F)
Sub K�k_Dosya_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.RootFolder
MsgBox s
End Sub
G)
Sub S�r�c�_Seri_Numaras�_G�ster()
On Error GoTo hata:
Dim ds, d, s, t
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
Select Case d.DriveType
Case 0: t = "Bilinmiyor"
Case 1: t = "��kar�labilir"
Case 2: t = "HardDisk"
Case 3: t = "A�"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
s = "S�r�c� " & d.DriveLetter & ": " & t
If d.IsReady Then
s = s & vbCrLf & d.SerialNumber
MsgBox s
Else
s = s & vbCrLf & "S�r�c� Haz�r De�il."
MsgBox s
End If
End
hata:
MsgBox "B�yle Bir S�r�c� Yok"
End Sub
H)
Sub A�_Payla��m_�smini_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.ShareName
MsgBox s
End Sub
I)
Sub Toplam_Alan_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive(ds.GetDriveName("C:\"))
s = UCase(d) & " S�r�c�s�nde Toplam Alan:" & Chr(13) _
+ vbCrLf & FormatNumber(d.TotalSize)
s = s & " Bytes"
MsgBox s
End Sub
J)
Sub Cilt_�smini_G�ster()
Dim ds, d, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set d = ds.GetDrive("C:\")
s = d.VolumeName
MsgBox s
End Sub
3) Get_File_Alt_FSO
Sub Dosya_Bilgisi_G�ster()
Dim ds, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFile("D:\Excel�rnekleri\Soru.xls")
s = UCase("D:\Excel�rnekleri\Soru.xls") & vbCrLf
s = s & "Created: " & f.DateCreated & vbCrLf 'Olu�turma
s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf 'Son Eri�im
s = s & "Last Modified: " & f.DateLastModified 'Son De�i�tirilme
MsgBox s, 0, "Folder Access Info"
End Sub
B)
Sub Dosya_�zellikleri_Ayarla()
�zellik = InputBox("Dosyan�n De�i�tirmek �stedi�iniz �zelli�ini A�a��dan Se�ip" +
Chr(13) + _
"Bo�lu�a Sadece �zellik Numaras�n� Yaz�n�z:" + Chr(13) + vbCrLf + _
"Normal = 0, Salt Okunur = 1, Gizli = 2 , Sistem = 4, Volume = 8, Directory = 16 ,
Ar�iv = 32 , Link/K�sayol = 64 , S�k�t�r�lm� = 128")
Dim ds, f, r
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFile("C:\Deneme.txt")
4) Get_File_Name_Alt_FSO
Sub Klas�r_�smi_De�i�tir()
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
dosya = ds.GetFileName("D:\Excel�rnekleri\Yeni")
dosya2 = ds.GetFileName("C:\SXS")
f = ds.MoveFolder(dosya, dosya2)
End Sub
5) Get_Folder_Alt_FSO
A)
Sub Klas�r_Bilgisi_G�ster()
Dim ds, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("D:\Excel�rnekleri")
s = UCase("D:\Excel�rnekleri") & vbCrLf
s = s & "Created: " & f.DateCreated & vbCrLf 'Olu�turma
s = s & "Last Accessed: " & f.DateLastAccessed & vbCrLf 'Son Eri�im
s = s & "Last Modified: " & f.DateLastModified 'Son De�i�tirilme
MsgBox s, 0, "File Access Info"
End Sub
B)
Sub Dosya_�simleri()
Dim ds, dc, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("C:\SXS")
Set dc = f.Files
For Each dosya In dc
s = s & vbCrLf & dosya.Name
Next
MsgBox s
End Sub
C)
Sub Dosya_Say�s�()
Dim ds, dc, f, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("C:\SXS")
Set dc = f.Files
s = dc.Count
MsgBox s
End Sub
D)
Sub Alt_Klas�r_�simleri()
Dim ds, f, f1, fc, s
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.GetFolder("C:\SXS")
Set fc = f.SubFolders
For Each f1 In fc
s = s & f1.Name
s = s & vbCrLf
Next
MsgBox s
End Sub
6) Open_Text_File_Alt_FSO
A)
Sub Text_Dosyas�_Test()
Const ForReading = 1, ForWriting = 2, ForAppending = 3
Dim ds, f
Set ds = CreateObject("Scripting.FileSystemObject")
Set f = ds.OpenTextFile("c:\deneme.txt", 2)
f.write "Merhaba
f.Close
End Sub
B)
Sub sat�r_sonu()
Dim ds, a, son
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.OpenTextFile("c:\deneme.txt")
Do While a.AtEndOfline <> True
son = a.Read(2) '2 rakam� sat�r sonundaki 2 harfi verir.
Loop
MsgBox son
a.Close
End Sub
C)
Sub dosya_sonunda_t�m_sat�r()
Dim ds, a, son
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.OpenTextFile("c:\deneme.txt")
Do While a.AtEndOfStream <> True
son = a.Readline 'Dosya Sonundaki t�m sat�r� verir.
Loop
MsgBox son
a.Close
End Sub
D)
Sub dosya_sonunda_son_harf()
Dim ds, a, son
Set ds = CreateObject("Scripting.FileSystemObject")
Set a = ds.OpenTextFile("c:\deneme.txt")
Do While a.AtEndOfStream <> True
son = a.Read(1) 'Dosya Sonundaki son harfi verir.
Loop
MsgBox son
a.Close
End Sub
----------kod bitir------
----------kod basla------
Sub dosya_ara()
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.FileExists("C:\testfile.txt")
If a = True Then
MsgBox "Bu isimde bir dosya var"
Else
MsgBox "Bu isimde bir dosya yok"
End If
End Sub
----------kod bitir------
----------kod basla------
Sub klas�r_ara()
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.FolderExists("C:\SXS�")
If a = True Then
MsgBox "Bu isimde bir klas�r var"
Else
MsgBox "Bu isimde bir klas�r yok"
End If
End Sub
----------kod bitir------
----------kod basla------
Sub dizinara()
On Error GoTo son
dizin = InputBox("ARANACAK D�Z�N ADINI YAZINIZ")
ara = "c:\" & dizin
ChDir ara
MsgBox "BU D�Z�N MEVCUTTUR"
Exit Sub
son:
MsgBox "BU D�Z�N MEVCUT DE��LD�R"
End Sub
----------kod bitir------
----------kod basla------
Sub S�r�c�_ara()
Set ds = CreateObject("Scripting.FileSystemObject")
a = ds.DriveExists("�:\")
If a = True Then
MsgBox "Bu isimde bir s�r�c� var"
Else
MsgBox "Bu isimde bir s�r�c� yok"
End If
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Function yaziyacevir(rakam)
Dim grup(5), sayi(10, 3), basamak(5), oku(3)
sayi(0, 1) = "": sayi(0, 2) = "": sayi(0, 3) = ""
sayi(1, 1) = "Y�Z": sayi(1, 2) = "ON": sayi(1, 3) = "B�R"
sayi(2, 1) = "�K�Y�Z": sayi(2, 2) = "Y�RM�": sayi(2, 3) = "�K�"
sayi(3, 1) = "��Y�Z": sayi(3, 2) = "OTUZ": sayi(3, 3) = "��"
sayi(4, 1) = "D�RTY�Z": sayi(4, 2) = "KIRK": sayi(4, 3) = "D�RT"
sayi(5, 1) = "BE�Y�Z": sayi(5, 2) = "ELL�": sayi(5, 3) = "BE�"
sayi(6, 1) = "ALTIY�Z": sayi(6, 2) = "ALTMI�": sayi(6, 3) = "ALTI"
sayi(7, 1) = "YED�Y�Z": sayi(7, 2) = "YETM��": sayi(7, 3) = "YED�"
sayi(8, 1) = "SEK�ZY�Z": sayi(8, 2) = "SEKSEN": sayi(8, 3) = "SEK�Z"
sayi(9, 1) = "DOKUZY�Z": sayi(9, 2) = "DOKSAN": sayi(9, 3) = "DOKUZ"
basamak(5) = "TR�LYON"
basamak(4) = "M�LYAR"
basamak(3) = "M�LYON"
basamak(2) = "B�N"
basamak(1) = ""
lira = Int(rakam)
kurus = Round(rakam - lira, 2) * 100
If Len(lira) > 15 Then
MsgBox ("Bu fonksiyon en fazla 15 haneli say�lar i�in �al��r.")
End
End If
kalan = lira
yaziyacevir = ""
For x = 1 To 5
a = 15 - 3 * x
If Len(lira) > a Then
grup(6 - x) = Int(kalan / 10 ^ a)
kalan = kalan - (grup(6 - x) * 10 ^ a)
End If
Next x
If grup(2) = 1 Then
yaziyacevir = yaziyacevir + "B�N"
End If
txtsira.Value = ""
txtbt.Value = ""
t1.Value = ""
t2.Value = ""
t3.Value = ""
t4.Value = ""
t5.Value = ""
t6.Value = ""
t7.Value = ""
MsgBox "Ali Kemal Bey Girmi� Oldu�unuz Veride gerekli d�zeltme tap�lm�t�r.", ,
"AL� KEMAL MEYDAN KAYIT ONAYI"
txtsira.Value = WorksheetFunction.Count(Range("A3:A65000")) + 0
End Sub
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
dur = 1
End Sub
----------kod bitir------
----------kod basla------
Sub FormAc()
frmkay�t.Show
End Sub
Sub Auto_open()
Sheets("Liste").Select
UserForm1.Show
frmkay�t.Show
End Sub
Sub auto_close()
Sheets("Liste").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
Application.ScreenUpdating = False
a = Sheets("Liste").Cells(65536, 1).End(xlUp).Value
sat = Sheets("Liste").Cells(65536, 3).End(xlUp).Row
Sheets("Liste").Cells(sat + 1, 1) = a + 1
Sheets("Liste").Cells(sat + 1, 2) = [a2].Value
Range("G12:H14" & Cells(65536, 2).End(xlUp).Row).Copy
Sheets("Liste").Cells(sat + 1, 2).PasteSpecial Paste:=xlValue
Application.CutCopyMode = False
MsgBox "VER�LER L�STEYE KAYDED�LD�"
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub Makro1()
'
' Makro1 Makro
' Makro MEOP taraf�ndan 07.04.2005 tarihinde kaydedildi.
'
'
End Sub
----------kod bitir------
----------kod basla------
End Sub
Private Sub TextBox2_Change()
End Sub
Private Sub Userform1_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode <> 1 Then Application.Quit
Application.CommandBars("Full Screen").Visible = False
Application.CommandBars("Formatting").Visible = True
Application.CommandBars("Standard").Visible = True
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWorkbook.Save
End Sub
Private Sub CommandButton1_Click()
If TextBox1.Value = "akemal" Then
MsgBox "MAA� BORDRO PROGRAMI K�PR�BA�I MALM�D�RL���NDEN H�ZMETL� AL� KEMAL MEYDAN
TARAFINDAN YAPILMI�TIR...", , "B�LG� MESAJI"
Unload Me
Else
MsgBox "Yanl� veya Eksik �ifre Girdiniz. Tekrar Deneyiniz!", vbCritical, "Ge�ersiz
�ifre"
TextBox1 = ""
TextBox1.SetFocus
End If
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub TwoListbox()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub ListBox1_Click()
Dim iL1, sut, iL1Sut As Integer
iL1 = ListBox1.ListIndex
iL1Sut = ListBox1.ColumnCount - 1
With ListBox1
ListBox3.AddItem .List(iL1, 0), 0
For sut = 1 To iL1Sut
ListBox3.List(0, sut) = .List(iL1, sut)
Next sut
End With
End Sub
Private Sub ListBox2_Click()
ListBox4.AddItem ListBox2.List(ListBox2.ListIndex)
End Sub
ListBox1.ColumnHeads = True
ListBox1.ColumnWidths = "50;50;50;50;50"
ListBox2.ColumnWidths = "50;50;50;50;50"
ListBox3.ColumnWidths = "50;50;50;50;50"
ListBox1.RowSource = "Sayfa1!$a$2:$e$11"
ListBox4.ColumnWidths = "20"
End Sub
----------kod bitir------
----------kod basla------
Sub temizle()
Range("A2:J430").Select
Selection.ClearContents
ActiveWindow.ScrollRow = 2
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton4_Click()
UserForm1.PrintForm
End Sub
Private Sub TextBox1_Change()
On Error Resume Next
TextBox1 = Evaluate("=b�y�kharf(""" & TextBox1 & """)")
TextBox1 = Evaluate("=upper(""" & TextBox1 & """)")
TextBox1 = StrConv(TextBox1, vbUpperCase)
End Sub
Private Sub TextBox2_Change()
On Error Resume Next
TextBox2 = Evaluate("=b�y�kharf(""" & TextBox2 & """)")
TextBox2 = Evaluate("=upper(""" & TextBox2 & """)")
TextBox2 = StrConv(TextBox2, vbUpperCase)
TextBox2 = StrConv(TextBox2, vbUpperCase)
End Sub
Private Sub TextBox6_Change()
On Error Resume Next
TextBox6 = Evaluate("=b�y�kharf(""" & TextBox6 & """)")
TextBox6 = Evaluate("=upper(""" & TextBox6 & """)")
TextBox6 = StrConv(TextBox6, vbUpperCase)
TextBox6 = StrConv(TextBox6, vbUpperCase)
End Sub
Private Sub TextBox7_Change()
On Error Resume Next
TextBox7 = Evaluate("=b�y�kharf(""" & TextBox7 & """)")
TextBox7 = Evaluate("=upper(""" & TextBox7 & """)")
TextBox7 = StrConv(TextBox7, vbUpperCase)
TextBox7 = StrConv(TextBox7, vbUpperCase)
End Sub
Private Sub TextBox8_Change()
TextBox8 = StrConv(TextBox8, vbUpperCase)
End Sub
Private Sub TextBox9_Change()
TextBox9 = StrConv(TextBox9, vbUpperCase)
End Sub
Private Sub TextBox10_Change()
On Error Resume Next
TextBox10 = Evaluate("=b�y�kharf(""" & TextBox10 & """)")
TextBox10 = Evaluate("=upper(""" & TextBox10 & """)")
TextBox10 = StrConv(TextBox10, vbUpperCase)
End Sub
Private Sub CommandButton1_Click()
Dim deneme As Integer
deneme = Application.CountA(Sheets("bilgi giris").Columns("A")) + 1
sat = WorksheetFunction.CountA(Sheets("D�K�M").[b2:b65536]) + 2
say = 0
For no = 1 To 10
Sheets("bilgi giris").Cells(deneme, no) = UserForm1.Controls("TextBox" & no).Value
If no = 2 Or no = 10 Then
say = say + 1
GoTo 10
End If
Sheets("D�K�M").Cells(sat, no + 1 - say) = UserForm1.Controls("TextBox" & no).Value
10 UserForm1.Controls("Textbox" & no) = ""
Next no
End Sub
Private Sub CommandButton2_Click()
Sheets("D�K�M").PrintOut Copies:=1
End Sub
Private Sub CommandButton3_Click()
MsgBox "KAPATMAK �STED���N�ZDEN EM�NM�S�N�Z ? "
Unload Me
End Sub
'
Sheets("Sayfa2").Select
Columns("A:B").Select
Selection.ClearContents
Sheets("Sayfa1").Select
Range("A1:B1").Select
Selection.AutoFilter
Range("B1").Select
Selection.AutoFilter Field:=2, Criteria1:="=*ARAMA*", Operator:=xlAnd
Range("A1:B1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Sayfa2").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End Sub
----------kod bitir------
----------kod basla------
Private Sub ListBox2_Click()
End Sub
Application.ScreenUpdating = False
Sheets("Sayfa2").Columns("A:B").ClearContents
Sheets("Sayfa1").Select
Range("A1:B1").AutoFilter
Range("B1").Select
Selection.AutoFilter Field:=2, Criteria1:="=*" & TextBox1.Text & "*",
Operator:=xlAnd
Range("A1:B1").Select
Range([A1:B1], [A1:B1].End(xlDown)).Copy
Sheets("Sayfa2").Select
Range("A1").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ListBox2.RowSource = "sayfa2!" & Selection.Address
CutCopyMode = False
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Sub scapi()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("E4")
Range("A1").Select
End Sub
Sub tarih()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("G4")
Range("A1").Select
End Sub
Sub firma()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("F4")
Range("A1").Select
End Sub
Sub MARKA()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("D4")
Range("A1").Select
End Sub
Sub ADANOPARSELNO()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("B4:D4")
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
UserForm1.Show
End Sub
End Function
----------kod bitir------
----------kod basla------
sira = TextBox1.Text
TextBox1.Text = sira + 1
TextBox2.Text = ""
End If
End Sub
sira = TextBox1.Text
TextBox1.Text = sira + 1
TextBox2.Text = ""
End If
End Sub
CommandButton1.Enabled = True
Exit Sub
End If
Next i
'Kayd� yoksa kay�t edeyimmi Numaras�n� yazmad�ysa
�kaz = MsgBox("Evrak Numaral� bir kay�t yok." & vbCrLf & "Yeni Kay�t Yapmak
�stermisiniz?", vbYesNo + vbExclamation, "Dikkat !")
If ikaz = vbNo Then Cancel = True
TextBox2.SetFocus
If �kaz = vbYes Then UserForm2.Show
'Tamam D��mesine ait kod son
End Sub
End Sub
Private Sub UserForm_Activate()
TextBox3.Text = Year(Date)
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
'EKLE/G�NCELLE D��mesine ait kod ba�l�yor
'Stok Kod Numaras�n�n yaz�lmamas� halinde kay�t i�leminin yap�lmamas� i�in uyar�
If TextBox1.Value = "" Then
Soru = MsgBox("Evrak No Yazmazsan�z Kay�t �lemi Ger�ekle�mez.Devam Edeyimmi?",
vbYesNo, "Apel Numaras�")
TextBox1.SetFocus
If Soru = vbYes Then GoTo devam
If Soru = vbNo Then Exit Sub
End If
'Stoktan d��lecek Mal Adedini yazmad�ysa
If TextBox4.Value = "" Then
Soru = MsgBox("Ad� Soyad� Bo� Ge�elemez.Devam Edeyimmi?", vbYesNo, "Baba Ad�")
TextBox4.SetFocus
If Soru = vbYes Then GoTo devam
If Soru = vbNo Then Exit Sub
End If
devam:
Set s1 = Sheets("EVRAK DEFTER�")
noA = WorksheetFunction.CountA(s1.Range("b:b"))
For i = 1 To noA
If s1.Cells(i, "b") = Val(TextBox1) Then
s1.Cells(i, "d") = TextBox4.Text
s1.Cells(i, "e") = TextBox5.Text
s1.Cells(i, "f") = TextBox6.Text
s1.Cells(i, "g") = TextBox7.Text
s1.Cells(i, "h") = TextBox8.Text
s1.Cells(i, "�") = TextBox9.Text
s1.Cells(i, "j") = TextBox10.Text
s1.Cells(i, "k") = TextBox11.Text
s1.Cells(i, "l") = TextBox12.Text
s1.Cells(i, "m") = TextBox13.Text
s1.Cells(i, "n") = TextBox14.Text
s1.Cells(i, "o") = TextBox15.Text
s1.Cells(i, "p") = TextBox16.Text
s1.Cells(i, "q") = TextBox17.Text
Exit Sub
End If
Next i
MsgBox "Arad���n�z isimde bir kay�t bulunamad�", vbCritical, "KAYIT"
Sheets("EVRAK DEFTER�").Select
'EKLE/G�NCELLE D��mesine ait kod son
End Sub
CommandButton1.Enabled = True
Exit Sub
End If
Next i
'Kayd� yoksa kay�t edeyimmi Numaras�n� yazmad�ysa
�kaz = MsgBox("Evrak Numaral� bir kay�t yok." & vbCrLf & "Yeni Kay�t Yapmak
�stermisiniz?", vbYesNo + vbExclamation, "Dikkat !")
If ikaz = vbNo Then Cancel = True
TextBox2.SetFocus
If �kaz = vbYes Then UserForm2.Show
'Tamam D��mesine ait kod son
End Sub
HataKontrol:
Select Case Err.Number
Case 11: Mesaj = "S�f�ra b�l�nme hatas� olu�tu!!!"
End Select
MsgBox Mesaj
Resume Next
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Application.DisplayFullScreen = True
End Sub
Sub tt()
Application.DisplayFullScreen = True
End Sub
Sub ttt()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
Sub ac()
xxx = InputBox("�ifreniz")
If xxx <> "a" Then Exit Sub
k = ActiveSheet.Index
For i = 1 To Worksheets.Count
Worksheets(i).Select
Columns("A:G").Select
Selection.EntireColumn.Hidden = False
Next
Worksheets(k).Select
End Sub
Sub kapa()
Application.ScreenUpdating = False
k = ActiveSheet.Index
For i = 1 To Worksheets.Count
Worksheets(i).Select
Columns("A:G").Select
Selection.EntireColumn.Hidden = True
Next
Worksheets(k).Select
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Public LblTop As Integer
Public LblID As Integer
'
Sub Rectangle2_Click()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim MyLbl As Control
Set MyLbl = Controls.Add("Forms.Label.1")
LblID = LblID + 1
If LblTop + 30 >= CommandButton1.Top Then
Me.Height = Me.Height + 10
CommandButton1.Top = CommandButton1.Top + 10
End If
LblTop = LblTop + 10
MyLbl.Name = "MyLabel" & LblID
MyLbl.Left = 120
MyLbl.Top = LblTop
MyLbl.Width = 200
MyLbl.Height = 20
MyLbl.ForeColor = vbRed
MyLbl.Font.Bold = True
MyLbl.Caption = "Yeni bir etiket daha ... " & "(" & MyLbl.Name & ")"
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
LblTop = 0
LblID = 0
End Sub
----------kod bitir------
----------kod basla------
Public LblTop As Integer
Public LblID As Integer
'
Sub Rectangle2_Click()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim MyLbl As Control
Set MyLbl = Frame1.Controls.Add("Forms.Label.1")
LblID = LblID + 1
If LblTop + 30 >= (Frame1.Top + Frame1.Height) Then
Frame1.ScrollBars = fmScrollBarsVertical
Frame1.ScrollHeight = LblTop + 30
Frame1.ScrollTop = LblTop + 30
End If
LblTop = LblTop + 10
MyLbl.Name = "MyLabel" & LblID
MyLbl.Left = 10
MyLbl.Top = LblTop
MyLbl.Width = 200
MyLbl.Height = 20
MyLbl.ForeColor = vbRed
MyLbl.Font.Bold = True
MyLbl.Caption = "Yeni bir etiket daha ... " & "(" & MyLbl.Name & ")"
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
LblTop = 0
LblID = 0
End Sub
----------kod bitir------
----------kod basla------
'* ******************************************************************************
'* Notes: *
'* 1) The code DOES NOT require any references for ADO *
'* 2) a) The code is based on the info supplied at the below links: *
'* http://www.erlandsendata.no/english/index.php?d=envbadacimportwbado *
'* http://j-walk.com/ss/excel/tips/tip54.htm *
'* b) Small modifications are done so that; the source range on any sheet *
' that you define, can be handled. *
'* 3) The source range must have column headers (labels). *
'* 4) Requires Office2000 or later, because of the CopyFromRecordset method. *
'********************************************************************************
Dim NewSh
'
Const SourceFile As String = "C:\Temp\Test.xls"
Const SourceSheet As String = "Sheet1"
Const SourceRange As String = "D1:H5000"
'
Private Sub CommandButton1_Click()
Dim MyArr
Dim Start As Double, Finnish As Double
Start = Timer
If SheetExists("DataSheet") = True Then
Application.DisplayAlerts = False
Sheets("DataSheet").Delete
Application.DisplayAlerts = True
End If
Set NewSh = Sheets.Add(After:=Sheets(Sheets.Count))
NewSh.Name = "DataSheet"
NewSh.Visible = False
Call GetDataFromClosedWorkbook(SourceFile, SourceRange)
ListBox1.ColumnCount = 5
MyArr = Sheets("DataSheet").Range("A1:E5000").Value
ListBox1.List = MyArr
Application.DisplayAlerts = False
NewSh.Delete
Application.DisplayAlerts = True
Finnish = Timer
MsgBox "ListBox is loaded in " & Format(Finnish - Start, "00") & " seconds !"
End Sub
'
Private Sub GetDataFromClosedWorkbook(SourceFile As String, SourceRange As String)
Dim dbConnection As Object, rs As Object
Dim dbConnectionString As String
Set dbConnection = CreateObject("ADODB.Connection")
Set rst = CreateObject("ADODB.recordset")
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For i = 6 To 65536
If TextBox1.Value = "" Or TextBox2.Value = "" Then
Uyar�1.Show
Exit Sub
End If
If Range("C" & "" & i).Value = "" Then
If TextBox1.Text <> "" Then Range("C" & "" & i).Value = TextBox1
If TextBox2.Text <> "" Then Range("D" & "" & i).Value = TextBox2
If TextBox3.Text <> "" Then Range("E" & "" & i).Value = TextBox3
If TextBox4.Text <> "" Then Range("F" & "" & i).Value = TextBox4
If TextBox5.Text <> "" Then Range("G" & "" & i).Value = TextBox5
If TextBox6.Text <> "" Then Range("h" & "" & i).Value = TextBox6 * 1
If TextBox7.Text <> "" Then Range("I" & "" & i).Value = TextBox7
If TextBox8.Text <> "" Then Range("J" & "" & i).Value = TextBox8
If TextBox9.Text <> "" Then Range("K" & "" & i).Value = TextBox9
If TextBox10.Text <> "" Then Range("L" & "" & i).Value = TextBox10 * 1
If TextBox11.Text <> "" Then Range("M" & "" & i).Value = TextBox11
If TextBox12.Text <> "" Then Range("N" & "" & i).Value = TextBox12
If TextBox13.Text <> "" Then Range("O" & "" & i).Value = TextBox13 * 1
If TextBox14.Text <> "" Then Range("P" & "" & i).Value = TextBox14
If TextBox15.Text <> "" Then Range("Q" & "" & i).Value = TextBox15
If TextBox16.Text <> "" Then Range("R" & "" & i).Value = TextBox16
Exit For
End If
Next i
Unload Me
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub combobox1_Click()
Dim t As Range
For Each t In Range("c6:c1000")
If t = ComboBox1 Then
TextBox1 = t.Offset(0, 0)
TextBox2 = t.Offset(0, 1)
TextBox3 = t.Offset(0, 2)
TextBox4 = t.Offset(0, 3)
TextBox5 = t.Offset(0, 4)
TextBox6 = t.Offset(0, 5)
TextBox7 = t.Offset(0, 6)
TextBox8 = t.Offset(0, 7)
TextBox9 = t.Offset(0, 8)
TextBox10 = t.Offset(0, 9)
TextBox11 = t.Offset(0, 10)
TextBox12 = t.Offset(0, 11)
TextBox13 = t.Offset(0, 12)
TextBox14 = t.Offset(0, 13)
TextBox15 = t.Offset(0, 14)
TextBox16 = t.Offset(0, 15)
TextBox17 = t.Offset(0, 16)
TextBox18 = t.Offset(0, 17)
TextBox19 = t.Offset(0, 18)
TextBox20 = t.Offset(0, 19)
End If
Next
End Sub
End Sub
End If
Next
End Sub
Private Sub CommandButton3_Click()
End Sub
----------kod bitir------
----------kod basla------
'
Application.GoTo Reference:="Makro1"
End Sub
Function yaz$(sayi)
Dim b$(9)
Dim Y$(9)
Dim m$(4)
Dim v(15)
Dim c(3)
b$(0) = ""
b$(1) = "Bir"
b$(2) = "�ki"
b$(3) = "��"
b$(4) = "D�rt"
b$(5) = "Be�"
b$(6) = "Alt�"
b$(7) = "Yedi"
b$(8) = "Sekiz"
b$(9) = "Dokuz"
Y$(0) = ""
Y$(1) = "On"
Y$(2) = "Yirmi"
Y$(3) = "Otuz"
Y$(4) = "K�rk"
Y$(5) = "Elli"
Y$(6) = "Altm�"
Y$(7) = "Yetmi�"
Y$(8) = "Seksen"
Y$(9) = "Doksan"
m$(0) = "Trilyon"
m$(1) = "Milyar"
m$(2) = "Milyon"
m$(3) = "Bin"
m$(4) = ""
a$ = Str(sayi)
For X = 1 To 15
v(X) = Val(Mid$(a$, X, 1))
Next X
s$ = ""
For X = 0 To 4
c(1) = v((X * 3) + 1)
c(2) = v((X * 3) + 2)
c(3) = v((X * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�z"
Else
e$ = b$(c(1)) + "Y�z"
End If
e$ = e$ + Y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(X)
If (X = 3) And (e$ = "BirBin") Then e$ = "Bin"
s$ = s$ + e$
Next X
yaz$ = s$
GoTo tamam
hata: yaz$ = "Hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Sub tt()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton4_Click()
Unload Me
Unload �ek
Unload Ckayd�
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton4_Click()
Unload Me
End Sub
End Sub
----------kod bitir------
----------kod basla------
Public Const NERR_Success = 0&
Public Const NERR_Access_Denied = 5&
Public Const NERR_MoreData = 234&
Public Const SRV_TYPE_SERVER = &H2
Public Const SRV_TYPE_SQLSERVER = &H4
Public Const SRV_TYPE_NT_PDC = &H8
Public Const SRV_TYPE_NT_BDC = &H10
Public Const SRV_TYPE_PRINT = &H200
Public Const SRV_TYPE_NT = &H1000
Public Const SRV_TYPE_ALL = &HFFFF
Public Const SRV_TYPE_RAS = &H400
Public Const SHORT_LEVEL = 10&
Public Const EXTENDED_LEVEL = 3&
Public Const USER_ACC_NOPWD_CHANGE = 577&
Public Const USER_ACC_NOPWD_EXPIRE = 66049
Public Const USER_ACC_DISABLED = 515&
Public Const USER_ACC_LOCKED = 529&
Private Type SERVER_INFO_API
PlatformId As Long
ServerName As Long
Type As Long
VerMajor As Long
VerMinor As Long
Comment As Long
End Type
Private Type WKSTA_INFO_API
PlatformId As Long
ComputerName As Long
LanGroup As Long
VerMajor As Long
VerMinor As Long
LanRoot As Long
End Type
Type ServerInfo
PlatformId As Long
ServerName As String
Type As Long
VerMajor As Long
VerMinor As Long
Comment As String
Platform As String
ServerType As Integer
LanGroup As String
LanRoot As String
End Type
Type ListOfServer
Init As Boolean
LastErr As Long
List() As ServerInfo
End Type
Private Type USER_INFO_EXT_API
Name As Long
Password As Long
PasswordAge As Long
Privilege As Long
HomeDir As Long
Comment As Long
Flags As Long
ScriptPath As Long
AuthFlags As Long
FullName As Long
UserComment As Long
Parms As Long
Workstations As Long
LastLogon As Long
LastLogoff As Long
AcctExpires As Long
MaxStorage As Long
UnitsPerWeek As Long
LogonHours As Long
BadPwCount As Long
NumLogons As Long
LogonServer As Long
CountryCode As Long
CodePage As Long
UserID As Long
PrimaryGroupID As Long
Profile As Long
HomeDirDrive As Long
PasswordExpired As Long
End Type
Type UserInfoExt
Name As String
Password As String
PasswordAge As String
Privilege As Long
HomeDir As String
Comment As String
Flags As Long
NoChangePwd As Boolean
NoExpirePwd As Boolean
AccDisabled As Boolean
AccLocked As Boolean
ScriptPath As String
AuthFlags As Long
FullName As String
UserComment As String
Parms As String
Workstations As String
LastLogon As Date
LastLogoff As Date
AcctExpires As Date
MaxStorage As Long
UnitsPerWeek As Long
LogonHours(0 To 20) As Byte
BadPwCount As Long
NumLogons As Long
LogonServer As String
CountryCode As Long
CodePage As Long
UserID As Long
PrimaryGroupID As Long
Profile As String
HomeDirDrive As String
PasswordExpired As Boolean
End Type
Type ListOfUserExt
Init As Boolean
LastErr As Long
List() As UserInfoExt
End Type
Public Declare Sub CopyMem Lib "kernel32" Alias "RtlMoveMemory" (pTo As Any, uFrom
As Any, ByVal lSize As Long)
Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Long) As Long
Declare Function NetApiBufferFree Lib "netapi32" (ByVal lBuffer&) As Long
Declare Function NetGetDCName Lib "netapi32" (lpServer As Any, lpDomain As Any,
vBuffer As Any) As Long
Declare Function NetServerEnum Lib "netapi32" (lpServer As Any, ByVal lLevel As
Long, vBuffer As Any, lPreferedMaxLen As Long, lEntriesRead As Long, lTotalEntries
As Long, _
ByVal lServerType As Long, ByVal sDomain$, vResume As Any) As Long
Declare Function NetUserEnum Lib "netapi32" (lpServer As Any, ByVal Level As Long,
ByVal Filter As Long, lpBuffer As Long, _
ByVal PrefMaxLen As Long, lpEntriesRead As Long, lpTotalEntries As Long,
lpResumeHandle As Long) As Long
Public CurrentServer As String
Public Function EnumServer(lServerType As Long) As ListOfServer
Dim nRet As Long, x As Integer, i As Integer
Dim lRetCode As Long
Dim tServerInfo As SERVER_INFO_API
Dim lServerInfo As Long
Dim lServerInfoPtr As Long
Dim ServerInfo As ServerInfo
Dim lPreferedMaxLen As Long
Dim lEntriesRead As Long
Dim lTotalEntries As Long
Dim sDomain As String
Dim vResume As Variant
Dim yServer() As Byte
Dim SrvList As ListOfServer
nRet = NERR_MoreData
Do While (nRet = NERR_MoreData)
x = 1
lServerInfoPtr = lServerInfo
ServerInfo.Comment = PointerToStringW(tServerInfo.Comment)
ServerInfo.ServerName = PointerToStringW(tServerInfo.ServerName)
ServerInfo.Type = tServerInfo.Type
ServerInfo.PlatformId = tServerInfo.PlatformId
ServerInfo.VerMajor = tServerInfo.VerMajor
ServerInfo.VerMinor = tServerInfo.VerMinor
i = i + 1
ReDim Preserve SrvList.List(1 To i) As ServerInfo
SrvList.List(i) = ServerInfo
x = x + 1
lServerInfoPtr = lServerInfoPtr + Len(tServerInfo)
Loop
lRetCode = NetApiBufferFree(lServerInfo)
SrvList.Init = (x > 1)
Loop
EnumServer = SrvList
End Function
Public Function GetPDCName() As String
Dim lpBuffer As Long, nRet As Long
Dim yServer() As Byte
Dim sLocal As String
If nRet = 0 Then
sLocal = PointerToStringW(lpBuffer)
End If
GetPDCName = sLocal
End Function
nRet = NERR_MoreData
Do While (nRet = NERR_MoreData)
nRet = NetUserEnum(yServer(0), EXTENDED_LEVEL, 2, lUserInfo, PrefMaxLen,
nRead, nTotal, nResume)
lUserInfoPtr = lUserInfo
x = 1
Do While x <= nRead
UserInfo.Name = PointerToStringW(tUserInfo.Name)
UserInfo.Password = PointerToStringW(tUserInfo.Password)
UserInfo.PasswordAge = Format(tUserInfo.PasswordAge / 86400, "0.0")
UserInfo.Privilege = tUserInfo.Privilege
UserInfo.HomeDir = PointerToStringW(tUserInfo.HomeDir)
UserInfo.Comment = PointerToStringW(tUserInfo.Comment)
UserInfo.Flags = tUserInfo.Flags
UserInfo.NoChangePwd = CBool((tUserInfo.Flags Or USER_ACC_NOPWD_CHANGE)
= tUserInfo.Flags)
UserInfo.NoExpirePwd = CBool((tUserInfo.Flags Or USER_ACC_NOPWD_EXPIRE)
= tUserInfo.Flags)
UserInfo.AccDisabled = CBool((tUserInfo.Flags Or USER_ACC_DISABLED) =
tUserInfo.Flags)
UserInfo.AccLocked = CBool((tUserInfo.Flags Or USER_ACC_LOCKED) =
tUserInfo.Flags)
UserInfo.ScriptPath = PointerToStringW(tUserInfo.ScriptPath)
UserInfo.AuthFlags = tUserInfo.AuthFlags
UserInfo.FullName = PointerToStringW(tUserInfo.FullName)
UserInfo.UserComment = PointerToStringW(tUserInfo.UserComment)
UserInfo.Parms = PointerToStringW(tUserInfo.Parms)
UserInfo.Workstations = PointerToStringW(tUserInfo.Workstations)
UserInfo.LastLogon = NetTimeToVbTime(tUserInfo.LastLogon)
UserInfo.LastLogoff = NetTimeToVbTime(tUserInfo.LastLogoff)
If tUserInfo.AcctExpires = -1& Then
UserInfo.AcctExpires = NetTimeToVbTime(0)
Else
UserInfo.AcctExpires = NetTimeToVbTime(tUserInfo.AcctExpires)
End If
UserInfo.MaxStorage = tUserInfo.MaxStorage
UserInfo.UnitsPerWeek = tUserInfo.UnitsPerWeek
CopyMem UserInfo.LogonHours(0), ByVal tUserInfo.LogonHours, 21
UserInfo.BadPwCount = tUserInfo.BadPwCount
UserInfo.NumLogons = tUserInfo.NumLogons
UserInfo.LogonServer = PointerToStringW(tUserInfo.LogonServer)
UserInfo.CountryCode = tUserInfo.CountryCode
UserInfo.CodePage = tUserInfo.CodePage
UserInfo.UserID = tUserInfo.UserID
UserInfo.PrimaryGroupID = tUserInfo.PrimaryGroupID
UserInfo.Profile = PointerToStringW(tUserInfo.Profile)
UserInfo.HomeDirDrive = PointerToStringW(tUserInfo.HomeDirDrive)
UserInfo.PasswordExpired = CBool(tUserInfo.PasswordExpired)
i = i + 1
ReDim Preserve UserList.List(1 To i) As UserInfoExt
UserList.List(i) = UserInfo
x = x + 1
Loop
lRetCode = NetApiBufferFree(lUserInfo)
UserList.Init = (x > 1)
Loop
LongEnumUsers = UserList
End Function
Public Function MakeServerName(ByVal ServerName As String)
Dim yServer() As Byte
End Function
Public Function NetError(nErr As Long, Optional Ret) As String
Dim Msg As String
End Function
Public Function NetTimeToVbTime(NetDate As Long) As Double
Const BaseDate# = 25569
Const SecsPerDay# = 86400
Dim Tmp As Double
End Function
Public Function PointerToStringW(lpStringW As Long) As String
Dim buffer() As Byte
Dim nLen As Long
If lpStringW Then
nLen = lstrlenW(lpStringW) * 2
If nLen Then
ReDim buffer(0 To (nLen - 1)) As Byte
CopyMem buffer(0), ByVal lpStringW, nLen
PointerToStringW = buffer
End If
End If
End Function
Sub Listele()
Dim intIDX As Integer
Dim ServerList As ListOfServer
ServerList = EnumServer(SRV_TYPE_ALL)
If ServerList.Init Then
For intIDX = 1 To UBound(ServerList.List)
Cells(intIDX, 1) = ServerList.List(intIDX).Comment
Next
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub Userform_Initialize()
Dim intIDX As Integer
Dim ServerList As ListOfServer
ListBox1.Clear
ServerList = EnumServer(SRV_TYPE_ALL)
If ServerList.Init Then
For intIDX = 1 To UBound(ServerList.List)
ListBox1.AddItem ServerList.List(intIDX).ServerName
Next
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
ara = ComboBox1.Value
alan = Sheets("sayfa1").Range("a1:k300")
Label6.Caption = Application.WorksheetFunction.VLookup(ara, alan, 4, 0)
Label5.Caption = Application.WorksheetFunction.VLookup(ara, alan, 3, 0)
Label4.Caption = Application.WorksheetFunction.VLookup(ara, alan, 2, 0)
End Sub
Private Sub ComboBox2_Click()
On Error Resume Next
If ComboBox2.Value = "2'lik mer." Then sutno = 6
If ComboBox2.Value = "3'l�k mer." Then sutno = 7
If ComboBox2.Value = "4'l�k mer." Then sutno = 8
sat = Sheets("sayfa1").Columns(1).Find(ComboBox1.Value).Row
Label8 = Sheets("sayfa1").Cells(sat, 5).Value
Label9 = Sheets("sayfa1").Cells(sat, sutno).Value
End Sub
End Sub
End Sub
End Sub
Case "TAH�NL�":
ListBox4.AddItem
ListBox4.List(i, 0) = TextBox3.Text
ListBox4.List(i, 2) = ComboBox2.Value
ListBox4.List(i, 1) = ComboBox3.Value
ListBox4.List(i, 3) = Label37.Caption
ListBox4.List(i, 4) = (TextBox3) * (Label37)
Case "BAZLAMA":
ListBox4.AddItem
ListBox4.List(i, 0) = TextBox3.Text
ListBox4.List(i, 2) = ComboBox2.Value
ListBox4.List(i, 1) = ComboBox3.Value
ListBox4.List(i, 3) = Label38.Caption
ListBox4.List(i, 4) = (TextBox3) * (Label38)
Case "YUFKA":
ListBox4.AddItem
ListBox4.List(i, 0) = TextBox3.Text
ListBox4.List(i, 1) = ComboBox3.Value
ListBox4.List(i, 2) = ComboBox2.Value
ListBox4.List(i, 3) = Label39.Caption
ListBox4.List(i, 4) = (TextBox3) * (Label39)
End Select
i = i + 1
End Sub
End If
ListBox4.RemoveItem ListBox4.ListIndex
End Sub
End Sub
End Sub
ListBox4.ColumnHeads = True
ListBox4.ColumnCount = 5
ListBox4.ColumnWidths = "60,60,230,80,90"
ComboBox1.RowSource = "firmabilgileri!A2:A300"
ComboBox2.RowSource = "firmabilgileri!Z2:Z7"
ComboBox3.RowSource = "firmabilgileri!K2:K7"
End Sub
----------kod bitir------
----------kod basla------
Sub kapa()
Application.ScreenUpdating = False
sat = Cells(4, 1).End(xlDown).Row
For Each rw In Range(Cells(sat + 1, 1), Cells(198, 8))
rw.EntireRow.Hidden = True
Next
Application.ScreenUpdating = True
End Sub
Sub ac()
Application.ScreenUpdating = False
Range("liste").EntireRow.Hidden = False
Application.ScreenUpdating = True
End Sub
Sub PlakaSirala()
Application.Goto Reference:="liste"
Selection.Sort Key1:=Range("B4"), Order1:=xlAscending
Cells(4, 1).Select
End Sub
Sub isle()
Application.ScreenUpdating = False
sat = Cells(4, 1).End(xlDown).Row
gun = Day(Cells(1, 1)) + 4
For k = 4 To sat
For t = 3 To 300
If Cells(k, 2) = Worksheets("Ayl�k �cmal").Cells(t, 1) Then
Worksheets("Ayl�k �cmal").Cells(t, gun) = Cells(k, 4) + Cells(k, 5) + Cells(k,
6)
End If
Next t
Next k
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Sub Se�enekD��mesi9_T�klat()
Range("B7").Formula = "=""EK TABLO: PROJEL� DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
Sub Se�enekD��mesi10_T�klat()
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da ""&upper(C3)&""
���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
'
' Macro2 Macro
' Macro recorded 19.06.2003 by Ayhan
'
'
Dim urun, proje, mevcut, mevcuta, mevcutb
urun = LCase(Range("C3").Value)
proje = LCase(Range("H2").Value)
mevcut = LCase(Range("G2").Value)
Range("A3:P53").Select
Selection.Copy
Range("a1").Select
If Range("b1").Value = 2 And Range("c3").Value <> "" And urun <> mevcut Then
Application.ScreenUpdating = False
Sheets("MEVMAL").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F6:N26").Select
Selection.Sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
ElseIf Range("b1").Value = 1 And Range("c3").Value <> "" And urun <> proje Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F29:N49").Select
Selection.Sort Key1:=Range("F29"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
End If
Sheets("MGIRISI").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown21_Change()
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
'Columns("C:C").Select
Cells.Find(What:=mevcut, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("A3").Select
Application.CutCopyMode = False
Sheets("PMALIYET").Select
'Columns("C:C").Select
Cells.Find(What:=proje, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("MGIRISI").Select
Range("A3").Select
Application.CutCopyMode = False
End If
Range("D1").Value = ""
End Sub
Sub UrunSil()
'
' Macro4 Macro
' Macro recorded 26.06.2003 by Ayhan
'
'
Dim urun, mevcut, proje, ilkhucre, sonhucre
urun = Range("C3")
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
Sheets("VERI_GIRISI").Select
Sheets("MGIRISI").Select
Range("A3").Select
Sheets("PMALIYET").Select
Sheets("MGIRISI").Select
Range("A3").Select
Else: MsgBox ("Daha �nce b�yle bir �r�n girilmedi.")
End If
Range("C1").Value = ""
End Sub
Sub TabloSil()
Application.ScreenUpdating = False
Sheets("MGIRISI").Select
Range("C3:C6,H3:H6,C30:C43,D10:H51, F10:H51, M10:N51").Select
Selection.ClearContents
Range("C1").Value = ""
Range("C1").Value = ""
Range("a3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown25_Change()
'
' aktar Macro
' Macro recorded 13.06.2003 by Ayhan
'
Dim sil
Dim i As Integer
Dim ss As Integer
Application.Run "TabloSil"
urun = Range("d1").Value
urunad = Range("c3").Value
Worksheets("DONE_GIRIS").Select
Do
i = 1
For i = 1 To 225
Worksheets("MGIRISI").Select
Range("C3").Value = urun2
Range("C1").Value = ""
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub deg�st�r()
Cells.Replace What:="$", Replacement:="L", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
End Sub
Sub S�rala_Sayfa()
Dim i As Integer
Dim j As Integer
If Worksheets.Count = 1 Then Exit Sub
For i = 1 To Worksheets.Count - 1
For j = i + 1 To Worksheets.Count
If Worksheets(j).Name < Worksheets(i).Name Then
Worksheets(j).Move before:=Worksheets(i)
End If
Next j
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub ListBox1_Click()
If ListBox1.ListIndex = -1 Then
CommandButton1.Enabled = False
Else
CommandButton1.Enabled = True
End If
Label1.Caption = UCase(ListBox1.Value)
End Sub
'
Private Sub UserForm_Initialize()
Dim i As Integer
Dim j As Integer
Label1.Caption = ""
Option Base 1
----------kod bitir------
----------kod basla------
Sub FrmAc()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Sub FrmAc()
UserForm1.Show
End Sub
'
Sheets("personel").Select
Application.GoTo Reference:="PERSONEL"
Selection.Find(What:="aa", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Sheets("�sim listesi").Select
Range("D22").Select
ActiveCell.FormulaR1C1 = "7"
Range("D23").Select
End Sub
----------kod bitir------
----------kod basla------
Sub ListeKutusu9_De�i�tir()
'
' ListeKutusu9_De�i�tir Makro
' Makro metin taraf�ndan 23.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("W12").Select
End Sub
Sub A��lan12_De�i�tir()
'
' A��lan12_De�i�tir Makro
' Makro metin taraf�ndan 23.03.2005 tarihinde kaydedildi.
'
'
Range("D15").Select
Sheets("Sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
[a2:i65536].ClearContents
For s = 1 To 12
satsay = Sheets("sayfa" & s).Cells(65536, 8).End(xlUp).Row
For ara = 3 To satsay
If Sheets("sayfa" & s).Cells(ara, 8).Value <> 0 Then
c = c + 1
For sut = 1 To 8
Cells(c + 1, 1) = Sheets("sayfa" & s).[c1].Value
Cells(c + 1, sut + 1) = Sheets("sayfa" & s).Cells(ara, sut).Value
Next
End If
Next
Next
End Sub
----------kod bitir------
----------kod basla------
Next
End Sub
----------kod bitir------
----------kod basla------
Sub ALANKODUEKLE()
ActiveCell.FormulaR1C1 = "=212&RC[-1]"
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
Sub Makro2()
Range("H13:I13").Select
Selection.AutoFill Destination:=Range("H13:I14"), Type:=xlFillDefault
Range("H13:I14").Select
End Sub
Sub Auto_Open()
UserForm3.Show
Sheets("DATA").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Sheets("DATA").Select
Range("C4").Value = TextBox1.Value
Range("C5").Value = TextBox2.Value
Range("C6").Value = TextBox3.Value
Range("C7").Value = TextBox4.Value
Range("C8").Value = TextBox5.Value
Range("C9").Value = TextBox6.Value
Range("C10").Value = TextBox7.Value
Range("E3").Value = TextBox12.Value
Range("H4").Value = TextBox8.Value
Range("H6").Value = TextBox9.Value
Range("H8").Value = TextBox10.Value
Range("H10").Value = TextBox11.Value
Sheets("DATA").Select
Sheets("DATA").Copy Before:=Sheets(3)
ActiveSheet.Name = Worksheets("DATA").Range("E3").Text
Sheets("DATA").Select
Range("u4").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
If Range("u4").Value = "" Then
Range("u4").Value = 1
Else
ActiveCell.Value = ActiveCell.Offset(-1, 0).Value + 1
End If
ActiveCell.Offset(0, 1).Value = TextBox12.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox11.Value = ""
TextBox12.Value = ""
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
TextBox12.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("�irketler").Select
Dim sayfa As String
BAK�YE = ActiveSheet.Name
For i = 1 To Worksheets.Count
If Worksheets(i).Name = sayfa Then GoTo devam
Sheets(BAK�YE).Range("b" & i) = Worksheets(i).Range("C11")
Sheets(BAK�YE).Range("a" & i) = Worksheets(i).Name
devam:
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Sheets("DATA").Select
Range("C4").Value = TextBox1.Value
Range("C5").Value = TextBox2.Value
Range("C6").Value = TextBox3.Value
Range("C7").Value = TextBox4.Value
Range("C8").Value = TextBox5.Value
Range("C9").Value = TextBox6.Value
Range("C10").Value = TextBox7.Value
Range("E3").Value = TextBox12.Value
Range("H4").Value = TextBox8.Value
Range("H6").Value = TextBox9.Value
Range("H8").Value = TextBox10.Value
Range("H10").Value = TextBox11.Value
Sheets("DATA").Select
Sheets("DATA").Copy Before:=Sheets(3)
ActiveSheet.Name = Worksheets("DATA").Range("E3").Text
Sheets("DATA").Select
Range("u4").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
If Range("u4").Value = "" Then
Range("u4").Value = 1
Else
ActiveCell.Value = ActiveCell.Offset(-1, 0).Value + 1
End If
ActiveCell.Offset(0, 1).Value = TextBox12.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox11.Value = ""
TextBox12.Value = ""
Application.ScreenUpdating = True
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
TextBox12.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("�irketler").Select
Dim sayfa As String
BAK�YE = ActiveSheet.Name
For i = 1 To Worksheets.Count
If Worksheets(i).Name = sayfa Then GoTo devam
Sheets(BAK�YE).Range("b" & i) = Worksheets(i).Range("C11")
Sheets(BAK�YE).Range("a" & i) = Worksheets(i).Name
devam:
Next
End Sub
RegExp.Global = True
RegExp2.Global = True
RegExp.Pattern = "[0-9]"
RegExp2.Pattern = "[^0-9]"
----------kod bitir------
----------kod basla------
Sub Macro1()
Application.CutCopyMode = False
Static b
If b = "" Then b = InputBox("hangi sat�rdan ba�lim")
Range("B2:D2").Select
Selection.Copy
b = b + 1
Cells(b, 10).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = True
End Sub
----------kod bitir------
----------kod basla------
Sub alt�s�f�rat()
For a = 1 To WorksheetFunction.CountA(Sheets("Sayfa1").Range("A:A"))
Cells(a, 1) = Cells(a, 1) / 1000000
Cells(a, 1).NumberFormat = "General"
Next a
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub StartList()
Dim R As Range
ActiveSheet.UsedRange.ClearContents
Set R = Range("A3")
ListCtrls Application.CommandBars.ActiveMenuBar, R
End Sub
Dim C As Office.CommandBarControl
Static S As String
Dim Pos As Integer
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
If Sheets("SORUL�STES�").[a1] = 1 Then Exit Sub
Application.Visible = False
UserForm1.Show
End Sub
Sub formac()
UserForm2.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("SORUL�STES�").[a1] = 1
On Error GoTo son:
ActiveWorkbook.SaveAs Filename:="C:\s�nav\" & TextBox1.Value
isim = 1
Application.Visible = True
Unload Me
Sheets("cevap").Select
UserForm2.Show
GoTo 10
son: MsgBox "HATALI �S�M G�R��� TEKRAR DENEY�N�Z"
10 End Sub
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As
Integer, ByVal X As Single, ByVal Y As Single)
If TextBox1.Value = "" Then CommandButton1.Enabled = False
End Sub
Private Sub TextBox1_Change()
CommandButton1.Enabled = True
End Sub
Private Sub UserForm_Initialize()
CommandButton1.Enabled = False
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode <> 1 Then Cancel = True
End Sub
----------kod bitir------
----------kod basla------
Dim sat, sat1, soru As Integer
Private Sub OptionButton1_Click()
soru = TextBox1.Value * 1
If OptionButton1.Value = True Then bul = "a"
sat1 = Sheets("cevap").Columns(1).Find(soru).Row
Sheets("cevap").Cells(sat1, 2) = bul
End Sub
Private Sub OptionButton2_Click()
soru = TextBox1.Value * 1
If OptionButton2.Value = True Then bul = "b"
sat1 = Sheets("cevap").Columns(1).Find(soru).Row
Sheets("cevap").Cells(sat1, 2) = bul
End Sub
Private Sub OptionButton3_Click()
soru = TextBox1.Value * 1
If OptionButton3.Value = True Then bul = "c"
sat1 = Sheets("cevap").Columns(1).Find(soru).Row
Sheets("cevap").Cells(sat1, 2) = bul
End Sub
Private Sub OptionButton4_Click()
soru = TextBox1.Value * 1
If OptionButton4.Value = True Then bul = "d"
sat1 = Sheets("cevap").Columns(1).Find(soru).Row
Sheets("cevap").Cells(sat1, 2) = bul
End Sub
Private Sub SpinButton1_Change()
TextBox1 = SpinButton1.Value
End Sub
Private Sub TextBox1_Change()
On Error GoTo son
sat = Sheets("SORUL�STES�").Columns(1).Find(TextBox1.Value & ".").Row
Label2 = "SORU " & TextBox1.Value & ":"
Label1 = Sheets("SORUL�STES�").Cells(sat, 2).Value
OptionButton1.Caption = Sheets("SORUL�STES�").Cells(sat + 1, 2).Value
OptionButton2.Caption = Sheets("SORUL�STES�").Cells(sat + 2, 2).Value
OptionButton3.Caption = Sheets("SORUL�STES�").Cells(sat + 3, 2).Value
OptionButton4.Caption = Sheets("SORUL�STES�").Cells(sat + 4, 2).Value
Sheets("cevap").Cells(TextBox1.Value * 1 + 1, 2).Select
If ActiveCell.Offset(0, 0) = "a" Then OptionButton1.Value = True
If ActiveCell.Offset(0, 0) = "b" Then OptionButton2.Value = True
If ActiveCell.Offset(0, 0) = "c" Then OptionButton3.Value = True
If ActiveCell.Offset(0, 0) = "d" Then OptionButton4.Value = True
Label3 = TextBox1.Value & " NOLU SORUDA " & ActiveCell.Offset(0, 0).Value & " �IKKI
��ARETL�D�R"
If ActiveCell.Offset(0, 0) = "" Then
For no = 1 To 4
UserForm2.Controls("optionbutton" & no).Value = False
Next no
Label3 = TextBox1.Value & " NOLU SORU HEN�Z ��ARETLENMEM��"
End If
Exit Sub
son: MsgBox ("SORU BULUNAMADI")
End Sub
Private Sub UserForm_Initialize()
TextBox1.Value = 1
say = WorksheetFunction.CountA(Sheets("SORUL�STES�").Columns(1))
SpinButton1.Min = 1
SpinButton1.Max = say
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon1()
ActiveSheet.Shapes("WordArt 1").Select
m = 1
For i = 1 To 20
Selection.ShapeRange.TextEffect.Tracking = m
m = m + 0.1
DoEvents
Next i
For i = 20 To 1 Step -1
Selection.ShapeRange.TextEffect.Tracking = m
m = m - 0.1
DoEvents
Next i
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon2()
ActiveSheet.Shapes("WordArt 1").Select
For i = 1 To 36
Selection.ShapeRange.IncrementRotation 10#
DoEvents
Next i
[A1].Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon3()
ActiveSheet.Shapes("WordArt 2").Select
m = 20
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeCurveUp
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeCurveDown
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeButtonCurve
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeButtonPour
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeDeflateInflate
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = _
msoTextEffectShapeDeflateInflateDeflate
Next i
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapePlainText
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon4()
Range("E16").Value = "AN�MASYON BA�LADI"
ActiveSheet.Shapes("WordArt 1").Select
m = 20
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeCurveDown
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 2
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Line.ForeColor.SchemeColor = 12
Selection.ShapeRange.Line.Visible = msoTrue
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeCurveUp
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 12
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 13
Selection.ShapeRange.Line.Visible = msoTrue
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeCurveDown
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 2
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Line.ForeColor.SchemeColor = 12
Selection.ShapeRange.Line.Visible = msoTrue
Next i
For i = 1 To m
Selection.ShapeRange.TextEffect.PresetShape = msoTextEffectShapeCurveUp
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 12
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.SchemeColor = 13
Selection.ShapeRange.Line.Visible = msoTrue
Next i
For i = 1 To 1000
Range("e16").Value = "AN�MASYON B�TT�"
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon5()
ActiveSheet.Shapes("Wordart 1").Select
For j = 1 To 2
m = 0.1
For i = 1 To 50
Selection.ShapeRange.Line.Weight = m
m = m + 0.1
DoEvents
Next i
For i = 1 To 50
Selection.ShapeRange.Line.Weight = m
m = m - 0.1
DoEvents
Next i
Next j
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon6()
ActiveSheet.Shapes("Resim 1").Select
m = 200
For i = 1 To 330
Selection.ShapeRange.Left = m
m = m + 0.75
DoEvents
Next i
For i = 1 To 580
Selection.ShapeRange.Left = m
m = m - 0.75
DoEvents
Next i
For i = 1 To 250
Selection.ShapeRange.Left = m
m = m + 0.75
DoEvents
Next i
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon7()
ActiveSheet.Shapes("Sekil_2").Select
m = 0
For i = 1 To 500
Selection.ShapeRange.Rotation = m
m = m + 10
DoEvents
Next i
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon8()
ActiveSheet.Shapes("Grup 5").Select
m = 200
For i = 1 To 600
Selection.ShapeRange.Top = m
m = m - 0.2
DoEvents
Next i
For i = 1 To 600
Selection.ShapeRange.Top = m
m = m + 0.2
DoEvents
Next i
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon9()
ActiveSheet.Shapes("oval 1").Select
m = 0
For i = 1 To 90
Selection.ShapeRange.ThreeD.RotationY = m
m = m - 1
DoEvents
Next i
For i = 1 To 180
Selection.ShapeRange.ThreeD.RotationY = m
m = m + 1
DoEvents
Next i
For i = 1 To 90
Selection.ShapeRange.ThreeD.RotationY = m
m = m - 1
DoEvents
Next i
For i = 1 To 90
Selection.ShapeRange.ThreeD.RotationX = m
m = m - 1
DoEvents
Next i
For i = 1 To 180
Selection.ShapeRange.ThreeD.RotationX = m
m = m + 1
DoEvents
Next i
For i = 1 To 90
Selection.ShapeRange.ThreeD.RotationX = m
m = m - 1
DoEvents
Next i
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub D��me4_T�klat()
Randomize
[A1].Value = Int((6 * Rnd) + 1)
For j = 1 To [A1].Value
ActiveSheet.Shapes("Dikdortgen").Select
m = 200
For i = 1 To 190
Selection.ShapeRange.Top = m
m = m - 1
DoEvents
Next i
For i = 1 To 190
Selection.ShapeRange.Top = m
m = m + 1
DoEvents
Next i
Next j
[A1].Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animaston11()
ActiveSheet.Shapes("Ok").Select
m = 0
For i = 1 To [a1].Value
Selection.ShapeRange.Width = m
Selection.ShapeRange.Height = t
m = m + 1
t = t + 0.1
r = r + 1
[B1].Value = r
DoEvents
Next i
For i = 1 To 400
Selection.ShapeRange.Width = m
Selection.ShapeRange.Height = t
m = m - 1
t = t - 0.07
r = r - 1
[B1].Value = r
DoEvents
Next i
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon12()
For i = 1 To 45
ActiveSheet.Shapes("Piston").Select
Selection.ShapeRange.IncrementLeft 1
DoEvents
Next i
For i = 1 To 180
ActiveSheet.Shapes("Tekerlek").Select
Selection.ShapeRange.IncrementLeft 1.5
Selection.ShapeRange.IncrementRotation 6
ActiveSheet.Shapes("Piston").Select
Selection.ShapeRange.IncrementLeft -1
DoEvents
Next i
For i = 1 To 100
ActiveSheet.Shapes("Tekerlek").Select
Selection.ShapeRange.IncrementTop -1.5
Selection.ShapeRange.IncrementRotation 6
DoEvents
Next i
For i = 1 To 180
ActiveSheet.Shapes("Tekerlek").Select
Selection.ShapeRange.IncrementLeft -1.5
Selection.ShapeRange.IncrementRotation 6
DoEvents
Next i
For i = 1 To 100
ActiveSheet.Shapes("Tekerlek").Select
Selection.ShapeRange.IncrementTop 1.5
Selection.ShapeRange.IncrementRotation 6
DoEvents
Next i
Range("a1").Select
End Sub
Sub D��me11_T�klat()
For i = 1 To 45
ActiveSheet.Shapes("Piston").Select
Selection.ShapeRange.IncrementLeft 1
DoEvents
Next i
For i = 1 To 45
ActiveSheet.Shapes("Piston").Select
Selection.ShapeRange.IncrementLeft -1
DoEvents
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon13()
ActiveSheet.Shapes("Ferman").Select
Selection.Characters.Delete
m = 0
For i = 1 To 140
Selection.ShapeRange.Width = m
Selection.ShapeRange.Adjustments.Item(1) = k
m = m + 1
k = k + 1
DoEvents
Next i
Selection.Characters.Text = Range("a1").Value
m = 0
For i = 1 To 250
Selection.ShapeRange.Adjustments.Item(1) = m
m = m + 0.001
DoEvents
Next i
For i = 1 To [A1].Value
k = k + 1
DoEvents
Next i
Selection.ShapeRange.Adjustments.Item(1) = 0
[A1].Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon15()
ActiveSheet.Shapes("progress").Select
m = 0
For i = 0 To 50
Selection.ShapeRange.Width = m
m = m + 2
[f11].Value = t
t = t + 1
For j = 1 To 20000
k = k + 1
Next j
DoEvents
Next i
For i = 51 To 100
Selection.ShapeRange.Width = m
m = m + 2
[f11].Value = t
t = t + 1
For j = 1 To 20000
k = k + 1
Next j
DoEvents
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon16()
For j = 1 To 4
ActiveSheet.Shapes("Grup 7").Select
M = 0
For i = 0 To 30
Selection.ShapeRange.Rotation = M
M = M + 1
DoEvents
Next i
For i = 0 To 60
Selection.ShapeRange.Rotation = M
M = M - 1
DoEvents
Next i
For i = 0 To 30
Selection.ShapeRange.Rotation = M
M = M + 1
DoEvents
Next i
Next j
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon17()
ActiveSheet.Shapes("ok").Select
m = 20
For i = 1 To 86
Selection.ShapeRange.Left = m
m = m + 5
DoEvents
Next i
r = 10
ActiveSheet.Shapes("yay").Select
For i = 1 To 10
Selection.ShapeRange.Width = r
r = r - 0.1
DoEvents
Next i
For i = 1 To 250
Range("h12").Value = "YA�ASIN HEDEF� VURDUM"
DoEvents
Next i
Selection.ShapeRange.Width = 40
ActiveSheet.Shapes("ok").Select
Selection.ShapeRange.Left = 20
Range("h12").Value = "HA B�SM�LLAH"
[a1].Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon18()
m = 110
k = 182
r = 210
For i = 1 To 100
ActiveSheet.Shapes("Kutle2").Select
Selection.ShapeRange.Top = m
m = m + 1
ActiveSheet.Shapes("Kutle1").Select
Selection.ShapeRange.Left = k
k = k + 1
Selection.ShapeRange.Top = r
r = r - 1
DoEvents
Next i
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon19()
m = 110
k = 183
r = 210
For i = 1 To 103
ActiveSheet.Shapes("kutle2").Select
Selection.ShapeRange.Top = m
m = m + 1
ActiveSheet.Shapes("kutle1").Select
Selection.ShapeRange.Left = k
k = k + 1
Selection.ShapeRange.Top = r
r = r - 1
ActiveSheet.Shapes("piston").Select
Selection.ShapeRange.IncrementLeft -0.75
DoEvents
Next i
For i = 1 To 32
ActiveSheet.Shapes("piston").Select
Selection.ShapeRange.IncrementLeft -0.75
ActiveSheet.Shapes("kutle2").Select
Selection.ShapeRange.IncrementLeft -0.75
DoEvents
Next i
For i = 1 To [a1].Value
Beep
Next i
For i = 1 To 32
ActiveSheet.Shapes("piston").Select
Selection.ShapeRange.IncrementLeft 0.75
ActiveSheet.Shapes("kutle2").Select
Selection.ShapeRange.IncrementLeft 0.75
DoEvents
Next i
For i = 1 To 103
ActiveSheet.Shapes("piston").Select
Selection.ShapeRange.IncrementLeft 0.75
ActiveSheet.Shapes("kutle2").Select
Selection.ShapeRange.Top = m
m = m - 1
ActiveSheet.Shapes("kutle1").Select
Selection.ShapeRange.Left = k
k = k - 1
Selection.ShapeRange.Top = r
r = r + 1
DoEvents
Next i
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Animasyon20()
For i = 1 To 100
ActiveSheet.Shapes("kutle1").Select
Selection.ShapeRange.IncrementTop 0.75
ActiveSheet.Shapes("Group 72").Select
Selection.ShapeRange.IncrementTop -0.75
ActiveSheet.Shapes("kutle2").Select
Selection.ShapeRange.IncrementTop 0.75
ActiveSheet.Shapes("Oval 4").Select
Selection.ShapeRange.IncrementTop -0.75
Selection.ShapeRange.IncrementRotation -40
ActiveSheet.Shapes("�izgi 73").Select
Selection.ShapeRange.IncrementTop -0.75
ActiveSheet.Shapes("�izgi 74").Select
Selection.ShapeRange.IncrementTop -0.75
ActiveSheet.Shapes("Oval 2").Select
Selection.ShapeRange.IncrementRotation -40
ActiveSheet.Shapes("Oval 3").Select
Selection.ShapeRange.IncrementRotation 40
DoEvents
Next i
For i = 1 To 100
ActiveSheet.Shapes("kutle1").Select
Selection.ShapeRange.IncrementTop -0.75
ActiveSheet.Shapes("Group 72").Select
Selection.ShapeRange.IncrementTop 0.75
ActiveSheet.Shapes("kutle2").Select
Selection.ShapeRange.IncrementTop -0.75
ActiveSheet.Shapes("Oval 4").Select
Selection.ShapeRange.IncrementTop 0.75
Selection.ShapeRange.IncrementRotation 40
ActiveSheet.Shapes("�izgi 73").Select
Selection.ShapeRange.IncrementTop 0.75
ActiveSheet.Shapes("�izgi 74").Select
Selection.ShapeRange.IncrementTop 0.75
ActiveSheet.Shapes("Oval 2").Select
Selection.ShapeRange.IncrementRotation 40
ActiveSheet.Shapes("Oval 3").Select
Selection.ShapeRange.IncrementRotation -40
DoEvents
Next i
Range("a1").Select
End Sub
Sub Donme()
For i = 1 To 720
ActiveSheet.Shapes("Oval 2").Select
Selection.ShapeRange.IncrementRotation -30
ActiveSheet.Shapes("Oval 3").Select
Selection.ShapeRange.IncrementRotation 30
ActiveSheet.Shapes("Group 21").Select
DoEvents
Next i
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
WebBrowser1.Navigate "about:<html><body scroll='no'><img
src='http://www.excel.web.tr/images/smiles/icon_hihoho.gif'></img></body></html>"
WebBrowser2.Navigate "http://www.excel.web.tr/images/smiles/icon_hihoho.gif"
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
MsgBox ("Anket Giri�ine �a�layabilirsiniz")
isim = InputBox("�sminizi girin")
yas = InputBox("L�tfen ya��n�z� girin:")
If yas < 18 Then GoTo son
takim = InputBox("Hangi Tak�ml�s�n�z")
MsgBox "Tebrikler Tak�mtutmay� biliyorsunuz!"
egitim = InputBox("E�itim Durmunuz")
MsgBox "Hala � BuLamad�n�z Annlas�lan!"
beyeni = InputBox("Nas�l Beyendinizmi")
MsgBox "Beyensend e Beyenmesende �imdilik Bu Kadar!"
say = WorksheetFunction.CountA(Sheets("Sheet2").[A1:A10000]) + 1
Sheets("Sheet2").Cells(say, 1) = isim
Sheets("Sheet2").Cells(say, 2) = yas
Exit Sub
son:
MsgBox "18'den b�y�k olmak zorundas�n�z!"
End Sub
----------kod bitir------
----------kod basla------
Sub S1_1()
Set S = Worksheets("S")
S.Cells(16, 10).Value = ""
S.Cells(16, 14).Value = ""
S.Cells(16, 18).Value = ""
S.Cells(16, 22).Value = ""
End Sub
Sub S1_2()
Set S = Worksheets("S")
S.Cells(16, 6).Value = ""
S.Cells(16, 14).Value = ""
S.Cells(16, 18).Value = ""
S.Cells(16, 22).Value = ""
End Sub
Sub S1_3()
Set S = Worksheets("S")
S.Cells(16, 6).Value = ""
S.Cells(16, 10).Value = ""
S.Cells(16, 18).Value = ""
S.Cells(16, 22).Value = ""
End Sub
Sub S1_4()
Set S = Worksheets("S")
S.Cells(16, 6).Value = ""
S.Cells(16, 10).Value = ""
S.Cells(16, 14).Value = ""
S.Cells(16, 22).Value = ""
End Sub
Sub S1_5()
Set S = Worksheets("S")
S.Cells(16, 6).Value = ""
S.Cells(16, 10).Value = ""
S.Cells(16, 14).Value = ""
S.Cells(16, 18).Value = ""
End Sub
Sub S2_1()
Set S = Worksheets("S")
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_2()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_3()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_4()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_5()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_6()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_7()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_8()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 22).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_9()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 24).Value = ""
End Sub
Sub S2_10()
Set S = Worksheets("S")
S.Cells(27, 6).Value = ""
S.Cells(27, 8).Value = ""
S.Cells(27, 10).Value = ""
S.Cells(27, 12).Value = ""
S.Cells(27, 14).Value = ""
S.Cells(27, 16).Value = ""
S.Cells(27, 18).Value = ""
S.Cells(27, 20).Value = ""
S.Cells(27, 22).Value = ""
End Sub
Sub S3_1()
Set S = Worksheets("S")
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_2()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_3()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_4()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_5()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_6()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_7()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_8()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 22).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_9()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 24).Value = ""
End Sub
Sub S3_10()
Set S = Worksheets("S")
S.Cells(29, 6).Value = ""
S.Cells(29, 8).Value = ""
S.Cells(29, 10).Value = ""
S.Cells(29, 12).Value = ""
S.Cells(29, 14).Value = ""
S.Cells(29, 16).Value = ""
S.Cells(29, 18).Value = ""
S.Cells(29, 20).Value = ""
S.Cells(29, 22).Value = ""
End Sub
Sub S4_1()
Set S = Worksheets("S")
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_2()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_3()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_4()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_5()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_6()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_7()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_8()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 22).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_9()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 24).Value = ""
End Sub
Sub S4_10()
Set S = Worksheets("S")
S.Cells(31, 6).Value = ""
S.Cells(31, 8).Value = ""
S.Cells(31, 10).Value = ""
S.Cells(31, 12).Value = ""
S.Cells(31, 14).Value = ""
S.Cells(31, 16).Value = ""
S.Cells(31, 18).Value = ""
S.Cells(31, 20).Value = ""
S.Cells(31, 22).Value = ""
End Sub
Sub S5_1()
Set S = Worksheets("S")
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_2()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_3()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_4()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_5()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_6()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_7()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_8()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 22).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_9()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 24).Value = ""
End Sub
Sub S5_10()
Set S = Worksheets("S")
S.Cells(33, 6).Value = ""
S.Cells(33, 8).Value = ""
S.Cells(33, 10).Value = ""
S.Cells(33, 12).Value = ""
S.Cells(33, 14).Value = ""
S.Cells(33, 16).Value = ""
S.Cells(33, 18).Value = ""
S.Cells(33, 20).Value = ""
S.Cells(33, 22).Value = ""
End Sub
Sub S6_1()
Set S = Worksheets("S")
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_2()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_3()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_4()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_5()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_6()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_7()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_8()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 22).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_9()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 24).Value = ""
End Sub
Sub S6_10()
Set S = Worksheets("S")
S.Cells(35, 6).Value = ""
S.Cells(35, 8).Value = ""
S.Cells(35, 10).Value = ""
S.Cells(35, 12).Value = ""
S.Cells(35, 14).Value = ""
S.Cells(35, 16).Value = ""
S.Cells(35, 18).Value = ""
S.Cells(35, 20).Value = ""
S.Cells(35, 22).Value = ""
End Sub
Sub S7_1()
Set S = Worksheets("S")
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_2()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_3()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_4()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_5()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_6()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_7()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_8()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 22).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_9()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 24).Value = ""
End Sub
Sub S7_10()
Set S = Worksheets("S")
S.Cells(37, 6).Value = ""
S.Cells(37, 8).Value = ""
S.Cells(37, 10).Value = ""
S.Cells(37, 12).Value = ""
S.Cells(37, 14).Value = ""
S.Cells(37, 16).Value = ""
S.Cells(37, 18).Value = ""
S.Cells(37, 20).Value = ""
S.Cells(37, 22).Value = ""
End Sub
Sub S8_1()
Set S = Worksheets("S")
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_2()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_3()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_4()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_5()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_6()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_7()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_8()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 22).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_9()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 24).Value = ""
End Sub
Sub S8_10()
Set S = Worksheets("S")
S.Cells(39, 6).Value = ""
S.Cells(39, 8).Value = ""
S.Cells(39, 10).Value = ""
S.Cells(39, 12).Value = ""
S.Cells(39, 14).Value = ""
S.Cells(39, 16).Value = ""
S.Cells(39, 18).Value = ""
S.Cells(39, 20).Value = ""
S.Cells(39, 22).Value = ""
End Sub
Sub S9_1()
Set S = Worksheets("S")
S.Cells(42, 20).Value = ""
End Sub
Sub S9_2()
Set S = Worksheets("S")
S.Cells(42, 14).Value = ""
End Sub
Sub S10_1()
Set S = Worksheets("S")
S.Cells(44, 20).Value = ""
End Sub
Sub S10_2()
Set S = Worksheets("S")
S.Cells(44, 14).Value = ""
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Sub AUTO_OPEN()
DialogSheets("F").Show
Set S = Worksheets("S")
Set d = Worksheets("DATA")
Set F = DialogSheets("F")
F.EditBoxes("NO").Text = d.Cells(4, 2).Value
DialogSheets("F").Show
End Sub
Sub KAYIT()
Set S = Worksheets("S")
Set d = Worksheets("DATA")
Set P = Worksheets("PAR")
Set F = DialogSheets("F")
n = F.EditBoxes("NO").Text + 10
d.Cells(n, 1).Value = n
d.Cells(n, 2).Value = S.Cells(9, 3).Value
d.Cells(n, 3).Value = P.Cells(S.Cells(9, 3).Value + 5, 1).Value
d.Cells(n, 4).Value = F.EditBoxes("ODA").Text
d.Cells(n, 5).Value = F.EditBoxes("AD").Text
d.Cells(n, 6).Value = F.EditBoxes("TAR").Text
d.Cells(n, 7).Value = S.Cells(16, 27).Value
d.Cells(n, 8).Value = S.Cells(27, 27).Value
d.Cells(n, 9).Value = S.Cells(29, 27).Value
d.Cells(n, 10).Value = S.Cells(31, 27).Value
d.Cells(n, 11).Value = S.Cells(33, 27).Value
d.Cells(n, 12).Value = S.Cells(35, 27).Value
d.Cells(n, 13).Value = S.Cells(37, 27).Value
d.Cells(n, 14).Value = S.Cells(39, 27).Value
d.Cells(n, 15).Value = S.Cells(42, 27).Value
d.Cells(n, 16).Value = S.Cells(44, 27).Value
d.Cells(n, 17).Value = F.EditBoxes("AC").Text
'TEM�ZLE
F.EditBoxes("NO").Text = d.Cells(4, 2).Value
F.EditBoxes("ODA").Text = ""
F.EditBoxes("AD").Text = ""
F.EditBoxes("TAR").Text = ""
F.EditBoxes("AC").Text = ""
S.Cells(9, 3).Value = 1
S.Cells(16, 6).Value = ""
S.Cells(16, 10).Value = ""
S.Cells(16, 14).Value = ""
S.Cells(16, 18).Value = ""
S.Cells(16, 22).Value = ""
Sheets("S").Select
Range("F27:X39").Select
Selection.ClearContents
S.Cells(42, 14).Value = ""
S.Cells(42, 20).Value = ""
S.Cells(44, 14).Value = ""
S.Cells(44, 20).Value = ""
End Sub
Sub RAPOR()
Sheets("RAPOR").Select
ActiveSheet.Unprotect
Set S = Worksheets("S")
Set d = Worksheets("DATA")
Set P = Worksheets("PAR")
Set r = Worksheets("RAPOR")
'gelme durumu
s5 = 0
s4 = 0
s3 = 0
s2 = 0
s1 = 0
n = 11
1 If d.Cells(n, 7).Value = 5 Then
s5 = s5 + 1
Else
End If
Range("A11:G17").Select
Selection.Sort Key1:=Range("B11"), Order1:=xlDescending, Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A8:B8").Select
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As
Excel.Range)
Static OldRange As Range
On Error Resume Next
Target.Interior.ColorIndex = 6 ' yellow - change as needed
OldRange.Interior.ColorIndex = xlColorIndexNone
Set OldRange = Target
End Sub
Sub s�f()
'
' s�f Makro
' Makro Aort Bili�im taraf�ndan 27.06.2004 tarihinde kaydedildi.
'
'
Range("N28").Select
ActiveCell.FormulaR1C1 = "1"
Range("N29").Select
ActiveCell.FormulaR1C1 = "1"
Range("N30").Select
ActiveCell.FormulaR1C1 = "1"
Range("N31").Select
ActiveCell.FormulaR1C1 = "1"
Range("N32").Select
ActiveCell.FormulaR1C1 = "1"
Range("N33").Select
ActiveCell.FormulaR1C1 = "1"
Range("N34").Select
ActiveCell.FormulaR1C1 = "1"
Range("N35").Select
ActiveCell.FormulaR1C1 = "1"
Range("N36").Select
ActiveCell.FormulaR1C1 = "1"
Range("N37").Select
ActiveCell.FormulaR1C1 = "1"
Range("N38").Select
ActiveCell.FormulaR1C1 = "1"
Range("N39").Select
ActiveCell.FormulaR1C1 = "1"
Range("N40").Select
ActiveCell.FormulaR1C1 = "1"
Range("N41").Select
ActiveCell.FormulaR1C1 = "1"
Range("N42").Select
ActiveCell.FormulaR1C1 = "1"
Range("N43").Select
ActiveCell.FormulaR1C1 = "1"
Range("N44").Select
ActiveCell.FormulaR1C1 = "1"
Range("N45").Select
ActiveCell.FormulaR1C1 = "1"
Range("N46").Select
ActiveCell.FormulaR1C1 = "1"
Range("c17").Select
Range("C17:D17").Select
ActiveCell.FormulaR1C1 = "STANDART"
Range("C17:D17").Select
Application.DisplayStatusBar = True
Application.StatusBar = " AORT B�L���M H�ZMETLER� (c) UMUT SANCAR "
If tt = "" Then MsgBox (" Liste itina ile s�f�rlanm�t�r. ")
End Sub
----------kod bitir------
----------kod basla------
Sub MASRAF_EKLE()
'
' MASRAF_EKLE Makro
' Makro AORT taraf�ndan 15.09.2004 tarihinde kaydedildi.
'
'
Range("C3").Select
Application.CutCopyMode = False
Selection.Copy
Range("B16").Select
Selection.Insert Shift:=xlDown
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C7").Select
Application.CutCopyMode = False
Selection.Copy
Range("C16").Select
Selection.Insert Shift:=xlDown
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("C5").Select
Application.CutCopyMode = False
Selection.Copy
Range("D16").Select
Selection.Insert Shift:=xlDown
Range("B15:D15").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Application.CutCopyMode = False
Selection.Sort Key1:=Range("B15"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
Range("C5").Select
End Sub
Sub MASRAF_GIT()
'
' MASRAF_GIT Makro
' Makro AORT taraf�ndan 15.09.2004 tarihinde kaydedildi.
'
'
Sheets("MASRAF").Select
Range("C5").Select
End Sub
----------kod bitir------
----------kod basla------
Sub FIRSTPAGE()
'
' FIRSTPAGE Makro
' Makro AORT-B�L���M taraf�ndan 30.09.2004 tarihinde kaydedildi.
'
'
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True
End Sub
----------kod bitir------
----------kod basla------
Sub ORDER_GIT()
'
' ORDER_GIT Makro
' Makro AORT-B�L���M taraf�ndan 02.10.2004 tarihinde kaydedildi.
'
'
Sheets("ORDER").Select
Range("C9").Select
Application.DisplayStatusBar = True
Application.StatusBar = "KA�IT �SRAFINI �NLEMEK ���N S�ZLE�MEY� D�KKATL� DOLDURUN."
End Sub
----------kod bitir------
----------kod basla------
Sub RECORD01()
'
' RECORD01 Makro
' Makro SYSTEM taraf�ndan 02.11.2004 tarihinde kaydedildi.
'
'
Sheets("REC").Select
Sheets("REC").Copy Before:=Sheets(1)
Sheets("REC (2)").Select
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Const ERRSTR As String = "�zg�n�m, Dosya saklanamad�." & _
vbNewLine & vbNewLine
Dim fName As String
On Error GoTo Handler
With ActiveWorkbook
fName = .Sheets("REC (2)").Range("B1").Text
If Len(Trim(fName)) = 0 Then _
Err.Raise 32769
If Mid(fName, Len(fName) - 3, 1) <> "." Then _
fName = fName & ".xls"
.SaveAs Filename:=fName
Sheets("REC (2)").Select
Application.DisplayAlerts = False
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
Sheets("XXXX").Select
End With
Exit Sub
Handler:
If Err.Number = 32769 Then
MsgBox ERRSTR & "REC (2) i�indeki B1 h�cresi bo�"
Else
MsgBox ERRSTR & "REC (2) i�inde ve B1 h�cresinde ge�erli dosya ad�n�
kontrol edin."
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub KillTheForm()
Unload UserForm1
End Sub
----------kod bitir------
----------kod basla------
Sub DELETEPAGE()
'
' DELETEPAGE Makro
' Makro SYSTEM taraf�ndan 02.11.2004 tarihinde kaydedildi.
'
'
Sheets("REC (2)").Select
ActiveWindow.SelectedSheets.Delete
Sheets("XXXX").Select
End Sub
----------kod bitir------
----------kod basla------
Sub D��me18_T�klat()
End Sub
Sub S�ZLE�MERESET()
'
' S�ZLE�MERESET Makro
' Makro SYSTEM taraf�ndan 03.11.2004 tarihinde kaydedildi.
'
'
Range("E1:G1").Select
ActiveCell.FormulaR1C1 = "M��TER� ADINI BURAYA G�R�N"
Range("F6").Select
ActiveCell.FormulaR1C1 = "0"
Range("F7").Select
ActiveCell.FormulaR1C1 = "0"
Range("E5").Select
ActiveCell.FormulaR1C1 = "0"
Range("E6").Select
ActiveCell.FormulaR1C1 = "0"
Range("E7").Select
ActiveCell.FormulaR1C1 = "0"
Range("G5").Select
ActiveCell.FormulaR1C1 = "0"
Range("G6").Select
ActiveCell.FormulaR1C1 = "0"
Range("G7").Select
ActiveCell.FormulaR1C1 = "0"
Range("C20:C23").Select
Selection.ClearContents
Range("E1:G1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Sheets("XXXX").Select
End Sub
----------kod bitir------
----------kod basla------
Sub KUR_UPDATE()
'
' KUR_UPDATE Makro
' Makro SYSTEM taraf�ndan 03.11.2004 tarihinde kaydedildi.
'
'
Sheets("OPT").Select
Range("I4").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("XXXX").Select
Range("B10").Select
End Sub
----------kod bitir------
----------kod basla------
Sub TCMB_DUZENLE()
'
' TCMB_DUZENLE Makro
' Makro SYSTEM taraf�ndan 03.11.2004 tarihinde kaydedildi.
'
'
Range("I10:L13").Select
Selection.Cut Destination:=Range("H9:K12")
Range("H9:K12").Select
Selection.Replace What:=",", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("H10:K10").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Font.Bold = True
Range("H8").Select
Selection.Font.Bold = True
Selection.Font.ColorIndex = 3
End Sub
Sub TCMB_KUR_UPDATE()
'
' TCMB_KUR_UPDATE Makro
' Makro SYSTEM taraf�ndan 03.11.2004 tarihinde kaydedildi.
'
'
Range("H8").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Range("I10:L13").Select
Selection.Cut Destination:=Range("H10:K13")
Range("H10:K13").Select
Selection.Cut Destination:=Range("H9:K12")
Range("H9:K12").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
Range("H9:I9").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
Range("J9:K9").Select
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Merge
Range("H10:K10").Select
With Selection.Interior
.ColorIndex = 34
.Pattern = xlSolid
End With
Range("H10:K12").Select
Selection.Replace What:=",", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("G11:G12").Select
With Selection
.HorizontalAlignment = xlRight
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
Selection.Font.Bold = True
End Sub
----------kod bitir------
----------kod basla------
Sub SOZLE_ALICI_GIR()
'
' SOZLE_ALICI_GIR Makro
' Makro SYSTEM taraf�ndan 13.11.2004 tarihinde kaydedildi.
'
'
Range("E1:G1").Select
ActiveCell.FormulaR1C1 = "M��TER� ADINI BURAYA G�R�N"
Range("E2:G1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub REFERANS()
'
' REFERANS Makro
' Makro SYSTEM taraf�ndan 22.11.2004 tarihinde kaydedildi.
'
'
Range("D71").Select
Selection.Copy
Workbooks.Open Filename:="D:\AORT VT\REFERANS.xls"
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown
Windows("REFERANS.xls").Activate
ActiveWorkbook.Save
ActiveWindow.Close
Sheets("XXXX").Select
ActiveWindow.ScrollRow = 9
End Sub
----------kod bitir------
----------kod basla------
Sub SOZLESME()
'
' SOZLESME Makro
' Makro pc taraf�ndan 04.08.2004 tarihinde kaydedildi.
'
'
Sheets("S�ZLE�ME").Select
ActiveWindow.ScrollRow = 56
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 48
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 35
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 18
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 16
Range("B17").Select
Application.DisplayStatusBar = True
Application.StatusBar = "TEBR�KLER, B�LG�SAYAR SATMAK KOLAY DE��L!"
End Sub
Sub XXXXE_GIT()
'
' XXXXE_GIT Makro
' Makro pc taraf�ndan 04.08.2004 tarihinde kaydedildi.
'
'
Sheets("XXXX").Select
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 9
Range("B10").Select
Application.DisplayStatusBar = True
Application.StatusBar = "PROFESYONEL OLDU�UNU KANITLA..."
End Sub
----------kod bitir------
----------kod basla------
Sub OPT_GIT()
'
' OPT_GIT Makro
' Makro AORT B�L���M taraf�ndan 21.08.2004 tarihinde kaydedildi.
'
'
Sheets("OPT").Select
Range("A1").Select
Application.DisplayStatusBar = True
Application.StatusBar = "AYARLARLA FAZLA OYNAMAMAK LAZIM!"
End Sub
----------kod bitir------
----------kod basla------
Sub Index()
Application.CommandBars("Workbook Tabs").ShowPopup
End Sub
----------kod bitir------
----------kod basla------
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v(15)
Dim c(3)
b$(0) = ""
b$(1) = "Bir"
b$(2) = "�ki"
b$(3) = "��"
b$(4) = "D�rt"
b$(5) = "Be�"
b$(6) = "Alt�"
b$(7) = "Yedi"
b$(8) = "Sekiz"
b$(9) = "Dokuz"
y$(0) = ""
y$(1) = "On"
y$(2) = "Yirmi"
y$(3) = "Otuz"
y$(4) = "K�rk"
y$(5) = "Elli"
y$(6) = "Altm�"
y$(7) = "Yetmi�"
y$(8) = "Seksen"
y$(9) = "Doksan"
m$(0) = "Trilyon"
m$(1) = "Milyar"
m$(2) = "Milyon"
m$(3) = "Bin"
m$(4) = ""
a$ = Str(sayi)
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
s$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�z"
Else
e$ = b$(c(1)) + "Y�z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "BirBin") Then e$ = "Bin"
s$ = s$ + e$
Next x
yaz$ = s$
GoTo tamam
hata: yaz$ = "Hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Sub ODEMEGOR()
'
' ODEMEGOR Makro
' Makro AORT taraf�ndan 31.08.2004 tarihinde kaydedildi.
'
'
Sheets("XXXX").Select
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 31
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 35
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 43
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 48
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 52
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 56
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 60
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 65
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 69
ActiveWindow.ScrollRow = 70
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 73
ActiveWindow.ScrollRow = 74
ActiveWindow.ScrollRow = 75
Range("B80:G91").Select
End Sub
----------kod bitir------
----------kod basla------
Sub PHONENEW()
'
' PHONENEW Makro
' Makro AORT taraf�ndan 14.09.2004 tarihinde kaydedildi.
'
'
Range("C2").Select
Selection.Copy
Range("B10").Select
Selection.Insert Shift:=xlDown
Range("C3").Select
Application.CutCopyMode = False
Selection.Copy
Range("D10").Select
Selection.Insert Shift:=xlDown
Range("C4").Select
Application.CutCopyMode = False
Selection.Copy
Range("E10").Select
Selection.Insert Shift:=xlDown
Range("C5").Select
Application.CutCopyMode = False
Selection.Copy
Range("F10").Select
Selection.Insert Shift:=xlDown
Range("C6").Select
Application.CutCopyMode = False
Selection.Copy
Range("C10").Select
Selection.Insert Shift:=xlDown
Range("B9:F813").Select
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = 5
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = 5
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = 5
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = 5
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = 5
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = 5
End With
Selection.Sort Key1:=Range("B9"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
ActiveWindow.ScrollRow = 798
ActiveWindow.ScrollRow = 789
ActiveWindow.ScrollRow = 784
ActiveWindow.ScrollRow = 778
ActiveWindow.ScrollRow = 771
ActiveWindow.ScrollRow = 764
ActiveWindow.ScrollRow = 761
ActiveWindow.ScrollRow = 756
ActiveWindow.ScrollRow = 751
ActiveWindow.ScrollRow = 748
ActiveWindow.ScrollRow = 743
ActiveWindow.ScrollRow = 738
ActiveWindow.ScrollRow = 733
ActiveWindow.ScrollRow = 726
ActiveWindow.ScrollRow = 718
ActiveWindow.ScrollRow = 710
ActiveWindow.ScrollRow = 701
ActiveWindow.ScrollRow = 691
ActiveWindow.ScrollRow = 686
ActiveWindow.ScrollRow = 680
ActiveWindow.ScrollRow = 673
ActiveWindow.ScrollRow = 668
ActiveWindow.ScrollRow = 662
ActiveWindow.ScrollRow = 655
ActiveWindow.ScrollRow = 645
ActiveWindow.ScrollRow = 637
ActiveWindow.ScrollRow = 625
ActiveWindow.ScrollRow = 610
ActiveWindow.ScrollRow = 598
ActiveWindow.ScrollRow = 585
ActiveWindow.ScrollRow = 574
ActiveWindow.ScrollRow = 562
ActiveWindow.ScrollRow = 550
ActiveWindow.ScrollRow = 539
ActiveWindow.ScrollRow = 527
ActiveWindow.ScrollRow = 517
ActiveWindow.ScrollRow = 505
ActiveWindow.ScrollRow = 491
ActiveWindow.ScrollRow = 477
ActiveWindow.ScrollRow = 466
ActiveWindow.ScrollRow = 454
ActiveWindow.ScrollRow = 441
ActiveWindow.ScrollRow = 429
ActiveWindow.ScrollRow = 419
ActiveWindow.ScrollRow = 407
ActiveWindow.ScrollRow = 396
ActiveWindow.ScrollRow = 383
ActiveWindow.ScrollRow = 371
ActiveWindow.ScrollRow = 359
ActiveWindow.ScrollRow = 351
ActiveWindow.ScrollRow = 341
ActiveWindow.ScrollRow = 333
ActiveWindow.ScrollRow = 328
ActiveWindow.ScrollRow = 321
ActiveWindow.ScrollRow = 315
ActiveWindow.ScrollRow = 311
ActiveWindow.ScrollRow = 306
ActiveWindow.ScrollRow = 301
ActiveWindow.ScrollRow = 295
ActiveWindow.ScrollRow = 290
ActiveWindow.ScrollRow = 283
ActiveWindow.ScrollRow = 276
ActiveWindow.ScrollRow = 270
ActiveWindow.ScrollRow = 265
ActiveWindow.ScrollRow = 258
ActiveWindow.ScrollRow = 251
ActiveWindow.ScrollRow = 248
ActiveWindow.ScrollRow = 243
ActiveWindow.ScrollRow = 240
ActiveWindow.ScrollRow = 236
ActiveWindow.ScrollRow = 230
ActiveWindow.ScrollRow = 223
ActiveWindow.ScrollRow = 217
ActiveWindow.ScrollRow = 212
ActiveWindow.ScrollRow = 205
ActiveWindow.ScrollRow = 200
ActiveWindow.ScrollRow = 197
ActiveWindow.ScrollRow = 190
ActiveWindow.ScrollRow = 183
ActiveWindow.ScrollRow = 175
ActiveWindow.ScrollRow = 170
ActiveWindow.ScrollRow = 163
ActiveWindow.ScrollRow = 157
ActiveWindow.ScrollRow = 153
ActiveWindow.ScrollRow = 148
ActiveWindow.ScrollRow = 145
ActiveWindow.ScrollRow = 143
ActiveWindow.ScrollRow = 140
ActiveWindow.ScrollRow = 139
ActiveWindow.ScrollRow = 135
ActiveWindow.ScrollRow = 132
ActiveWindow.ScrollRow = 129
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 120
ActiveWindow.ScrollRow = 119
ActiveWindow.ScrollRow = 115
ActiveWindow.ScrollRow = 110
ActiveWindow.ScrollRow = 107
ActiveWindow.ScrollRow = 104
ActiveWindow.ScrollRow = 102
ActiveWindow.ScrollRow = 97
ActiveWindow.ScrollRow = 92
ActiveWindow.ScrollRow = 89
ActiveWindow.ScrollRow = 84
ActiveWindow.ScrollRow = 79
ActiveWindow.ScrollRow = 75
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 59
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 42
ActiveWindow.ScrollRow = 41
ActiveWindow.ScrollRow = 37
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 26
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 9
Range("C2:C6").Select
Selection.ClearContents
Range("C2").Select
Application.DisplayStatusBar = True
Application.StatusBar = "AORT Bili�im Hizmetleri!"
End Sub
Sub PHONE_GIT()
'
' PHONE_GIT Makro
' Makro AORT taraf�ndan 14.09.2004 tarihinde kaydedildi.
'
'
Sheets("PHONE").Select
Range("C2").Select
Application.DisplayStatusBar = True
Application.StatusBar = "TELEFON NUMARALARI KAYIT SAYFASI"
End Sub
----------kod bitir------
----------kod basla------
Private Sub Image1_Click()
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub Calendar1_Click()
TextBox1.Value = Calendar1.Value
Calendar1.Visible = False
End Sub
On Error GoTo 0
Exit_cmdCreateAppt_Click:
Set objItem = Nothing
Set objApp = Nothing
Exit Sub
Err_cmdCreateAppt_Click:
Select Case Err
Case 0
Case Else
MsgBox Err.Description
Resume Exit_cmdCreateAppt_Click
End Select
End Sub
Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Calendar1.Visible = True
End Sub
Private Sub UserForm_Initialize()
OptionButton1.GroupName = 1
OptionButton2.GroupName = 1
OptionButton3.GroupName = 1
OptionButton4.GroupName = 1
OptionButton5.GroupName = 2
OptionButton6.GroupName = 2
OptionButton7.GroupName = 2
OptionButton8.GroupName = 2
Calendar1.today
ComboBox1.ListRows = 24
ComboBox1.RowSource = "appointment!IR3: IR26"
ComboBox2.ListRows = 30
ComboBox2.RowSource = "appointment!IS3: IS62"
ComboBox1.Value = Hour(Now)
ComboBox2.Value = Minute(Now)
End Sub
----------kod bitir------
----------kod basla------
Private Sub cmdbul_Click()
Dim bak As Range
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(cbAd.Value, vbUpperCase) Then
bak.Select
txtsira.Value = ActiveCell.Offset(0, -1).Value
txtikamet.Value = ActiveCell.Offset(0, 1).Value
txtmaas.Value = ActiveCell.Offset(0, 2).Value
Exit Sub
End If
Next bak
MsgBox "Arad���n�z isimde bir kay�t bulunamad�"
End Sub
Do
Set C = .FindNext(C)
adres = C.Address
adres = Right(adres, Len(adres) - 1)
ky = InStr(1, adres, "$", 1)
AD1 = Right(adres, Len(adres) - ky)
Worksheets("Ara").Cells(6 + SAY, 1).Value = SAY + 1
Worksheets("Ara").Cells(6 + SAY, 2).Value = C
Worksheets("Ara").Cells(6 + SAY, 5).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 2).Value)
Worksheets("Ara").Cells(6 + SAY, 6).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 3).Value)
Worksheets("Ara").Cells(6 + SAY, 7).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 22).Value)
Worksheets("Ara").Cells(6 + SAY, 8).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 24).Value)
SAY = SAY + 1
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
Worksheets("Ara").Cells(4, 8).Value = SAY
End With
Range("E2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
On Error GoTo hata
Set ara = Sheets("ESAS").Columns("C:C").Find(what:=TextBox1)
Application.Goto reference:=Range(ara.Address), _
Scroll:=False
Exit Sub
hata:
MsgBox ("BULUNAMADI")
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
ListBox1.ColumnCount = 2
ListBox1.RowSource = "Sayfa1!A1:b100"
ListBox1.ColumnWidths = "30;30"
End Sub
----------kod bitir------
----------kod basla------
Sub s�z()
Range("B2:D65532").ClearContents
c = 0
For s = 1 To Worksheets.Count - 1
a = WorksheetFunction.CountA(Sheets("L�STE" & s).Range("A1:A65532"))
For ara = 1 To a
b = Mid(Sheets("L�STE" & s).Cells(ara, 1), 1, 3)
If b = [a2] Then
c = c + 1
Cells(c + 1, 2) = Sheets("L�STE" & s).Cells(ara, 1).Value
Cells(c + 1, 3) = Sheets("L�STE" & s).Cells(ara, 2).Value
Cells(c + 1, 4) = Sheets("L�STE" & s).Cells(ara, 3).Value
End If
Next ara
Next s
End Sub
----------kod bitir------
----------kod basla------
Sub renksil()
'
' renksil Makro
' Makro KAYYUM taraf�ndan 05.01.2005 tarihinde kaydedildi.
'
'
Columns("A:P").Select
Range("A4").Activate
Selection.Interior.ColorIndex = 2
Range("A1").Select
End Sub
Sub FindData()
On Error Resume Next
Makro1
Dim wsSheet As Worksheet
Dim rFound As Range
Dim MyData As Variant
MyData = InputBox("G.T.I.P NO VEYA ARANILAN KEL�MEY� YAZINIZ.")
If MyData = False Or MyData = "" Then End
For Each wsSheet In ActiveWorkbook.Worksheets
Set rFound = wsSheet.UsedRange. _
Find(What:=CStr(MyData), LookIn:=xlValues, _
LookAt:=xlPart, MatchCase:=False)
If Not rFound Is Nothing Then
bln = bln + 1
First = rFound.Address
Do
Application.Goto rFound
ActiveCell.EntireRow.Select
Selection.Interior.ColorIndex = 6
ActiveCell.Select
Selection.Interior.ColorIndex = 4
ActiveCell.Select
MsgBox " Deney �creti" & " " & ActiveCell.Offset(0, 9).Value & " " & "YTL" & " "
& " Kapsam " & ActiveCell.Offset(0, 10).Value
'If MsgBox("Aramaya devam edilsin mi?", vbInformation + vbYesNo, "Arama Formu ") =
vbNo Then End
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro KAVI taraf�ndan 30.01.2005 tarihinde kaydedildi.
'
'
Range("A1").Select
Application.Run "'arama.xls'!renksil"
Range("A3:K3").Select
Selection.Interior.ColorIndex = 46
Range("A3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub yenile()
Dim al(500, 6), kriter(6)
Sheets("sayfa2").Range("a2:f501").ClearContents
kactane = Sheets("SAYFA1").Range("A65536").End(xlUp).Row - 14
For y = 1 To 6
kriter(y) = Cells(3, y)
Next
a = 0
For x = 1 To kactane
aktar = 1
For m = 1 To 6
al(x, m) = Cells(14 + x, m)
If kriter(m) = "" Or kriter(m) = "0" Or kriter(m) = "00:00:00" Or
kriter(m) = al(x, m) Then aktar = 1
Next
If aktar = 1 Then
a = a + 1
For z = 1 To 6
Sheets("sayfa2").Cells(a + 1, z) = al(x, z)
Next
End If
Next
Sheets("sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Macro1()
Dim toplam As Currency
Dim aranan As Currency
Range("hedef").ClearContents
sut = ActiveCell.Column
sat = ActiveCell.Row
son = Cells(65536, sut).End(xlUp).Row
aranan = Cells(1, 4)
boyu = son - sat + 1
Dim liste(1000) As Currency
For i = sat To son
liste(i - (sat - 1)) = Cells(i, sut)
Next i
j = 1
For a1 = 1 To boyu
For a2 = a1 + 1 To boyu
For a3 = a2 + 1 To boyu
For a4 = a3 + 1 To boyu
Next a4
Next a3
Next a2
Next a1
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub AUTO_OPEN()
Application.Visible = False
sifre = Application.InputBox("BU SAYFAYA ��FRES�Z G�REMEZS�N�Z", "��FRE ONAY
PENCERES�")
If sifre = 2 Then
ActiveSheet.Unprotect 2
UserForm2.Show
Exit Sub
End If
If sifre <> 2 Then
MsgBox "��FRE YANLI� 2 DENEMEN�Z KALDI", , "UYARI"
End If
sifre = Application.InputBox("BU SAYFAYA ��FRES�Z G�REMEZS�N�Z", "��FRE
ONAY PENCERES�")
If sifre = 2 Then
ActiveSheet.Unprotect 2
UserForm2.Show
Exit Sub
End If
If sifre <> 2 Then
MsgBox "��FRE YANLI� SON DENEMEN�Z", , "UYARI"
End If
sifre = Application.InputBox("BU SAYFAYA ��FRES�Z G�REMEZS�N�Z", "��FRE
ONAY PENCERES�")
If sifre = 2 Then
ActiveSheet.Unprotect 2
UserForm2.Show
Exit Sub
End If
If sifre <> 2 Then
MsgBox "G�RD���N�Z ��FRE GE�ERS�Z !!MUH�TT�N �ZCAN'I ARA!!", , "UYARI"
Application.Quit
Exit Sub
End If
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub a_Click()
End Sub
End Sub
Private Sub CommandButton1_Click()
Unload Me
Sheets("sayfa4").Select
Application.Visible = True
End Sub
End Sub
End Sub
End Sub
End Sub
Private Sub UserForm_Initialize()
Dim MyRng As Range
Set MyRng = Range("bc6:bc" & ListBox1.ListCount)
MyRng = ListBox1.List
MyRng.Sort Key1:=Range("bc6"), Order1:=xlAscending
ListBox1.RowSource = MyRng.Address
Set MyRng = Nothing
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Public Cn400 As New ADODB.Connection
Public dogru As Integer
Public server_adi As String
Public dosya_adi As String
Public SqlStr As String
Public Str1 As String
Public rs As New ADODB.Recordset
Public cm_rs As New ADODB.Command
Dim i As Integer
Dim j As Integer
Sub Connect_To_Database()
Dim systemName As String
'systemName = InputBox("Enter system name", "Tables Sample")
systemName = server_adi
systemName = Trim(systemName)
If systemName = "" Then
MsgBox ("No system name entered. Ending program.")
End
End If
Set Cn400 = Nothing
dogru = 0
'cnRCHAS002.Open "Provider=IBMDA400;Data Source=" & systemName & ";", "", ""
Cn400.ConnectionString = "Provider=IBMDA400;Data Source=" & systemName & ";"";"""
'Cn400.ConnectionString = "Provider=IBMDA400;Data Source=S443977A"
Dim MsgText
Dim ADOError
If Cn400.Errors.Count > 0 Then
For Each ADOError In Cn400.Errors
MsgText = MsgText & "Number=" & ADOError.Number & " " & "Description=" &
ADOError.Description & " " _
& "Source=" & ADOError.Source & vbCrLf
Next
MsgBox MsgText, vbOKOnly, "AS/400 OLE DB support Provider Reported Errors"
End If
If Cn400.Errors.Count = 0 Then
dogru = 1
Cn400.Open
End If
End Sub
Sub Data_Yaz()
Dim systemName As String
If dogru = 1 Then
'Str1 = InputBox("Dosya Ad�n� Giriniz �rnek:K�t�phane.Dosya_ADI(Dosya_ADI)",
"Tables Sample")
Str1 = dosya_adi
'Str1 = "DUMP.QAGRF(*FIRST)"
SqlStr = ""
SqlStr = "SELECT * FROM " & Str1
'SqlStr = Str1
Set cm_rs.ActiveConnection = Cn400
cm_rs.CommandType = adCmdText
cm_rs.Prepared = True
cm_rs.CommandText = ""
cm_rs.CommandText = SqlStr
Set rs = cm_rs.Execute
rs.MoveFirst
'Dim k As Integer
'For k = 1 To 100
'rs.MovePrevious
'Next k
i = 1
Sheet4.Cells.Clear
Do While Not rs.EOF
'MsgBox "Nakledilen Kay�t Say�s� : " & i & " / " & rs.RecordCount,
' For j = 1 To rs.Fields.Count - 1
For j = 1 To rs.Fields.Count
'MsgBox rs.Fields(j - 1)
Sheet4.Cells(i, j) = rs.Fields(j - 1)
'MsgBox Sheet1.Cells(i, j)
Next j
i = i + 1
rs.MoveNext
Loop
End If
End Sub
Sub Form_Goster()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub D��me5_T�klat()
Sheets("Sayfa3").Select
End Sub
Sub avans_ekle()
If Range("E2") = "" Then
soru = MsgBox("Avans Bedelini Girmediniz?..Devam Edeyimmi?", vbYesNo,
"Avans Bedeli")
Range("E2").Select
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
devam:
deger = [e2]
Sheets("Sayfa3").Select
Range("A3").Select
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0) = Sheets("Sayfa1").Range("e1").Value
ActiveCell.Offset(0, 2) = Sheets("Sayfa1").Range("e2").Value
Sheets("Sayfa1").Select
[e2] = ""
MsgBox "Avans Bedeli Olan " & deger & " .-YTL" & "�lenmi�tir."
Sheets("Sayfa1").Select
[E1] = ""
Range("E1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub ayiklama()
Range("j2:l65536").ClearContents
ason = WorksheetFunction.CountA([a1:a65536])
bson = WorksheetFunction.CountA([e1:e65536])
c = 1
For a = 2 To ason
aktar = 1
For b = 2 To bson
If Cells(a, 1) = Cells(b, 5) And Cells(a, 2) = Cells(b, 6) And Cells(a, 3)
= Cells(b, 7) Then aktar = 0
Next b
If aktar = 1 Then
c = c + 1
For x = 10 To 12
Cells(c, x) = Cells(a, x - 9)
Next x
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
For a = 2 To WorksheetFunction.CountA([a2:a65536]) + 1
b = WorksheetFunction.CountIf([b2:b65536], Cells(a, 1))
If b > 0 Then
c = c + 1
Cells(c + 1, 3) = Cells(a, 1).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub listele2()
[a3:i65536].ClearContents
kay�t = WorksheetFunction.CountA(Sayfa1.[bm2:bm65536]) + 2
aranan = [c1].Value
c = 0
For sat = 2 To kay�t
If aranan = Sayfa1.Cells(sat, 65).Value Then
c = c + 1
Cells(c + 2, 3) = Sayfa1.Cells(sat, 3).Value
Cells(c + 2, 4) = Sayfa1.Cells(sat, 41).Value
End If
Next sat
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim deneme As Integer
deneme = Application.CountA(Sheets("SAYFA1").Columns("A")) + 1
Sheets("sayfa1").Cells(deneme, 1) = TextBox1.Text
Sheets("sayfa1").Cells(deneme, 2) = TextBox2.Text
Sheets("sayfa1").Cells(deneme, 3) = TextBox3.Text
Sheets("sayfa1").Cells(deneme, 4) = TextBox4.Text
Sheets("sayfa1").Cells(deneme, 5) = TextBox5.Text
Sheets("sayfa1").Cells(deneme, 6) = TextBox6.Text
Sheets("sayfa1").Cells(deneme, 7) = TextBox7.Text
Sheets("sayfa1").Cells(deneme, 8) = TextBox8.Text
Sheets("sayfa1").Cells(deneme, 9) = TextBox9.Text
Sheets("sayfa1").Cells(deneme, 10) = TextBox10.Text
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
End Sub
----------kod bitir------
----------kod basla------
Sub bol()
[a1].Copy
[b3:u22].PasteSpecial Paste:=xlAll, Operation:=xlDivide
Application.CutCopyMode = False
[a1].Select
End Sub
Sub carp()
[a1].Copy
[b3:u22].PasteSpecial Paste:=xlAll, Operation:=xlMultiply
Application.CutCopyMode = False
[a1].Select
End Sub
----------kod bitir------
----------kod basla------
Sub ara()
Columns("E:F").ClearContents
c = 0
For a = 9 To Cells(65536, 7).End(xlUp).Row
c = c + 1
sat = Columns("A").Find(Cells(a, 7)).Row
Cells(a, 5) = Cells(sat, 2).Value
Cells(a, 6) = Cells(sat, 4).Value
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub s�rala()
Range("A2:G65536").Sort Key1:=[b2]
Range("J2:L65536").Sort Key1:=[j2]
End Sub
----------kod bitir------
----------kod basla------
Sub birle�tir()
For a = WorksheetFunction.CountA(Range("A1:A65536")) To 1 Step -1
d = ";"
If a = WorksheetFunction.CountA(Range("A1:A65536")) Then
d = ""
End If
c = Cells(a, 1).Value & d & c
Next a
[b1] = c
End Sub
----------kod bitir------
----------kod basla------
Sub AUTO_OPEN()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
Private Sub TextBox7_Change()
TextBox7.Value = Format(TextBox7, "#,##.00")
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub UserForm1_Show()
Load UserForm1
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub buttkapat_Click()
On Error Resume Next
Dim Soru As String
Soru = MsgBox("Form'dan cikmak istediginize eminmisiniz?", vbQuestion +
vbYesNo, "www")
If Soru = vbYes Then Unload UserForm1
If Soru = vbNo Then buttkapat.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Change()
TextBox31 = TextBox1
End Sub
Private Sub cbAd_Change()
TextBox32 = cbAd
End Sub
Private Sub TextBox8_Change()
TextBox36 = TextBox8
End Sub
Private Sub TextBox9_Change()
TextBox38 = TextBox9
End Sub
Private Sub TextBox4_Change()
Select Case LCase((Left(TextBox4, 1)))
Case Is = "E"
TextBox4 = "ERKEK"
Case Is = "e"
TextBox4 = "ERKEK"
End Select
Select Case LCase((Left(TextBox4, 1)))
Case Is = "K"
TextBox4 = "KADIN"
Case Is = "k"
TextBox4 = "KADIN"
End Select
End Sub
Private Sub TextBox5_Change()
Select Case LCase((Left(TextBox5, 1)))
Case Is = "B"
TextBox5 = "BEKAR"
Case Is = "b"
TextBox5 = "BEKAR"
End Select
Select Case LCase((Left(TextBox5, 1)))
Case Is = "E"
TextBox5 = "EVL�"
Case Is = "e"
TextBox5 = "EVL�"
End Select
Select Case LCase((Left(TextBox5, 1)))
Case Is = "D"
TextBox5 = "DUL"
Case Is = "d"
TextBox5 = "DUL"
End Select
End Sub
Private Sub TextBox7_Change()
Select Case LCase((Left(TextBox7, 1)))
Case Is = "�"
TextBox7 = "�LKOKUL"
Case Is = "i"
TextBox7 = "�LKOKUL"
End Select
Select Case LCase((Left(TextBox7, 1)))
Case Is = "O"
TextBox7 = "ORTAOKUL"
Case Is = "o"
TextBox7 = "ORTAOKUL"
End Select
Select Case LCase((Left(TextBox7, 1)))
Case Is = "L"
TextBox7 = "L�SE"
Case Is = "l"
TextBox7 = "L�SE"
End Select
Select Case LCase((Left(TextBox7, 1)))
Case Is = "Y"
TextBox7 = "Y�KSEKOKUL"
Case Is = "y"
TextBox7 = "Y�KSEKOKUL"
End Select
End Sub
Private Sub TextBox8_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox8.Text) Then
TextBox8.Text = Format(TextBox8.Text, "dd/mm/yyyy")
MsgBox Format(TextBox8.Text, "dd/mm/yyyy")
Else
TextBox8.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox9.Text) Then
TextBox9.Text = Format(TextBox9.Text, "dd/mm/yyyy")
MsgBox Format(TextBox9.Text, "dd/mm/yyyy")
Else
TextBox9.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox10_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox10.Text) Then
TextBox10.Text = Format(TextBox10.Text, "dd/mm/yyyy")
MsgBox Format(TextBox10.Text, "dd/mm/yyyy")
Else
TextBox10.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox16_Change()
Select Case LCase((Left(TextBox16, 1)))
Case Is = "E"
TextBox16 = "EVET"
Case Is = "e"
TextBox16 = "EVET"
End Select
Select Case LCase((Left(TextBox16, 1)))
Case Is = "H"
TextBox16 = "HAYIR"
Case Is = "h"
TextBox16 = "HAYIR"
End Select
End Sub
Private Sub TextBox17_Change()
Select Case LCase((Left(TextBox17, 1)))
Case Is = "E"
TextBox17 = "EVET"
Case Is = "e"
TextBox17 = "EVET"
End Select
Select Case LCase((Left(TextBox17, 1)))
Case Is = "H"
TextBox17 = "HAYIR"
Case Is = "h"
TextBox17 = "HAYIR"
End Select
End Sub
Private Sub TextBox18_Change()
Select Case LCase((Left(TextBox18, 1)))
Case Is = "E"
TextBox18 = "EVET"
Case Is = "e"
TextBox18 = "EVET"
End Select
Select Case LCase((Left(TextBox18, 1)))
Case Is = "H"
TextBox18 = "HAYIR"
Case Is = "h"
TextBox18 = "HAYIR"
End Select
End Sub
Private Sub TextBox19_Change()
Select Case LCase((Left(TextBox19, 1)))
Case Is = "E"
TextBox19 = "EVET"
Case Is = "e"
TextBox19 = "EVET"
End Select
Select Case LCase((Left(TextBox19, 1)))
Case Is = "H"
TextBox19 = "HAYIR"
Case Is = "h"
TextBox19 = "HAYIR"
End Select
End Sub
Private Sub TextBox20_Change()
Select Case LCase((Left(TextBox20, 1)))
Case Is = "E"
TextBox20 = "EVET"
Case Is = "e"
TextBox20 = "EVET"
End Select
Select Case LCase((Left(TextBox20, 1)))
Case Is = "H"
TextBox20 = "HAYIR"
Case Is = "h"
TextBox20 = "HAYIR"
End Select
End Sub
Private Sub TextBox21_Change()
Select Case LCase((Left(TextBox21, 1)))
Case Is = "E"
TextBox21 = "EVET"
Case Is = "e"
TextBox21 = "EVET"
End Select
Select Case LCase((Left(TextBox21, 1)))
Case Is = "H"
TextBox21 = "HAYIR"
Case Is = "h"
TextBox21 = "HAYIR"
End Select
Select Case LCase((Left(TextBox21, 1)))
Case Is = "S"
TextBox21 = "SOR"
Case Is = "s"
TextBox21 = "SOR"
End Select
End Sub
Private Sub TextBox39_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox39.Text) Then
TextBox39.Text = Format(TextBox39.Text, "dd/mm/yyyy")
MsgBox Format(TextBox39.Text, "dd/mm/yyyy")
Else
TextBox39.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox58_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox58.Text) Then
TextBox58.Text = Format(TextBox58.Text, "dd/mm/yyyy")
MsgBox Format(TextBox58.Text, "dd/mm/yyyy")
Else
TextBox58.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox62_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox62.Text) Then
TextBox62.Text = Format(TextBox62.Text, "dd/mm/yyyy")
MsgBox Format(TextBox62.Text, "dd/mm/yyyy")
Else
TextBox62.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox66_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox66.Text) Then
TextBox66.Text = Format(TextBox66.Text, "dd/mm/yyyy")
MsgBox Format(TextBox66.Text, "dd/mm/yyyy")
Else
TextBox66.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox70_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox70.Text) Then
TextBox70.Text = Format(TextBox70.Text, "dd/mm/yyyy")
MsgBox Format(TextBox70.Text, "dd/mm/yyyy")
Else
TextBox70.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox75_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox75.Text) Then
TextBox75.Text = Format(TextBox75.Text, "dd/mm/yyyy")
MsgBox Format(TextBox75.Text, "dd/mm/yyyy")
Else
TextBox75.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox80_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox80.Text) Then
TextBox80.Text = Format(TextBox80.Text, "dd/mm/yyyy")
MsgBox Format(TextBox80.Text, "dd/mm/yyyy")
Else
TextBox80.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub TextBox85_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsDate(TextBox85.Text) Then
TextBox85.Text = Format(TextBox85.Text, "dd/mm/yyyy")
MsgBox Format(TextBox85.Text, "dd/mm/yyyy")
Else
TextBox85.Text = ""
MsgBox "Ge�ersiz Bir Tarih Format� Girdiniz. L�tfen D�zeltiniz..�rnek:15/12/2004"
End If
End Sub
Private Sub OptionButton3_Click()
TextBox71.Value = "Erkek"
End Sub
Private Sub OptionButton4_Click()
TextBox71.Value = "Kad�n"
End Sub
Private Sub OptionButton5_Click()
TextBox76.Value = "Erkek"
End Sub
Private Sub OptionButton6_Click()
TextBox76.Value = "Kad�n"
End Sub
Private Sub OptionButton7_Click()
TextBox81.Value = "Erkek"
End Sub
Private Sub OptionButton8_Click()
TextBox81.Value = "Kad�n"
End Sub
Private Sub OptionButton9_Click()
TextBox86.Value = "Erkek"
End Sub
Private Sub OptionButton10_Click()
TextBox86.Value = "Kad�n"
End Sub
Private Sub cmdkaydet_Click()
Sheets("Veri").Select
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbAd.Value Then
MsgBox "Bu Kay�t numaras� bulundu."
Exit Sub
End If
Next bak
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(cbAd.Value, vbUpperCase) Then
MsgBox "Bu isimde bir kayd�n�z bulundu"
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbAd.SetFocus
End Sub
Private Sub cmdbul_Click()
Dim bak As Range
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(cbAd.Value, vbUpperCase) Then
bak.Select
TextBox1.Value = ActiveCell.Offset(0, -1).Value
TextBox3.Value = ActiveCell.Offset(0, 1).Value
TextBox4.Value = ActiveCell.Offset(0, 2).Value
TextBox5.Value = ActiveCell.Offset(0, 3).Value
TextBox6.Value = ActiveCell.Offset(0, 4).Value
TextBox7.Value = ActiveCell.Offset(0, 5).Value
TextBox8.Value = ActiveCell.Offset(0, 6).Value
TextBox9.Value = ActiveCell.Offset(0, 7).Value
TextBox10.Value = ActiveCell.Offset(0, 8).Value
TextBox11.Value = ActiveCell.Offset(0, 9).Value
TextBox12.Value = ActiveCell.Offset(0, 10).Value
TextBox13.Value = ActiveCell.Offset(0, 11).Value
TextBox14.Value = ActiveCell.Offset(0, 12).Value
TextBox15.Value = ActiveCell.Offset(0, 13).Value
TextBox16.Value = ActiveCell.Offset(0, 14).Value
TextBox17.Value = ActiveCell.Offset(0, 15).Value
TextBox18.Value = ActiveCell.Offset(0, 16).Value
TextBox19.Value = ActiveCell.Offset(0, 17).Value
TextBox20.Value = ActiveCell.Offset(0, 18).Value
TextBox21.Value = ActiveCell.Offset(0, 19).Value
TextBox22.Value = ActiveCell.Offset(0, 20).Value
TextBox23.Value = ActiveCell.Offset(0, 21).Value
TextBox24.Value = ActiveCell.Offset(0, 22).Value
TextBox25.Value = ActiveCell.Offset(0, 23).Value
TextBox26.Value = ActiveCell.Offset(0, 24).Value
TextBox27.Value = ActiveCell.Offset(0, 25).Value
TextBox28.Value = ActiveCell.Offset(0, 26).Value
TextBox29.Value = ActiveCell.Offset(0, 27).Value
TextBox30.Value = ActiveCell.Offset(0, 28).Value
TextBox33.Value = ActiveCell.Offset(0, 31).Value
TextBox34.Value = ActiveCell.Offset(0, 32).Value
TextBox35.Value = ActiveCell.Offset(0, 33).Value
TextBox36.Value = ActiveCell.Offset(0, 34).Value
TextBox37.Value = ActiveCell.Offset(0, 35).Value
TextBox38.Value = ActiveCell.Offset(0, 36).Value
TextBox39.Value = ActiveCell.Offset(0, 37).Value
TextBox40.Value = ActiveCell.Offset(0, 38).Value
TextBox41.Value = ActiveCell.Offset(0, 39).Value
TextBox42.Value = ActiveCell.Offset(0, 40).Value
TextBox43.Value = ActiveCell.Offset(0, 41).Value
TextBox44.Value = ActiveCell.Offset(0, 42).Value
TextBox45.Value = ActiveCell.Offset(0, 43).Value
TextBox46.Value = ActiveCell.Offset(0, 44).Value
TextBox47.Value = ActiveCell.Offset(0, 45).Value
TextBox48.Value = ActiveCell.Offset(0, 46).Value
TextBox49.Value = ActiveCell.Offset(0, 47).Value
TextBox50.Value = ActiveCell.Offset(0, 48).Value
TextBox51.Value = ActiveCell.Offset(0, 49).Value
TextBox52.Value = ActiveCell.Offset(0, 50).Value
TextBox53.Value = ActiveCell.Offset(0, 51).Value
TextBox54.Value = ActiveCell.Offset(0, 52).Value
TextBox55.Value = ActiveCell.Offset(0, 53).Value
TextBox56.Value = ActiveCell.Offset(0, 54).Value
TextBox57.Value = ActiveCell.Offset(0, 55).Value
TextBox58.Value = ActiveCell.Offset(0, 56).Value
TextBox59.Value = ActiveCell.Offset(0, 57).Value
TextBox60.Value = ActiveCell.Offset(0, 58).Value
TextBox61.Value = ActiveCell.Offset(0, 59).Value
TextBox62.Value = ActiveCell.Offset(0, 60).Value
TextBox63.Value = ActiveCell.Offset(0, 61).Value
TextBox64.Value = ActiveCell.Offset(0, 62).Value
TextBox65.Value = ActiveCell.Offset(0, 63).Value
TextBox66.Value = ActiveCell.Offset(0, 64).Value
TextBox67.Value = ActiveCell.Offset(0, 65).Value
TextBox68.Value = ActiveCell.Offset(0, 66).Value
TextBox69.Value = ActiveCell.Offset(0, 67).Value
TextBox70.Value = ActiveCell.Offset(0, 68).Value
TextBox71.Value = ActiveCell.Offset(0, 69).Value
TextBox72.Value = ActiveCell.Offset(0, 70).Value
TextBox73.Value = ActiveCell.Offset(0, 71).Value
TextBox74.Value = ActiveCell.Offset(0, 72).Value
TextBox75.Value = ActiveCell.Offset(0, 73).Value
TextBox76.Value = ActiveCell.Offset(0, 74).Value
TextBox77.Value = ActiveCell.Offset(0, 75).Value
TextBox78.Value = ActiveCell.Offset(0, 76).Value
TextBox79.Value = ActiveCell.Offset(0, 77).Value
TextBox80.Value = ActiveCell.Offset(0, 78).Value
TextBox81.Value = ActiveCell.Offset(0, 79).Value
TextBox82.Value = ActiveCell.Offset(0, 80).Value
TextBox83.Value = ActiveCell.Offset(0, 81).Value
TextBox84.Value = ActiveCell.Offset(0, 82).Value
TextBox85.Value = ActiveCell.Offset(0, 83).Value
TextBox86.Value = ActiveCell.Offset(0, 84).Value
Exit Sub
End If
txtyeni = "ESK� KAYIT"
Next bak
MsgBox "Arad���n�z isimde bir kay�t bulunamad�"
End Sub
----------kod bitir------
----------kod basla------
Sub Personel()
c = 0
For a = 1 To Cells(65536, 1).End(xlUp).Row
If Sheets("Veri").Cells(a, 10) = "" Then
c = c + 1
For b = 1 To 142
Sheets("Personel").Cells(c + 1, b) = Sheets("Veri").Cells(a, b).Value
Next b
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub KONTROLCAGIR()
KONTROL.Show 0
End Sub
Sub AyniOlanlariBulinput()
Dim hucre1, hucre2 As Range
End If
Next
Next
End Sub
Sub benzersi()
benzersiz.Show 0
End Sub
Sub AyniOlmayanlarBul()
Dim hucre1, hucre2 As Range
End If
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub bul()
a = InputBox("ARANACAK VER�Y� YAZINIZ")
b = Columns(1).Find(a).Row
For c = 1 To 4
Rows(b + 1).Insert
Next c
End Sub
----------kod bitir------
----------kod basla------
Sub AraBulLinkle()
'----------------------------------------------------------------------------------
-----
' Procedure : AraBulLinkle
' DateTime : 29.03.2005 23:14
' Author : danersin
' Purpose : www.excel.web.tr
'----------------------------------------------------------------------------------
-----
'
Dim i As Integer
Application.ScreenUpdating = False
aranan = InputBox("Arad���n�z ?")
For i = 1 To Worksheets.Count
Sheets(i).Select
If ActiveSheet.Name = "arama" Then GoTo 10
----------kod bitir------
----------kod basla------
Private Sub cmdbul_Click()
Dim bak As Range
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(cbAd.Value, vbUpperCase) Then
bak.Select
txtsira.Value = ActiveCell.Offset(0, -1).Value
txtikamet.Value = ActiveCell.Offset(0, 1).Value
txtmaas.Value = ActiveCell.Offset(0, 2).Value
Exit Sub
End If
Next bak
MsgBox "Arad���n�z isimde bir kay�t bulunamad�"
End Sub
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Workbooks("BulSilDegistir_01.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbAd.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
End Sub
'Sub EMRE()
'sndPlaySound ThisWorkbook.Path & "\1.wav", SND_ASYNC Or SND_NODEFAULT
'End Sub
Sub auto_close()
Application.StatusBar = False
ActiveWorkbook.Save
End Sub
Sub kasa()
ChDir "c:\cafe"
Workbooks.Open Filename:="c:\cafe\orjin.xls"
Sheets("HESAPLAR").Select
Range("a1").Select
Cells.Find(Date).Select
ActiveCell.Offset(0, 3).Select
SendKeys "{left}"
SendKeys "{left}"
SendKeys "{left}"
End Sub
Sub gelir_gider()
Range("AG1").Select
Range("AA1").Select 'BI1
End Sub
Sub cd_kira()
Range("BK2").Select
Range("BI2").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Sub G�NL�K_HESAP_S�L()
ActiveSheet.Unprotect Password:="a.zirvesi"
Range("AA2").Select
If Range("AA3").Value = "" Then
Range("AA2:AJ3").Select
Selection.ClearContents
Range("AK4").Value = ""
Range("A1").Select
ActiveSheet.Protect Password:="a.zirvesi"
Exit Sub
Else
Range(Selection, Selection.End(xlDown)).Select
ilk = Selection.Address
Set hucre = Range(Range(ilk), Range(ilk).Offset(0, 9))
hucre = hucre.Address
Range(hucre).Select
Selection.ClearContents
Range("AK4").Value = ""
Range("A1").Select
End If
ActiveSheet.Protect Password:="a.zirvesi"
End Sub
'Sub hesaplar�_g�ster()
'Range("A1").Select
'End Sub
Sub muhasebe()
Sheets("Giderler").Select
ActiveSheet.Unprotect Password:="a.zirvesi"
If Range("C5").Value = "" Then Range("C5").Value = Format(Date, "dd.mm.yyyy")
If Range("C5").Value = Format(Date, "dd.mm.yyyy") Then Exit Sub
If Not Range("C5").Value = "" Then
Range("C8").Value = Range("C5").Text
Range("D9").Value = Range("D6").Value
Range("D10").Value = Range("D7").Value
Range("C5").Value = Format(Date, "dd.mm.yyyy")
Range("D6").Value = "0"
Range("D7").Value = "0"
Else
Exit Sub
End If
ActiveSheet.Protect Password:="a.zirvesi"
End Sub
Sub rapor()
Sheets("Rapor").Select
End Sub
Sub raporla()
raporlama.Show
End Sub
'Sub ana_sayfa()
'Sheets("Hesaplar").Select
'End Sub
Sub Alarm1()
On Error Resume Next
If [B2].Value = "" Or [M2].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\1.wav", 2)
MsgBox " 1 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B2").Select
USER.Show
End Sub
Sub Alarm2()
On Error Resume Next
If [B3].Value = "" Or [M3].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\2.wav", 2)
MsgBox " 2 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B3").Select
USER.Show
End Sub
Sub Alarm3()
On Error Resume Next
If [B4].Value = "" Or [M4].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\3.wav", 2)
MsgBox " 3 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B4").Select
USER.Show
End Sub
Sub Alarm4()
On Error Resume Next
If [B5].Value = "" Or [M5].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\4.wav", 2)
MsgBox " 4 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B5").Select
USER.Show
End Sub
Sub Alarm5()
On Error Resume Next
If [B6].Value = "" Or [M6].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\5.wav", 2)
MsgBox " 5 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B6").Select
USER.Show
End Sub
Sub Alarm6()
On Error Resume Next
If [B7].Value = "" Or [M7].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\6.wav", 2)
MsgBox " 6 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B7").Select
USER.Show
End Sub
Sub Alarm7()
On Error Resume Next
If [B8].Value = "" Or [M8].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\7.wav", 2)
MsgBox " 7 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B8").Select
USER.Show
End Sub
Sub Alarm8()
On Error Resume Next
If [B9].Value = "" Or [M9].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\8.wav", 2)
MsgBox " 8 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B9").Select
USER.Show
End Sub
Sub Alarm9()
On Error Resume Next
If [B10].Value = "" Or [M10].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\9.wav", 2)
MsgBox " 9 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B10").Select
USER.Show
End Sub
Sub Alarm10()
On Error Resume Next
If [B11].Value = "" Or [M11].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\10.wav", 2)
MsgBox " 10 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B11").Select
USER.Show
End Sub
Sub Alarm11()
On Error Resume Next
If [B12].Value = "" Or [M12].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\11.wav", 2)
MsgBox " 11 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B12").Select
USER.Show
End Sub
Sub Alarm12()
On Error Resume Next
If [B13].Value = "" Or [M13].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\12.wav", 2)
MsgBox " 12 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B13").Select
USER.Show
End Sub
Sub Alarm13()
On Error Resume Next
If [B14].Value = "" Or [M14].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\13.wav", 2)
MsgBox " 13 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B14").Select
USER.Show
End Sub
Sub Alarm14()
On Error Resume Next
If [B15].Value = "" Or [M15].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\14.wav", 2)
MsgBox " 14 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B15").Select
USER.Show
End Sub
Sub Alarm15()
On Error Resume Next
If [B16].Value = "" Or [M16].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\15.wav", 2)
MsgBox " 15 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B16").Select
USER.Show
End Sub
Sub Alarm16()
On Error Resume Next
If [B17].Value = "" Or [M17].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\16.wav", 2)
MsgBox " 16 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B17").Select
USER.Show
End Sub
Sub Alarm17()
On Error Resume Next
If [B18].Value = "" Or [M18].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\17.wav", 2)
MsgBox " 17 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B18").Select
USER.Show
End Sub
Sub Alarm18()
On Error Resume Next
If [B19].Value = "" Or [M19].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\18.wav", 2)
MsgBox " 18 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B19").Select
USER.Show
End Sub
Sub Alarm19()
On Error Resume Next
If [B20].Value = "" Or [M20].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\19.wav", 2)
MsgBox " 19 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B20").Select
USER.Show
End Sub
Sub Alarm20()
On Error Resume Next
If [B21].Value = "" Or [M21].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\20.wav", 2)
MsgBox " 20 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B21").Select
USER.Show
End Sub
Sub Alarm21()
On Error Resume Next
If [B22].Value = "" Or [M22].Value = "" Then Exit Sub
Call sndPlaySound32(ThisWorkbook.Path & "\20.wav", 2)
MsgBox " 21 Nolu masan�n zaman� doldu.", vbInformation, "S�re Doldu."
Range("B22").Select
USER.Show
End Sub
Sub masade�i�tir()
de�i�tir.Show
End Sub
Sub fiyatlar()
�cretler.Show
End Sub
Sub deneeme()
Call sndPlaySound32(ThisWorkbook.Path & "\11.wav", 0)
Call KAPAT
End Sub
Sub KAPAT()
Call sndPlaySound32("c:\Belgelerim\pckapat.wav", 1)
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
'
' Makro2 Makro
' Makro server taraf�ndan 08.06.2004 tarihinde kaydedildi.
'
'
End Sub
----------kod bitir------
----------kod basla------
s�rasi = Range("Q1").Value
a��l�i = Range("R1").Text
kapan�i = Range("S1").Text
�ay = Range("T1").Value
kahve = Range("U1").Value
msuyu = Range("V1").Value
Printer = Range("W1").Value
scan = Range("X1").Value
extra = Range("Y1").Value
�cretyuvarla = Range("Z1").Value
Min.Caption = (Range("IV2").Value / 2)
If kuls�re.Caption < "00:30" Then �cretyuvarla = Min.Caption
If Not kuls�re.Caption < "00:30" Then �cretyuvarla =
WorksheetFunction.Ceiling(�cretyuvarla, 100000)
Sub yukle()
On Error Resume Next
'Application.ScreenUpdating = False
'Application.Visible = False
'If ActiveCell.Offset(0, 4).Text = "#SAYI!" Then
'�cret.Caption = ""
'Else
'ActiveCell.Offset(0, 1) = kapan�.Value
' �cret.Caption = Format(ActiveCell.Offset(0, 4).Value, "#,### TL ")
'End If
�cret.Caption = Format(ActiveCell.Offset(0, 4).Value, "#,### TL ")
USER.Caption = " " & ActiveCell.Offset(0, -1).Value & " Nolu Masa Hesap Detay�"
masa.Caption = ActiveCell.Offset(0, -1).Value
Labels�rm.Caption = Format(ActiveCell.Offset(0, 12), "hh:mm")
a��l�.Value = Format(ActiveCell.Offset(0, 0), "hh:mm")
kapan�.Value = Format(ActiveCell.Offset(0, 1), "hh:mm")
s�re.Value = Format(ActiveCell.Offset(0, 11), "hh:mm")
�ay.Value = ActiveCell.Offset(0, 5)
kahve.Value = ActiveCell.Offset(0, 6)
msuyu.Value = ActiveCell.Offset(0, 7)
Printer.Value = ActiveCell.Offset(0, 8)
scan.Value = ActiveCell.Offset(0, 9)
extra.Value = ActiveCell.Offset(0, 10)
hat�rlatma.Value = ActiveCell.Offset(0, 13).Text
If ActiveCell.Offset(0, 14).Value = "1" Then
odeme.Value = 1
Else
odeme.Value = 0
ActiveCell.Offset(0, 14).Value = "0"
End If
KAPAT.Value = False
If Not [B2].Value = "" Then ms1.BackColor = &HC0C0FF
If Not [B3].Value = "" Then ms2.BackColor = &HC0C0FF
If Not [B4].Value = "" Then ms3.BackColor = &HC0C0FF
If Not [B5].Value = "" Then ms4.BackColor = &HC0C0FF
If Not [B6].Value = "" Then ms5.BackColor = &HC0C0FF
If Not [B7].Value = "" Then ms6.BackColor = &HC0C0FF
If Not [B8].Value = "" Then ms7.BackColor = &HC0C0FF
If Not [B9].Value = "" Then ms8.BackColor = &HC0C0FF
If Not [B10].Value = "" Then ms9.BackColor = &HC0C0FF
If Not [B11].Value = "" Then ms10.BackColor = &HC0C0FF
If Not [B12].Value = "" Then ms11.BackColor = &HC0C0FF
If Not [B13].Value = "" Then ms12.BackColor = &HC0C0FF
If Not [B14].Value = "" Then ms13.BackColor = &HC0C0FF
If Not [B15].Value = "" Then ms14.BackColor = &HC0C0FF
If Not [B16].Value = "" Then ms15.BackColor = &HC0C0FF
If Not [B17].Value = "" Then ms16.BackColor = &HC0C0FF
If Not [B18].Value = "" Then ms17.BackColor = &HC0C0FF
If Not [B19].Value = "" Then ms18.BackColor = &HC0C0FF
If Not [B20].Value = "" Then ms19.BackColor = &HC0C0FF
If Not [B21].Value = "" Then ms20.BackColor = &HC0C0FF
If Not [B22].Value = "" Then ms21.BackColor = &HC0C0FF
'Selection.BackColor = &HC000&
If masa = 1 Then ms1.BackColor = &HC000&
If masa = 2 Then ms2.BackColor = &HC000&
If masa = 3 Then ms3.BackColor = &HC000&
If masa = 4 Then ms4.BackColor = &HC000&
If masa = 5 Then ms5.BackColor = &HC000&
If masa = 6 Then ms6.BackColor = &HC000&
If masa = 7 Then ms7.BackColor = &HC000&
If masa = 8 Then ms8.BackColor = &HC000&
If masa = 9 Then ms9.BackColor = &HC000&
If masa = 10 Then ms10.BackColor = &HC000&
If masa = 11 Then ms11.BackColor = &HC000&
If masa = 12 Then ms12.BackColor = &HC000&
If masa = 13 Then ms13.BackColor = &HC000&
If masa = 14 Then ms14.BackColor = &HC000&
If masa = 15 Then ms15.BackColor = &HC000&
If masa = 16 Then ms16.BackColor = &HC000&
If masa = 17 Then ms17.BackColor = &HC000&
If masa = 18 Then ms18.BackColor = &HC000&
If masa = 19 Then ms19.BackColor = &HC000&
If masa = 20 Then ms20.BackColor = &HC000&
If masa = 21 Then ms21.BackColor = &HC000&
End Sub
j = 14
t = 11
Do While Cells(j, 1) <> ""
bak = Choose(Month(Cells(j, 2)), "OCAK", "�UBAT", "MART", "N�SAN", "MAYIS",
"HAZ�RAN", "TEMMUZ", "A�USTOS", "EYL�L", "EK�M", "KASIM", "ARALIK")
If bak = arananay Then
For k = 1 To 10
Worksheets("rapor").Cells(t, k + 0) = Cells(j, k)
Next k
t = t + 1
End If
j = j + 1
Loop
Range("A4:H11").Select
Selection.Copy
Sheets("rapor").Select
Range("A1:B1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
cariliste.Hide
Worksheets("rapor").PrintPreview
Worksheets("rapor").PageSetup.PrintArea = ""
cariliste.Show
Application.Calculation = xlCalculationAutomatic
End Sub
End Sub
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
ActiveCell.Offset(0, 3).Value = TextBox3.Value
ActiveCell.Offset(0, 4).Value = 1 * (TextBox4.Value)
ActiveCell.Offset(0, 5).Value = 1 * (TextBox5.Value)
TextBox2.Value = ""
TextBox3.Value = ""
MsgBox ("Bilgiler veri taban�na kay�t edildi.")
ActiveWorkbook.Save
TextBox4.Value = "0"
TextBox5.Value = "0"
Label8 = "KAYIT YAPILDI..!"
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
TextBox1 = Range("ANASAYFA!B2").Value
TextBox6 = Range("G11").Value
TextBox8 = Range("E11").Value
TextBox9 = Range("F11").Value
TextBox10 = Range("G11").Value
TextBox4.Value = "0"
TextBox5.Value = "0"
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("ANASAYFA").Select
rapor.Show
End Sub
----------kod bitir------
----------kod basla------
Private arananay
Range("F6").Value = TextBox8.Value
Range("F7").Value = TextBox9.Value
Range("F8").Value = TextBox10.Value
Range("C11").Value = TextBox11.Value
Dim i As Integer
If TextBox12.Value = "" Then
MsgBox "Sayfa Ad�n� Yazmad�n�z.."
Exit Sub
End If
For i = 1 To Worksheets.Count
If Worksheets(i).Name = TextBox12.Value Then
MsgBox "Bu �simde Bir Sayfa Var.."
Exit Sub
End If
Next i
ThisWorkbook.Sheets("DATA").Copy After:=Sheets(Worksheets.Count)
ActiveSheet.Name = TextBox12.Value
Unload Me
Sheets("ANASAYFA").Select
ActiveSheet.Unprotect
Range("a5").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
If Range("a5").Value = "" Then
Range("a5").Value = 1
Else
ActiveCell.Value = ActiveCell.Offset(-1, 0).Value + 1
End If
ActiveCell.Offset(0, 1).Value = TextBox12.Value
TextBox1.Value = ""
Unload Me
rapor.Show
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
'
Private Sub UserForm_Activate()
Dim hWndForm As Long, frmStyle As Long
hWndForm = FindWindow(vbNullString, Me.Caption)
frmStyle = GetWindowLong(hWndForm, (-16))
frmStyle = frmStyle Or &H80000 Or &H20000 Or &H10000
SetWindowLong hWndForm, (-16), frmStyle
ShowWindow hWndForm, 5
DrawMenuBar hWndForm
Sheets("MEN�").Select
End Sub
gelenfatura.Show
End Sub
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = cbAd.Value
ActiveCell.Offset(0, 3).Value = TextBox3.Value
ActiveCell.Offset(0, 4).Value = 1 * (TextBox4.Value)
ActiveCell.Offset(0, 5).Value = ComboBox5.Value
TextBox1.Value = ""
cbAd.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
ComboBox5.Value = ""
MsgBox ("Bilgiler veri taban�na kay�t edildi.")
ActiveWorkbook.Save
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
txtsira.Value = WorksheetFunction.Count(Range("A4:A65000")) + 1
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
End Sub
End Sub
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = cbAd.Value
ActiveCell.Offset(0, 3).Value = TextBox3.Value
ActiveCell.Offset(0, 4).Value = 1 * (TextBox4.Value)
ActiveCell.Offset(0, 5).Value = 1 * (TextBox5.Value)
ActiveCell.Offset(0, 6).Value = 1 * (TextBox6.Value)
TextBox1.Value = ""
cbAd.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
MsgBox ("Bilgiler veri taban�na kay�t edildi.")
ActiveWorkbook.Save
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
End Sub
txtsira.Value = WorksheetFunction.Count(Range("A5:A65000")) + 1
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
txtsira.Value = WorksheetFunction.Count(Range("A2:A65000")) + 1
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
End Sub
txtsira.Value = WorksheetFunction.Count(Range("A5:A65000")) + 1
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
txtsira.Value = WorksheetFunction.Count(Range("A2:A65000")) + 1
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
ActiveCell.Offset(0, 3).Value = TextBox4.Value
ActiveCell.Offset(0, 4).Value = TextBox5.Value
ActiveCell.Offset(0, 6).Value = TextBox3.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
MsgBox ("Bilgiler veri taban�na kay�t edildi.")
Application.ScreenUpdating = True
End Sub
End Sub
TextBox28 = Range("KASA!C9").Value
TextBox27 = Range("KASA!D9").Value
TextBox26 = Range("KASA!E9").Value
TextBox25 = Range("KASA!F9").Value
TextBox32 = Range("KASA!C10").Value
TextBox31 = Range("KASA!D10").Value
TextBox30 = Range("KASA!E10").Value
TextBox29 = Range("KASA!F10").Value
TextBox36 = Range("KASA!C4").Value
TextBox35 = Range("KASA!D4").Value
TextBox34 = Range("KASA!E4").Value
TextBox33 = Range("KASA!F4").Value
TextBox20 = Range("KASA!C11").Value
TextBox19 = Range("KASA!D11").Value
TextBox18 = Range("KASA!E11").Value
TextBox17 = Range("KASA!F11").Value
TextBox24 = Range("KASA!C2").Value
TextBox23 = Range("KASA!D2").Value
TextBox22 = Range("KASA!E2").Value
TextBox21 = Range("KASA!F2").Value
a = WorksheetFunction.CountA(Sheets("KASA").Range("C12:G65536")) + 1
ListBox1.RowSource = "KASA!C13:G" & a
ListBox1.ColumnCount = 6
ListBox1.ColumnHeads = True
ListBox1.ColumnWidths = "88;70;70;70;70"
End Sub
----------kod bitir------
----------kod basla------
End Sub
----------kod bitir------
----------kod basla------
Sub forma�1()
anamenu.Show
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Application.AskToUpdateLinks = False
Sheets("MEN�").Select
anamenu.Show
End Sub
----------kod bitir------
----------kod basla------
Sub �ifrele()
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Sub �ifreac()
ActiveSheet.Unprotect
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("MEN�").Select
Range("sirketbilgileri").Value = TextBox1.Value
Unload Me
anamenu.Show
End Sub
Sub auto_open()
Dim cbMenu As CommandBarControl, cbSubMenu As CommandBarControl
Sheets("Giris").Select
Range("B10").Select
'...........................................................
'Ana men�ye men� ekler
Set cbMenu = Application.CommandBars(1).Controls.Add(msoControlPopup, , , ,
True)
With cbMenu
.Caption = "&Cari Hesap"
.Tag = "MyTag"
.BeginGroup = False
End With
'............................................................
If cbMenu Is Nothing Then Exit Sub
'Kart A�
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart A�..."
.OnAction = "yenifirma"
'.FaceId = 281
End With
'Kart Sil
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart S�L..."
.OnAction = "sil"
'.FaceId = 273
End With
'............................................................
'Giri�e D�n
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Ana Men�ye D�n..."
.OnAction = "anamenu"
'.FaceId = 592
End With
'Cari Hesap Formu
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Cari Hesap Formu..."
.OnAction = "chkaydiac"
'.FaceId = 592
End With
'�deme Formu
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "�deme Formu..."
.OnAction = "chodemeac"
'.FaceId = 592
End With
'M�teri �zet Formu
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "M�teri �zet Formu... "
.OnAction = "mozetac"
'.FaceId = 592
End With
End Sub
Sub RemoveMenu()
DeleteCustomCommandBarControl "MyTag" ' deletes the new menu
End Sub
Private Sub DeleteCustomCommandBarControl(CustomControlTag As String)
On Error Resume Next
Do
Application.CommandBars.FindControl(, , CustomControlTag, False).Delete
Loop Until Application.CommandBars.FindControl(, , CustomControlTag, False) Is
Nothing
On Error GoTo 0
End Sub
Sub auto_close()
RemoveMenu
Sheets("Giris").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub Calendar1_Click()
ctarih.Value = Calendar1.Value
Calendar1.Height = 0
Calendar1.Width = 0
caciklama.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Private Sub chkapat1_Click()
chodeme.Hide
End Sub
Private Sub UserForm_Activate()
Calendar1.Height = 120
Calendar1.Width = 156
Calendar1.Today
cmiktar1.Enabled = False
cfiyat1.Enabled = False
ctutar1.Enabled = False
cmiktar1.BackColor = &H8000000F
cfiyat1.BackColor = &H8000000F
ctutar1.BackColor = &H8000000F
End Sub
Private Sub Calendar1_Click()
ctarih1.Value = Calendar1.Value
Calendar1.Height = 0
Calendar1.Width = 0
caciklama1.SetFocus
End Sub
'Verileri aktif sayfaya kaydeder.
Private Sub chkaydet1_Click()
'A6 s�tunundan ba�layarak rakam yazd�r�r.
Range("A6").Select
'ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
If Range("A6").Value = "" Then
Range("A6").Value = 1
Else
ActiveCell.Value = ActiveCell.Offset(-1, 0).Value + 1
End If
'..........................................................
'Textbox kutular�ndaki verileri h�crelere yazd�r�r.
ActiveCell.Offset(0, 1).Value = ctarih1.Value
ActiveCell.Offset(0, 2).Value = caciklama1.Value
ActiveCell.Offset(0, 7).Value = codeme1.Value
MsgBox "Kay�t Tamam.", , "Kay�t"
End Sub
Private Sub ctarih1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As
Integer)
Calendar1.Height = 0
Calendar1.Width = 0
End Sub
Private Sub ctarih1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Calendar1.Height = 120
Calendar1.Width = 156
Calendar1.Left = 156
Calendar1.Top = 6
End Sub
Private Sub ctarih1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As
Integer)
Calendar1.Height = 120
Calendar1.Width = 156
Calendar1.Left = 156
Calendar1.Top = 6
End Sub
----------kod bitir------
----------kod basla------
'sonu�lar yazd�r�l�yor
Range("F1").FormulaR1C1 = "=SUM(R[5]C:R[999]C)"
Range("H1").FormulaR1C1 = "=SUM(R[5]C:R[999]C)"
Range("G1").FormulaR1C1 = "=RC[-1]-RC[1]"
MsgBox "Yeni Firma " & adi.Text & " kayd� tamamland�.", , "Tebrikler"
For i = 1 To tk
Cells(i, 1).Value = Worksheets(i).Name
'veri sayfas� A'dan Z'ye s�ralan�r.
'Range("A1").Select
'Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
'OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Next i
----------kod bitir------
----------kod basla------
Private Sub firsil_Click()
If silbox.Value = "" Then Exit Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Activate()
If Sheets("Anasayfa").Range("A1") = "1" Then
Sheets("Personel").Range("C74").Copy 'Kurum Ad�'
Sheets("Sevk").Range("C3").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
End If
----------kod bitir------
----------kod basla------
Sub karsilastir()
On Error Resume Next
a = WorksheetFunction.CountA(Sheets("BILGI").Range("A2:A65532"))
For b = 2 To a + 1
Cells(b, 1) = Mid(Cells(b, 1), 1, 6)
Cells(b, 2) = Sheets("DATA").Cells(Sheets("DATA").Range("A:A").Find(Cells(b,
1).Value).Row, 2)
Next b
Application.ScreenUpdating = False
For c = 2 To a + 1
For d = a + 1 To c + 1 Step -1
If Cells(c, 1) = Cells(d, 1) Then
Rows(d).Delete
End If
Next d
Next c
dd = WorksheetFunction.CountA(Sheets("BILGI").Range("A2:A65532"))
For e = 2 To dd + 1
If Cells(e, 2) = "" Then
f = WorksheetFunction.CountA(Sheets("DATA").Range("A2:A65532")) + 2
Sheets("DATA").Cells(f, 1) = Cells(e, 1)
Sheets("DATA").Cells(f, 2) = "New"
End If
Next e
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub test_fncCreateCommentIndicator()
fncCreateCommentIndicator vbGreen
End Sub
Sub test_fncCreateCommentIndicator1()
fncCreateCommentIndicator vbBlue
End Sub
----------kod bitir------
----------kod basla------
Sub git()
'
' git Makro
' Makro .. taraf�ndan 14/02/2001 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("F3").Select
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
End Property
----------kod bitir------
----------kod basla------
Option Explicit
Dim k As New Class1
Sheets("istakip").Select
Range("d1").Select
Dim sayi As Integer
Dim hucre As Range
sayi =
Application.WorksheetFunction.CountA(Worksheets("istakip").Range("a1:a20000"))
For Each hucre In Range("d1:d" & sayi)
If OptionButton2.Value = True Then
If ComboBox2.Value = hucre.Value Then
ListBox1.AddItem (hucre.Offset(0, 1).Value)
ListBox2.AddItem (hucre.Offset(0, -3).Value)
End If
ElseIf OptionButton1.Value = True Then
If ComboBox2.Value = hucre.Value And hucre.Offset(0, 35).Value = ""
Then
ListBox1.AddItem (hucre.Offset(0, 1).Value)
ListBox2.AddItem (hucre.Offset(0, -3).Value)
End If
Else
If ComboBox2.Value = hucre.Value And hucre.Offset(0, 36).Value >
Range("ap1").Value Then
ListBox1.AddItem (hucre.Offset(0, 1).Value)
ListBox2.AddItem (hucre.Offset(0, -3).Value)
End If
End If
Next
End Sub
End Sub
Private Sub ComboBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
End Sub
End Sub
With TextBox1
.Locked = False
.BackStyle = fmBackStyleOpaque
End With
Sheets("istakip").Select
Range("a1").Select
Dim i As Integer
Dim a
Dim j As Integer
Dim say1 As Integer
i = ListBox1.ListIndex
a = ListBox2.List(i)
ListBox3.Clear
Exit Sub
381:
If Err = 381 Then
MsgBox "Se�ili bir kay�t yok.L�tfen kay�tlar �zerine t�klay�n�z"
End If
End Sub
Private Sub ListBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim i As Integer
'Dim say As Range
'Dim sayl
'sayl = ListBox3.Value
'Dim son As Integer
'son = 1
' For i = 1 To 42
' Set say = Cells(1, i)
' If say.Value = sayl Then GoTo git
' son = son + 1
' Next
'git:
TextBox1.Value = ActiveCell.Offset(0, k.SatirSay - 1).Value
End Sub
End Sub
End Sub
With TextBox1
.Locked = True
.BackStyle = fmBackStyleTransparent
End With
OptionButton2.Value = True
ListBox1.RowSource = ""
End Sub
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub formAc()
frmduzelt.Show
End Sub
----------kod bitir------
----------kod basla------
Sub getir()
End Sub
----------kod bitir------
----------kod basla------
'
' Macro1 Macro
' Macro recorded 8/31/96 by John Lacher
'
'
Sub ChangeShading()
----------kod bitir------
----------kod basla------
Dim bassat, bitsat As Integer
Private Sub ComboBox1_Click()
bassat = Columns(1).Find(ComboBox1.Value).Row
bitsat = WorksheetFunction.CountIf(Columns(1), ComboBox1.Value) + bassat - 1
adres = "sayfa1!b" & bassat & ":b" & bitsat
ComboBox2.RowSource = adres
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
'****************
' Main Function *
'****************
Function SpellNumber(ByVal MyNumber)
Count = 1
Do While MyNumber <> ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
'*******************************************
' Converts a number from 100-999 into text *
'*******************************************
Function GetHundreds(ByVal MyNumber)
Dim Result As String
GetHundreds = Result
End Function
'*********************************************
' Converts a number from 10 to 99 into text. *
'*********************************************
Function GetTens(TensText)
Dim Result As String
'*******************************************
' Converts a number from 1 to 9 into text. *
'*******************************************
Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "Bir"
Case 2: GetDigit = "�ki"
Case 3: GetDigit = "��"
Case 4: GetDigit = "D�rt"
Case 5: GetDigit = "Be�"
Case 6: GetDigit = "Alt�"
Case 7: GetDigit = "Yedi"
Case 8: GetDigit = "Sekiz"
Case 9: GetDigit = "Dokuz"
Case Else: GetDigit = ""
End Select
End Function
----------kod bitir------
----------kod basla------
Sub aa()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub SpinButton1_Change()
CommandButton1.Top = 104 - SpinButton1.Value * 10
CommandButton1.Caption = "YUKARI-A�A�I"
End Sub
Private Sub SpinButton2_Change()
CommandButton1.Left = 2 + SpinButton2.Value * 20
CommandButton1.Caption = "SA�A-SOLA"
End Sub
Private Sub UserForm_Initialize()
SpinButton1.Value = 5
SpinButton2.Value = 5
CommandButton1.Caption = ""
End Sub
----------kod bitir------
----------kod basla------
'//////////////////NOTE/////////////////////////////////
' You will need to add a reference to the AutoCAD 2000
' Type Library to run this example book. Use the "Tools -
' References" menu. If you prefere you can switch to late
' binding by changeing the AutoCAD types to generic objects
Option Explicit
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub Sayfa_ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Else
TextBox1.Value = ""
MsgBox "�lem �ptal Edildi...", vbInformation, ""
Exit Sub
End If
TextBox1.Value = ""
Unload Me
End If
End Sub
End Sub
Else
TextBox4.Value = ""
MsgBox "�lem �ptal Edildi...", vbInformation, ""
Exit Sub
End If
TextBox4.Value = ""
Unload Me
End If
End Sub
End Sub
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "sayfa1!A1:A50" 'combobox1'e sayfa1 deki A1:A10 aral���ndaki
de�erleri atar
ListBox1.RowSource = "sayfa1!A2:C50" 'listbox1'e sayfa1 deki A2:B10 aral���ndaki
de�erleri atar
ListBox1.ColumnHeads = True 'listboxta s�tun ba�l�klar�n� g�r�n�r hale getirir
burada ba�l�k A1:B1 aral���d�r.
ListBox1.ColumnCount = 7 's�tun say�s�-ka� veri varsa o kadar s�tun a��lmal�d�r
ListBox1.ColumnWidths = "20;50;40;30;50;40;40" 'a��lan s�tunlar�n geni�likleri.
End Sub
----------kod bitir------
----------kod basla------
Sub Sayfa_ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton2_Click()
Load UserForm1
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Sub D��me2_T�klat()
Load Form1
Form1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub Label2_Click()
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub FormAc()
UserForm2.Show
End Sub
----------kod bitir------
----------kod basla------
Sub gelen_giden_sayfasi_ac()
MsgBox "NOT:Bu Sayfaya Girilen Verileri Ayl�k Bilgiler Tablosundan
g�r�nt�leyebilirsiniz...", vbInformation
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("GELEN_G�DEN").Select
Range("A16:C17").Select
End Sub
----------kod bitir------
----------kod basla------
Sub ANA_SAYFA_KAPI()
Sub manuel_avans_giris()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("DATA").Select
Range("A1").Select
End Sub
Sub gelen_giiden_avans_print()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("GELEN_G�DEN").Select
Range("A16:L71").Select
ActiveSheet.PageSetup.PrintArea = "$A$16:$L$71"
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("ANA MEN�").Select
Range("AE9").Select
End Sub
----------kod bitir------
----------kod basla------
Sub sayfaya_git_manuel()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("MANUEL").Select
Range("B5").Select
End Sub
----------kod bitir------
----------kod basla------
Sub auto_save_toplam_yansitma()
Range("AR30").Select
ActiveCell.FormulaR1C1 = "=auto_save_toplam"
Range("AR30").Select
End Sub
----------kod bitir------
----------kod basla------
Sub F�S_G�R�S_MOD_YAZD�R()
'
' F�S_G�R�S_MOD_YAZD�R Makro
' Makro sat01 taraf�ndan 25.02.2005 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("AUTO_SAVE").Select
Range("A1:G55").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$G$55"
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("ANA MEN�").Select
Range("AD19").Select
End Sub
----------kod bitir------
----------kod basla------
Sub gelen_giden_hlp()
MsgBox "Bu alandaki Verileri g�rmek i�in i�lemler men�s�ndeki Gelen
avanslar/G�nderilen Fi�ler B�l�m�nden giri� yapman�z gerekir.", vbInformation
End Sub
----------kod bitir------
----------kod basla------
Sub avans_giris_listele_print()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("DATA").Select
Range("A1:E101").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$E$101"
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("ANA MEN�").Select
Range("AP13").Select
End Sub
----------kod bitir------
----------kod basla------
Sub tarih()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("G4")
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub deneme()
Range("I20:O" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("J4")
Range("I20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub tarih_sira_auto()
MsgBox "Girmi� Oldu�unuz Veriler Tarih S�ras�na G�re S�ralanacakt�r.",
vbInformation
Range("A3:G50" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("A4")
Range("B3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Ayl�k_giris_print()
Range("A1:G52").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$G$52"
ActiveWindow.SelectedSheets.PrintPreview
End Sub
----------kod bitir------
----------kod basla------
Sub AV_GIR_2004()
ActiveWindow.SmallScroll Down:=51
Range("A72:I73").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Kredi_kart()
MsgBox "Men� Yap�m a�amas�ndad�r.", vbInformation, "suleymanaltinn@hotmail.com"
End Sub
----------kod bitir------
----------kod basla------
Sub GELEN_AVANS_GOSTERGE()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=GELEN_AVANS_TOPLAMI"
Range("L12:P13").Select
End Sub
Sub GON_FIS_TOP_GOSTERGE()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=GONDERILEN_FISLER_TOPLAMI"
Range("L12:P13").Select
End Sub
Sub KULL_AVANS_GOSTERGE()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=KULLANILABILIR_AVANS"
Range("L12:P13").Select
End Sub
----------kod bitir------
----------kod basla------
Sub sayfaya_git()
Sheets([L20].Value).Select
End Sub
----------kod bitir------
----------kod basla------
Sub VERI_YOK()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=K_KART_YOK"
Range("L12:P13").Select
End Sub
----------kod bitir------
----------kod basla------
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
y$(0) = ""
y$(1) = "ON"
y$(2) = "Y�RM�"
y$(3) = "OTUZ"
y$(4) = "KIRK"
y$(5) = "ELL�"
y$(6) = "ALTMI�"
y$(7) = "YETM��"
y$(8) = "SEKSEN"
y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = "" Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) < Asc("0")) Then GoTo
hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
a$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�Z"
Else
e$ = b$(c(1)) + "Y�Z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "B�RB�N") Then e$ = "B�N"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "SIFIR"
If pozitif = 0 Then s$ = "" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Sub CALC()
MsgBox "�stek ve �nerileriniz ��in suleymanaltinn@hotmail.com", vbInformation
Range("AM11").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
----------kod bitir------
----------kod basla------
Private Sub bul_Click()
End Sub
Sheets("DATA").Cells(dene, 1) = TextBox1.Text
Sheets("DATA").Cells(dene, 2) = TextBox2.Text
Sheets("DATA").Cells(dene, 3) = TextBox3.Text
Sheets("DATA").Cells(dene, 4) = TextBox5.Text & "YTL"
Sheets("DATA").Cells(dene, 5) = TextBox6.Text
TextBox1.Text = sira + 1
TextBox2.Text = ""
MsgBox "Kay�t i�lemi Tamamland�", vbInformation
TextBox2.Value = ""
TextBox3.Value = ""
TextBox5.Value = ""
TextBox2.SetFocus
TextBox7 = [AA4].Value
End If
End Sub
Sub manuel_avans_giris()
'
' manuel_avans_giris Makro
' Makro pc taraf�ndan 24.02.2005 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("DATA").Select
Range("A1").Select
End Sub
End Sub
End Sub
End Sub
End Sub
TextBox6.Text = Year(Date)
TextBox1.Text = Sheets("DATA").Cells(say, 1) + 1
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub boyut()
Range("A1").Select
With Selection.Font
.Name = "Arial"
.Size = Cells(1, 4).Value
End With
End Sub
----------kod bitir------
----------kod basla------
Sub mesaj1()
'
' mesaj1 Makro
' Makro ferbay taraf�ndan 19.03.2005 tarihinde kaydedildi.
'
'
End Sub
Sub silgi()
'
' silgi Makro
' Makro taraf�ndan 19.03.2005 tarihinde kaydedildi.
'
'
Range("D1").Select
ActiveCell.FormulaR1C1 = "1"
Range("D2").Select
ActiveCell.FormulaR1C1 = "1"
Range("D3").Select
ActiveCell.FormulaR1C1 = "1"
Range("D4").Select
ActiveCell.FormulaR1C1 = "1"
Range("D5").Select
ActiveCell.FormulaR1C1 = "1"
Range("D6").Select
ActiveCell.FormulaR1C1 = "1"
Range("D7").Select
ActiveCell.FormulaR1C1 = "1"
Range("D8").Select
ActiveCell.FormulaR1C1 = "1"
Range("D9").Select
ActiveCell.FormulaR1C1 = "1"
Range("D10").Select
ActiveCell.FormulaR1C1 = "1"
Range("D11").Select
ActiveCell.FormulaR1C1 = "1"
Range("D12").Select
ActiveCell.FormulaR1C1 = "1"
Range("D13").Select
ActiveCell.FormulaR1C1 = "1"
Range("D14").Select
ActiveCell.FormulaR1C1 = "1"
Range("D15").Select
ActiveCell.FormulaR1C1 = "1"
Range("D16").Select
ActiveCell.FormulaR1C1 = "1"
Range("D17").Select
ActiveCell.FormulaR1C1 = "1"
Range("D18").Select
ActiveCell.FormulaR1C1 = "1"
Range("D19").Select
ActiveCell.FormulaR1C1 = "1"
Range("D20").Select
ActiveCell.FormulaR1C1 = "1"
Range("D21").Select
ActiveCell.FormulaR1C1 = "1"
Range("D22").Select
ActiveCell.FormulaR1C1 = "1"
Range("D23").Select
ActiveCell.FormulaR1C1 = "1"
Range("D24").Select
ActiveCell.FormulaR1C1 = "1"
Range("D25").Select
ActiveCell.FormulaR1C1 = "1"
Range("D26").Select
ActiveCell.FormulaR1C1 = "1"
Range("D1:D26").Select
Selection.ClearContents
End Sub
----------kod bitir------
----------kod basla------
Private Sub eTOKEN1_ReadProperties(PropBag As VBRUN.PropertyBag)
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
If vbYes = MsgBox("S�ralanacak Alan� Se�tiyseniz ok", vbYesNo) Then
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End If
End Sub
----------kod bitir------
----------kod basla------
Sub FrmAc()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Sub FrmAc()
UserForm1.Show
End Sub
End Sub
----------kod bitir------
----------kod basla------
Public var, gun
Range("b1:AL360").Select
var = ComboBox2.Value
gun = ComboBox1.Value + 6
Selection.AutoFilter Field:=gun, Criteria1:=var
Range("b1").Select
Selection.CurrentRegion.Select
Selection.Copy
Worksheets.Add
Cells(1, 1).Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Worksheets("ayl�k").Activate
Range("b1:AL360").Select
Selection.AutoFilter
Cells(1, 1).Select
UserForm1.Hide
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
ComboBox2.AddItem "S1"
ComboBox2.AddItem "A1"
ComboBox2.AddItem "G1"
'initialize
End Sub
----------kod bitir------
----------kod basla------
Sub dene()
Dim renk(14)
For i = 1 To 14
renk(i) = Cells(i, 1).Interior.ColorIndex
Next i
c = ActiveCell.Interior.ColorIndex
For j = 1 To 14
If c = renk(j) Then
For k = ActiveCell.Column + 1 To ActiveCell.Column + Cells(j, 2) - 1
If Cells(ActiveCell.Row, k).Interior.ColorIndex > 1 Then
xxx = MsgBox("yolumda boya var")
Exit Sub
End If
Next k
Range(Cells(ActiveCell.Row, ActiveCell.Column), Cells(ActiveCell.Row,
ActiveCell.Column + Cells(j, 2))).Interior.ColorIndex = renk(j)
End If
Next j
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Sub manuel_avans_giris()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("DATA").Select
Range("A1").Select
End Sub
Sub gelen_giiden_avans_print()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("GELEN_G�DEN").Select
Range("A16:L71").Select
ActiveSheet.PageSetup.PrintArea = "$A$16:$L$71"
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("ANA MEN�").Select
Range("AE9").Select
End Sub
----------kod bitir------
----------kod basla------
Sub sayfaya_git_manuel()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("MANUEL").Select
Range("B5").Select
End Sub
----------kod bitir------
----------kod basla------
Sub auto_save_toplam_yansitma()
Range("AR30").Select
ActiveCell.FormulaR1C1 = "=auto_save_toplam"
Range("AR30").Select
End Sub
----------kod bitir------
----------kod basla------
Sub F�S_G�R�S_MOD_YAZD�R()
'
' F�S_G�R�S_MOD_YAZD�R Makro
' Makro sat01 taraf�ndan 25.02.2005 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("AUTO_SAVE").Select
Range("A1:G55").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$G$55"
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("ANA MEN�").Select
Range("AD19").Select
End Sub
----------kod bitir------
----------kod basla------
Sub gelen_giden_hlp()
MsgBox "Bu alandaki Verileri g�rmek i�in i�lemler men�s�ndeki Gelen
avanslar/G�nderilen Fi�ler B�l�m�nden giri� yapman�z gerekir.", vbInformation
End Sub
----------kod bitir------
----------kod basla------
Sub avans_giris_listele_print()
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("DATA").Select
Range("A1:E101").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$E$101"
ActiveWindow.SelectedSheets.PrintPreview
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("ANA MEN�").Select
Range("AP13").Select
End Sub
----------kod bitir------
----------kod basla------
Sub tarih()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("G4")
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub deneme()
Range("I20:O" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("J4")
Range("I20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub tarih_sira_auto()
MsgBox "Girmi� Oldu�unuz Veriler Tarih S�ras�na G�re S�ralanacakt�r.",
vbInformation
Range("A3:G50" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("A4")
Range("B3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Ayl�k_giris_print()
Range("A1:G52").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$G$52"
ActiveWindow.SelectedSheets.PrintPreview
End Sub
----------kod bitir------
----------kod basla------
Sub AV_GIR_2004()
ActiveWindow.SmallScroll Down:=51
Range("A72:I73").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Kredi_kart()
MsgBox "Men� Yap�m a�amas�ndad�r.", vbInformation, "suleymanaltinn@hotmail.com"
End Sub
----------kod bitir------
----------kod basla------
Sub GELEN_AVANS_GOSTERGE()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=GELEN_AVANS_TOPLAMI"
Range("L12:P13").Select
End Sub
Sub GON_FIS_TOP_GOSTERGE()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=GONDERILEN_FISLER_TOPLAMI"
Range("L12:P13").Select
End Sub
Sub KULL_AVANS_GOSTERGE()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=KULLANILABILIR_AVANS"
Range("L12:P13").Select
End Sub
----------kod bitir------
----------kod basla------
Sub sayfaya_git()
Sheets([L20].Value).Select
End Sub
----------kod bitir------
----------kod basla------
Sub VERI_YOK()
Range("L12:P13").Select
ActiveCell.FormulaR1C1 = "=K_KART_YOK"
Range("L12:P13").Select
End Sub
----------kod bitir------
----------kod basla------
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
y$(0) = ""
y$(1) = "ON"
y$(2) = "Y�RM�"
y$(3) = "OTUZ"
y$(4) = "KIRK"
y$(5) = "ELL�"
y$(6) = "ALTMI�"
y$(7) = "YETM��"
y$(8) = "SEKSEN"
y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = "" Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) < Asc("0")) Then GoTo
hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
a$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�Z"
Else
e$ = b$(c(1)) + "Y�Z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "B�RB�N") Then e$ = "B�N"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "SIFIR"
If pozitif = 0 Then s$ = "" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Sub CALC()
MsgBox "�stek ve �nerileriniz ��in suleymanaltinn@hotmail.com", vbInformation
Range("AM11").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
----------kod bitir------
----------kod basla------
Private Sub bul_Click()
End Sub
Sheets("DATA").Cells(dene, 1) = TextBox1.Text
Sheets("DATA").Cells(dene, 2) = TextBox2.Text
Sheets("DATA").Cells(dene, 3) = TextBox3.Text
Sheets("DATA").Cells(dene, 4) = TextBox5.Text & "YTL"
Sheets("DATA").Cells(dene, 5) = TextBox6.Text
TextBox1.Text = sira + 1
TextBox2.Text = ""
MsgBox "Kay�t i�lemi Tamamland�", vbInformation
TextBox2.Value = ""
TextBox3.Value = ""
TextBox5.Value = ""
TextBox2.SetFocus
TextBox7 = [AA4].Value
End If
End Sub
Sub manuel_avans_giris()
'
' manuel_avans_giris Makro
' Makro pc taraf�ndan 24.02.2005 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
Sheets("DATA").Select
Range("A1").Select
End Sub
End Sub
End Sub
End Sub
End Sub
Private Sub UserForm_Initialize()
TextBox2.Text = Date
ComboBox1.RowSource = "DATA!A1:A100" 'combobox1'e sayfa1 deki A1:A10 aral���ndaki
de�erleri atar
ListBox1.RowSource = "DATA!A2:E100" 'listbox1'e sayfa1 deki A2:B10 aral���ndaki
de�erleri atar
ListBox1.ColumnHeads = True 'listboxta s�tun ba�l�klar�n� g�r�n�r hale getirir
burada ba�l�k A1:B1 aral���d�r.
ListBox1.ColumnCount = 5 's�tun say�s�-ka� veri varsa o kadar s�tun a��lmal�d�r
ListBox1.ColumnWidths = "30;60;70;50;20" 'a��lan s�tunlar�n geni�likleri.
End Sub
Private Sub TextBox1_Change()
End Sub
TextBox6.Text = Year(Date)
TextBox1.Text = Sheets("DATA").Cells(say, 1) + 1
End Sub
For i = 1 To 14
renk(i) = Cells(i, 1).Interior.ColorIndex
Next i
a = ActiveCell.Interior.ColorIndex
For j = 1 To 14
If a = renk(j) Then
For k = ActiveCell.Column + 1 To ActiveCell.Column + Cells(j, 2) - 1
If Cells(ActiveCell.Row, k).Interior.ColorIndex > 1 Then
xxx = MsgBox("yolumda boya var")
Exit Sub
End If
Next k
Range(Cells(ActiveCell.Row, ActiveCell.Column), Cells(ActiveCell.Row,
ActiveCell.Column + Cells(j, 2) - 1)).Interior.ColorIndex = renk(j)
End If
Next j
End Sub
----------kod bitir------
----------kod basla------
Sub Ac()
AppActivate (Shell("calc.exe", 1))
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'dosyan�z�n adresi
Workbooks.Open Filename:="D:\13_20 PM\vbac\Visual Basic\forum\t.xls"
Range("A1").Select
Selection.Copy
ActiveWindow.Close
Range("I1").Select
ActiveSheet.Paste
Range("g6").Value = Range("g6").Value + 1
Range("g6").Select
Selection.Copy
'adresi de�i�tirin
Workbooks.Open Filename:="D:\13_20 PM\vbac\Visual Basic\forum\t.xls"
Range("A1").Select
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'dosyan�z�n adresi
Range("g6").Value = Range("g6").Value + 1
Range("g6").Select
Selection.Copy
'adresi de�i�tirin
Workbooks.Open Filename:="D:\13_20 PM\vbac\Visual Basic\forum\t.xls"
Range("A1").Select
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
---------------------------------------------------------------------------
' rakami yaz�ya �evir
Public Function ParaCevir(Para)
Dim ParaStr As String
Dim Lira As String, Kurus As String
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " YTL " & Cevir(Kurus) &
" YKR"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
----------kod bitir------
----------kod basla------
Sub makro1()
'
' Makro1 Makro
' Makro Hamit taraf�ndan 20.11.2004 tarihinde kaydedildi.
'
' Klavye K�sayolu: Ctrl+�stKrkt+Q
'
Rows("3:3").Select
Selection.Font.ColorIndex = 3
Selection.Cut
Rows("24:24").Select
Selection.Insert Shift:=xlDown
Range("A2").Select
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
If TextBox1.Value <> "" Then
Sheets("stok").Activate
Cells(2, 1).Select
Do While ActiveCell.Value <> ""
If Trim(ActiveCell.Value) = Trim(Me.TextBox1.Value) Then
If MsgBox(Me.TextBox1 & " ADLI STOK KAYDI VARDIR." & " YEN�DEN KAYIT YAPILSINMI?",
vbYesNo, "M�kerrer Kay�t") = vbNo Then Exit Sub
End If
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Value = TextBox1.Value
End If
Dim say As Integer
Dim sirasi As String
say = Application.CountA(Sheets("stok").Columns("A"))
sirasi = "A" & say
TextBox1.Text = ""
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub CommandButton3_Click()
Dim MyData As Range
Dim MyQ As VbMsgBoxResult
On Error GoTo NoData:
If Len(TextBox2) >= 1 Then
Set MyData = Columns("A").Find(TextBox2)
If Not MyData Is Nothing And LCase(TextBox2) = LCase(MyData) Then
TextBox1 = MyData.Value
Else
NoData:
MsgBox "Aran�lan veri bulunamad� ..."
Exit Sub
On Error GoTo 0
End If
End If
End If
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
On Error Resume Next
a = Sheets("STOK").Range("A2:A65532").Find(ComboBox1.Value).Row
Cells(a, 3) = Cells(a, 3) + TextBox2.Value
Cells(a, 4) = Cells(a, 2) - Cells(a, 3)
Label7 = Cells(a, 4).Value
Label8 = Cells(a, 5).Value
If Cells(a, 4) < 10 Then
Cells(a, 5) = "L�M�T ALTINDA"
Exit Sub
End If
Cells(a, 5) = "YETERL� SAYIDA"
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
On Error Resume Next
a = Sheets("STOK").Range("A2:A65532").Find(ComboBox1.Value).Row
Cells(a, 2) = Cells(a, 2) + TextBox1.Value
Cells(a, 3) = Cells(a, 3) + TextBox2.Value
Cells(a, 4) = Cells(a, 2) - Cells(a, 3)
Label7 = Cells(a, 4).Value
Label8 = Cells(a, 5).Value
If Cells(a, 4) < 10 Then
Cells(a, 5) = "L�M�T ALTINDA"
Exit Sub
End If
Cells(a, 5) = "YETERL� SAYIDA"
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
End Sub
If AlarmSet Then
If AlarmTime = CInt(Format(Now, "hhmm")) Then
AlarmSet = False
AlarmOn = True
Flag = 1
BtnFlash = True
WAVLoop strSndFile
End If
End If
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
End Sub
End Sub
If Up Then
'// Up pressed
If tb.Value < iMax Then
tb.Text = Format(tb.Value + sbtn.SmallChange, "00")
Else
tb.Text = Format(tb.Value - (iMax + 1) + sbtn.SmallChange, "00")
End If
Else
'// down pressed
If tb.Value > 0 Then
tb.Text = Format(tb.Value - sbtn.SmallChange, "00")
Else
tb.Text = Format(tb.Value + (iMax + 1) - sbtn.SmallChange, "00")
End If
End If
End Sub
'// End of Spinbutton routines
Sub ShowClock()
'// make sure only 1 instance
If Not frmClock.Visible Then frmClock.Show
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub WAVStop()
Call WAVLoop(vbNullString)
End Sub
----------kod bitir------
----------kod basla------
Dim saat As Date
Sub baslat()
saat = Now + TimeValue("00:00:01")
Application.OnTime saat, "simdi"
End Sub
Sub simdi()
Range("M8").Value = Now
Call baslat
End Sub
Sub durdur()
On Error Resume Next
Application.OnTime EarliestTime:=saat, Procedure:="simdi", Schedule:=False
End Sub
----------kod bitir------
----------kod basla------
Sub durdur()
[cy1] = 1
End Sub
Sub baslat()
[cy1] = ""
Do
DoEvents
Range("CW1") = Format(Now, "hh:mm:ss")
If [cy1] = 1 Then Exit Sub
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub deneme()
For i = 1 To 10
If Worksheets("sheet1").Cells(i, 2).Value = "" Then
Exit Sub
End If
For j = 1 To 10
If Worksheets("sheet2").Cells(j, 2).Value = "" Then
End If
If Worksheets("AKOCK002").Cells(i, 2).Value =
Worksheets("sheet2").Cells(j, 1).Value Then
Worksheets("AKOCK002").Cells(i, 2).Value =
Worksheets("Sheet2").Cells(j, 2).Value
End If
Next j
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub do�rucevap()
If [a2] = 1 Then
MsgBox "DO�RU CEVAP"
Exit Sub
End If
MsgBox "YANLI� CEVAP"
End Sub
----------kod bitir------
----------kod basla------
RenkliTopla = Sonuc
End Function
End If
Next Hucre
RenkliTopla2 = Sonuc
End Function
----------kod bitir------
----------kod basla------
End If
Next Hucre
RenkliTopla = Sonuc
End Function
End If
Next Hucre
RenkliTopla2 = Sonuc
End Function
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
Sheets("Firma �simleri ve Adresleri").Select
TextBox3 = Cells(ComboBox1.ListIndex + 1, 2)
TextBox5 = Cells(ComboBox1.ListIndex + 1, 3)
End Sub
Private Sub CommandButton1_Click()
Dim aSheet As Variant
Dim bSheet As Object
On Error Resume Next
aSheet = TextBox7.Value
If aSheet = False Or aSheet = "" Then Exit Sub
Set bSheet = ActiveWorkbook.Sheets(CStr(aSheet))
On Error GoTo 0
If Not bSheet Is Nothing Then
MsgBox "Bu �al�ma kitab�nda " & aSheet & " ad�nda bir sayfa mevcut." & vbCrLf & _
"Bu sayfa �al�ma kitab�n�z�n " & Sheets(CStr(aSheet)).Index & " sayfas�d�r.",
vbInformation, "Bilgi."
Else: se�im = MsgBox("Bu �al�ma kitab�nda " & aSheet & " ad�nda bir sayfa yok." &
aSheet & " sayfas� eklemek istermisiniz?", vbYesNo, "Bilgi.")
If se�im = 6 Then
Worksheets.Add
ActiveSheet.Name = TextBox7.Text
Exit Sub
End If
End If
End Sub
Private Sub CommandButton2_Click()
ComboBox2.RowSource = RefEdit1.Value
End Sub
Private Sub ListBox1_Click()
ActiveSheet.Range("A" & ListBox1.ListIndex + 1).Select
End Sub
Private Sub ListBox2_Click()
Dim i As Integer
For i = 0 To ListBox2.ListCount - 1
If ListBox2.Selected(i) = True Then
TextBox8.Value = ListBox2.List(i, 0)
End If
Next
End Sub
Private Sub TextBox5_Change()
TextBox5 = Format(TextBox5, "###,0")
End Sub
Private Sub TextBox7_Change()
TextBox7.Value = ListBox2.Value
End Sub
Private Sub UserForm_Initialize()
Dim sSheet
For Each sSheet In Sheets
If sSheet.Type = 3 Then
ListBox2.AddItem sSheet.Name
ElseIf WorksheetFunction.CountA(sSheet.Cells) > 0 Then
ListBox2.AddItem sSheet.Name
End If
Next sSheet
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
gun = Format(TextBox1, "00")
ay = Format(TextBox2, "00")
yil = Format(TextBox3, "0000")
ilk = "01." & ay & "." & yil
dene = DateAdd("m", 1, ilk)
son = DateAdd("d", -1, CDate(dene))
On Error Resume Next
For i = ilk To son
With ActiveSheet.QueryTables.Add(Connection:= _
URL1, Destination:=Range( _
"A1"))
.Name = i
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlOverwriteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlAllTables
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
'
Columns("D:D").Select
Range("D7").Activate
Selection.Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Range("D41").Select
ActiveCell.FormulaR1C1 = "=+R[-29]C/R[-32]C"
Columns("D:D").Select
Range("D7").Activate
Selection.NumberFormat = "#,##0.00"
Range("D41").Select
Selection.NumberFormat = "#,##0.0000"
End Sub
----------kod bitir------
----------kod basla------
Sub yenile()
'
' yenile Macro
' Macro recorded 22.10.2001 by suslular
'
'
Sheets("�mk").Select
Range("A7:A8").Select
Range("A8").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("d�").Select
Range("A1:A2").Select
Range("A1").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("merkez").Select
Range("A1:A2").Select
Range("A1").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("repo").Select
Range("A4:A5").Select
Range("A4").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("ex�m").Select
Range("e1:e1").Select
Range("e1").Activate
Selection.QueryTable.Refresh
BackgroundQuery:=False
Sheets("kurweb").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro6()
'
' Makro6 Makro
' Makro Serdar USLULAR taraf�ndan 17.09.2001 tarihinde kaydedildi.
'
'
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("ex�m").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.QueryTable.Refresh BackgroundQuery:=False
Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime")
Sheets("merkez").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Serdar USLULAR taraf�ndan 18.09.2001 tarihinde kaydedildi.
'
'
MsgBox "merhaba SAKLAMAK �STERM�S�N�Z", vbOKCancel
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
----------kod bitir------
----------kod basla------
Sub birlestir()
Range("C20").Select
ActiveCell.FormulaR1C1 = _
"=CONCATENATE(R[-19]C[18],R[-18]C[18],R[-17]C[18],R[-16]C[18],R[-
15]C[18],R[-14]C[18],R[-13]C[18],R[-12]C[18],R[-11]C[18],R[-10]C[18],R[-9]C[18],R[-
8]C[18],R[-7]C[18],R[-6]C[18],R[-5]C[18],R[-4]C[18],R[-3]C[18],R[-2]C[18],R[-
1]C[18],RC[18])"
Range("C21").Select
End Sub
----------kod bitir------
----------kod basla------
Sub yardimac()
frmyardim.Show
End Sub
Sub cikis()
Application.DisplayAlerts = False
ActiveWorkbook.Save
Application.Quit
Application.DisplayAlerts = True
End Sub
----------kod bitir------
----------kod basla------
Sub temizle()
Range("u1:v20").Value = ""
Range("f21:J23").Value = ""
Range("u1").Select
End Sub
Sub isim1()
Range("c20").Copy
Range("f21").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Range("v21").Copy
Range("j21").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Range("u1").Select
Range("u1:v20").Value = ""
End Sub
Sub isim2()
Range("c20").Copy
Range("f22").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Range("v21").Copy
Range("j22").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Range("u1").Select
Range("u1:v20").Value = ""
End Sub
Sub isim3()
Range("c20").Copy
Range("f23").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Range("v21").Copy
Range("j23").PasteSpecial xlPasteValues
Application.CutCopyMode = False
Range("u1").Select
Range("u1:v20").Value = ""
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_close()
Module3.temizle
Workbooks("Ebced_hesabi.xls").Close True
End Sub
----------kod bitir------
----------kod basla------
Sub elif()
ActiveCell = Range("a1").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub bir()
ActiveCell = Range("b1").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub ba()
ActiveCell = Range("a2").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub iki()
ActiveCell = Range("b2").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub cim()
ActiveCell = Range("a3").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub uc()
ActiveCell = Range("b3").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub dal()
ActiveCell = Range("a4").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub dort()
ActiveCell = Range("b4").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub he()
ActiveCell = Range("a5").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub bes()
ActiveCell = Range("b5").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub vav()
ActiveCell = Range("a6").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub alti()
ActiveCell = Range("b6").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub za()
ActiveCell = Range("a7").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub yedi()
ActiveCell = Range("b7").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub ha()
ActiveCell = Range("a8").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub sekiz()
ActiveCell = Range("b8").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub ti()
ActiveCell = Range("a9").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub dokuz()
ActiveCell = Range("b9").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub y()
ActiveCell = Range("a10").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub onn()
ActiveCell = Range("b10").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub kef()
ActiveCell = Range("a11").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub yirmi()
ActiveCell = Range("b11").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub lam()
ActiveCell = Range("a12").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub otuz()
ActiveCell = Range("b12").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub mim()
ActiveCell = Range("a13").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub kirk()
ActiveCell = Range("b13").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub nun()
ActiveCell = Range("a14").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub elli()
ActiveCell = Range("b14").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub sin()
ActiveCell = Range("a15").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub altmis()
ActiveCell = Range("b15").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub ayin()
ActiveCell = Range("a16").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub yetmis()
ActiveCell = Range("b16").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub fa()
ActiveCell = Range("a17").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub seksen()
ActiveCell = Range("b17").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub sad()
ActiveCell = Range("a18").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub doksan()
ActiveCell = Range("b18").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub kaf()
ActiveCell = Range("a19").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub yuz()
ActiveCell = Range("b19").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub ra()
ActiveCell = Range("a20").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub ikiyuz()
ActiveCell = Range("b20").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub tsin()
ActiveCell = Range("a21").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub ucyuz()
ActiveCell = Range("b21").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub te()
ActiveCell = Range("a22").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub dortyuz()
ActiveCell = Range("b22").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub se()
ActiveCell = Range("a23").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub besyuz()
ActiveCell = Range("b23").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub hi()
ActiveCell = Range("a24").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub altiyuz()
ActiveCell = Range("b24").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub zel()
ActiveCell = Range("a25").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub yediyuz()
ActiveCell = Range("b25").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub dat()
ActiveCell = Range("a26").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub sekizyuz()
ActiveCell = Range("b26").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub zi()
ActiveCell = Range("a27").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub dokuzyuz()
ActiveCell = Range("b27").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
Sub gayin()
ActiveCell = Range("a28").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(0, 1).Select
Loop
End Sub
Sub bin()
ActiveCell = Range("b28").Value
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
ActiveCell.Offset(0, -1).Select
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub elifharfi()
Module8.elif
Module8.bir
End Sub
Sub baharfi()
Module8.ba
Module8.iki
End Sub
Sub cimharfi()
Module8.cim
Module8.uc
End Sub
Sub dalharfi()
Module8.dal
Module8.dort
End Sub
Sub heharfi()
Module8.he
Module8.bes
End Sub
Sub vavharfi()
Module8.vav
Module8.alti
End Sub
Sub zaharfi()
Module8.za
Module8.yedi
End Sub
Sub haharfi()
Module8.ha
Module8.sekiz
End Sub
Sub tiharfi()
Module8.ti
Module8.dokuz
End Sub
Sub yharfi()
Module8.y
Module8.onn
End Sub
Sub kefharfi()
Module8.kef
Module8.yirmi
End Sub
Sub lamharfi()
Module8.lam
Module8.otuz
End Sub
Sub mimharfi()
Module8.mim
Module8.kirk
End Sub
Sub nunharfi()
Module8.nun
Module8.elli
End Sub
Sub sinharfi()
Module8.sin
Module8.altmis
End Sub
Sub ayinharfi()
Module8.ayin
Module8.yetmis
End Sub
Sub faharfi()
Module8.fa
Module8.seksen
End Sub
Sub sadharfi()
Module8.sad
Module8.doksan
End Sub
Sub kafharfi()
Module8.kaf
Module8.yuz
End Sub
Sub raharfi()
Module8.ra
Module8.ikiyuz
End Sub
Sub tsinharfi()
Module8.tsin
Module8.ucyuz
End Sub
Sub teharfi()
Module8.te
Module8.dortyuz
End Sub
Sub seharfi()
Module8.se
Module8.besyuz
End Sub
Sub hiharfi()
Module8.hi
Module8.altiyuz
End Sub
Sub zelharfi()
Module8.zel
Module8.yediyuz
End Sub
Sub datharfi()
Module8.dat
Module8.sekizyuz
End Sub
Sub ziharfi()
Module8.zi
Module8.dokuzyuz
End Sub
Sub gayinharfi()
Module8.gayin
Module8.bin
End Sub
----------kod bitir------
----------kod basla------
Sub cikar()
Application.ScreenUpdating = False
Application.CutCopyMode = True
k = Sheets("b").Cells(65536, 2).End(xlUp).Row + 1
For i = 8 To Cells(65536, 19).End(xlUp).Row Step 3
If Cells(i, 19) = "" Or Cells(i, 19) = "�ocuk Yerle�tirildi" Then GoTo 10
Sheets("a").Rows(i - 2 & ":" & i).Select
Selection.Copy
Sheets("b").Select
Cells(k, 1).Select
ActiveSheet.Paste
k = k + 3
Sheets("a").Select
Sheets("a").Rows(i - 2 & ":" & i).Select
Selection.EntireRow.Delete
i = i - 3
10
Next i
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Sub formac()
userFormE��T�M KARTI.Show
End Sub
----------kod bitir------
----------kod basla------
'Aktif h�cre de�erini bir art�r.
Sub addme()
i = ActiveCell
ActiveCell.Value = (i + 1)
End Sub
' Aktif h�cre de�erini bir eksilt.
Sub lessme()
i = ActiveCell
ActiveCell.Value = (i - 1)
End Sub
----------kod bitir------
----------kod basla------
Sub markos()
'
' markos Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C[1]"
Range("C6").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kar()
'
' kar Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("KAR").Select
End Sub
Sub GER�()
'
' GER� Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("D�V�Z").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub makbuz()
'
' makbuz Makro
' Makro BEK�R taraf�ndan 08.03.2005 tarihinde kaydedildi.
'
'
Sheets("MAKBUZ").Select
Range("C2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub MARKOS2()
'
' MARKOS2 Makro
' Makro BEK�R taraf�ndan 12.03.2005 tarihinde kaydedildi.
'
Range("B7,C2,D2").Select
Range("D2").Activate
Selection.ClearContents
End Sub
Sub KAYDET()
SonSat = Sheets("KAYIT").Cells(1, 1).End(xlDown).Row + 1
If SonSat > 65536 Then SonSat = 2
Sheets("KAYIT").Cells(SonSat, 1) = Range("AdSoyad")
Sheets("KAYIT").Cells(SonSat, 2) = Range("Rakam")
Sheets("KAYIT").Cells(SonSat, 3) = Range("DC")
MsgBox ("Kaydedildi")
End Sub
----------kod bitir------
----------kod basla------
Sub markos()
'
' markos Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C[1]"
Range("C6").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kar()
'
' kar Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("KAR").Select
End Sub
Sub GER�()
'
' GER� Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("D�V�Z").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub makbuz()
'
' makbuz Makro
' Makro BEK�R taraf�ndan 08.03.2005 tarihinde kaydedildi.
'
'
Sheets("MAKBUZ").Select
Range("C2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub MARKOS2()
'
' MARKOS2 Makro
' Makro BEK�R taraf�ndan 12.03.2005 tarihinde kaydedildi.
'
'
Range("B7,C2,D2").Select
Range("D2").Activate
Selection.ClearContents
End Sub
----------kod bitir------
----------kod basla------
Sub Se�enekD��mesi9_T�klat()
Range("B7").Formula = "=""EK TABLO: PROJEL� DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
ActiveSheet.Shapes("Drop Down 21").Select
With Selection
.ListFillRange = "'VERI_GIRISI'!$F$29:$F$49"
.LinkedCell = "$C$1"
.DropDownLines = 8
.Display3DShading = False
End With
Range("C1").Value = ""
Range("L4").Select
End Sub
Sub Se�enekD��mesi10_T�klat()
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da ""&upper(C3)&""
���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
'
' Macro2 Macro
' Macro recorded 19.06.2003 by Ayhan
'
'
Dim urun, proje, mevcut, mevcuta, mevcutb
urun = LCase(Range("C3").Value)
proje = LCase(Range("H2").Value)
mevcut = LCase(Range("G2").Value)
Range("A3:P53").Select
Selection.Copy
Range("a1").Select
If Range("b1").Value = 2 And Range("c3").Value <> "" And urun <> mevcut Then
Application.ScreenUpdating = False
Sheets("MEVMAL").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F6:N26").Select
Selection.Sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
ElseIf Range("b1").Value = 1 And Range("c3").Value <> "" And urun <> proje Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F29:N49").Select
Selection.Sort Key1:=Range("F29"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
End If
Sheets("MGIRISI").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown21_Change()
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
'Columns("C:C").Select
Cells.Find(What:=mevcut, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("A3").Select
Application.CutCopyMode = False
Sheets("PMALIYET").Select
'Columns("C:C").Select
Cells.Find(What:=proje, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("MGIRISI").Select
Range("A3").Select
Application.CutCopyMode = False
End If
Range("D1").Value = ""
End Sub
Sub UrunSil()
'
' Macro4 Macro
' Macro recorded 26.06.2003 by Ayhan
'
'
Dim urun, mevcut, proje, ilkhucre, sonhucre
urun = Range("C3")
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
Sheets("VERI_GIRISI").Select
Sheets("MGIRISI").Select
Range("A3").Select
Sheets("PMALIYET").Select
Sheets("VERI_GIRISI").Select
Range("F29:F49").Select
Sheets("MGIRISI").Select
Range("A3").Select
Else: MsgBox ("Daha �nce b�yle bir �r�n girilmedi.")
End If
Range("C1").Value = ""
End Sub
Sub TabloSil()
Application.ScreenUpdating = False
Sheets("MGIRISI").Select
Range("C3:C6,H3:H6,C30:C43,D10:H51, F10:H51, M10:N51").Select
Selection.ClearContents
Range("C1").Value = ""
Range("C1").Value = ""
Range("a3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown25_Change()
'
' aktar Macro
' Macro recorded 13.06.2003 by Ayhan
'
Dim sil
Dim i As Integer
Dim ss As Integer
Application.Run "TabloSil"
urun = Range("d1").Value
urunad = Range("c3").Value
Worksheets("DONE_GIRIS").Select
Do
i = 1
For i = 1 To 225
Worksheets("MGIRISI").Select
Range("C3").Value = urun2
Range("C1").Value = ""
End If
Next i
Loop While i < ss + 1
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro 302a taraf�ndan 14.03.2005 tarihinde kaydedildi.
'
'
Range("A24").Select
Sheets("Bitor").Select
Range("D29").Select
End Sub
Sub deg�st�r()
Cells.Replace What:="$", Replacement:="L", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
End Sub
----------kod bitir------
----------kod basla------
Sub Se�enekD��mesi9_T�klat()
Range("B7").Formula = "=""EK TABLO: PROJEL� DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
Sub Se�enekD��mesi10_T�klat()
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da ""&upper(C3)&""
���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
'
' Macro2 Macro
' Macro recorded 19.06.2003 by Ayhan
'
'
Dim urun, proje, mevcut, mevcuta, mevcutb
urun = LCase(Range("C3").Value)
proje = LCase(Range("H2").Value)
mevcut = LCase(Range("G2").Value)
Range("A3:P53").Select
Selection.Copy
Range("a1").Select
If Range("b1").Value = 2 And Range("c3").Value <> "" And urun <> mevcut Then
Application.ScreenUpdating = False
Sheets("MEVMAL").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F6:N26").Select
Selection.Sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
ElseIf Range("b1").Value = 1 And Range("c3").Value <> "" And urun <> proje Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F29:N49").Select
Selection.Sort Key1:=Range("F29"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
End If
Sheets("MGIRISI").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown21_Change()
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
'Columns("C:C").Select
Cells.Find(What:=mevcut, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("A3").Select
Application.CutCopyMode = False
Sheets("PMALIYET").Select
'Columns("C:C").Select
Cells.Find(What:=proje, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("MGIRISI").Select
Range("A3").Select
Application.CutCopyMode = False
End Sub
Sub UrunSil()
'
' Macro4 Macro
' Macro recorded 26.06.2003 by Ayhan
'
'
Dim urun, mevcut, proje, ilkhucre, sonhucre
urun = Range("C3")
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
Sheets("VERI_GIRISI").Select
Sheets("MGIRISI").Select
Range("A3").Select
Sheets("PMALIYET").Select
Cells.Find(What:=urun, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Sheets("VERI_GIRISI").Select
Range("F29:F49").Select
Sheets("MGIRISI").Select
Range("A3").Select
Else: MsgBox ("Daha �nce b�yle bir �r�n girilmedi.")
End If
Range("C1").Value = ""
End Sub
Sub TabloSil()
Application.ScreenUpdating = False
Sheets("MGIRISI").Select
Range("C3:C6,H3:H6,C30:C43,D10:H51, F10:H51, M10:N51").Select
Selection.ClearContents
Range("C1").Value = ""
Range("C1").Value = ""
Range("a3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown25_Change()
'
' aktar Macro
' Macro recorded 13.06.2003 by Ayhan
'
Dim sil
Dim i As Integer
Dim ss As Integer
Application.Run "TabloSil"
urun = Range("d1").Value
urunad = Range("c3").Value
Worksheets("DONE_GIRIS").Select
Do
i = 1
For i = 1 To 225
Worksheets("MGIRISI").Select
Range("C3").Value = urun2
Range("C1").Value = ""
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro 302a taraf�ndan 14.03.2005 tarihinde kaydedildi.
'
'
Range("A24").Select
Sheets("Bitor").Select
Range("D29").Select
End Sub
Sub deg�st�r()
Cells.Replace What:="$", Replacement:="L", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
[g6:g65536].ClearContents
c = 0
d = 0
For b = 1 To 4 Step 3
say = WorksheetFunction.CountA(Range(Cells(6, b), Cells(65536, b))) + 5
For a = 6 To say
Var = WorksheetFunction.CountIf([g6:g65536], Cells(a, b).Value)
If Var = 0 Then
c = c + 1
Cells(c + 5, 7) = Cells(a, b).Value
If b = 1 Then Cells(c + 5, 9) = Cells(a, b + 1).Value
Cells(c + 5, 8) = WorksheetFunction.SumIf([d2:d65536], Cells(c + 5, 7),
[e2:e65536])
End If
Next a
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub Se�enekD��mesi9_T�klat()
Range("B7").Formula = "=""EK TABLO: PROJEL� DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
Sub Se�enekD��mesi10_T�klat()
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da ""&upper(C3)&""
���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
'
' Macro2 Macro
' Macro recorded 19.06.2003 by Ayhan
'
'
Dim urun, proje, mevcut, mevcuta, mevcutb
urun = LCase(Range("C3").Value)
proje = LCase(Range("H2").Value)
mevcut = LCase(Range("G2").Value)
Range("A3:P53").Select
Selection.Copy
Range("a1").Select
If Range("b1").Value = 2 And Range("c3").Value <> "" And urun <> mevcut Then
Application.ScreenUpdating = False
Sheets("MEVMAL").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F6:N26").Select
Selection.Sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
ElseIf Range("b1").Value = 1 And Range("c3").Value <> "" And urun <> proje Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F29:N49").Select
Selection.Sort Key1:=Range("F29"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
End If
Sheets("MGIRISI").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown21_Change()
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
'Columns("C:C").Select
Cells.Find(What:=mevcut, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("A3").Select
Application.CutCopyMode = False
Sheets("PMALIYET").Select
'Columns("C:C").Select
Cells.Find(What:=proje, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("MGIRISI").Select
Range("A3").Select
Application.CutCopyMode = False
End If
Range("D1").Value = ""
End Sub
Sub UrunSil()
'
' Macro4 Macro
' Macro recorded 26.06.2003 by Ayhan
'
'
Dim urun, mevcut, proje, ilkhucre, sonhucre
urun = Range("C3")
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
Sheets("VERI_GIRISI").Select
Sheets("MGIRISI").Select
Range("A3").Select
Sheets("PMALIYET").Select
Sheets("VERI_GIRISI").Select
Range("F29:F49").Select
Sheets("MGIRISI").Select
Range("A3").Select
Else: MsgBox ("Daha �nce b�yle bir �r�n girilmedi.")
End If
Range("C1").Value = ""
End Sub
Sub TabloSil()
Application.ScreenUpdating = False
Sheets("MGIRISI").Select
Range("C3:C6,H3:H6,C30:C43,D10:H51, F10:H51, M10:N51").Select
Selection.ClearContents
Range("C1").Value = ""
Range("C1").Value = ""
Range("a3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown25_Change()
'
' aktar Macro
' Macro recorded 13.06.2003 by Ayhan
'
Dim sil
Dim i As Integer
Dim ss As Integer
Application.Run "TabloSil"
urun = Range("d1").Value
urunad = Range("c3").Value
Worksheets("DONE_GIRIS").Select
Do
i = 1
For i = 1 To 225
Worksheets("MGIRISI").Select
Range("C3").Value = urun2
Range("C1").Value = ""
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro 302a taraf�ndan 14.03.2005 tarihinde kaydedildi.
'
'
Range("A24").Select
Sheets("Bitor").Select
Range("D29").Select
End Sub
Sub deg�st�r()
Cells.Replace What:="$", Replacement:="L", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim dur As Integer
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long, ByVal dwNewLong As Long) As Long
End Sub
Unload devir
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim dur As Integer
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long, ByVal dwNewLong As Long) As Long
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
End Sub
Private Sub buttusers_Click()
users.Show
End Sub
End Sub
End Sub
DoEvents
Loop
End Sub
Private Sub buttadd_Click()
Unload main
useradd.Show
End Sub
Private Sub UserForm_Initialize()
Label2.Caption = Worksheets("Users").Range("C1")
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Sheets("EMANET L�STES� 2").Select
Kay�t.Show
End Sub
Sub Auto_open()
Sheets("ANAMEN�").Select
Application.Visible = False
�ifre.Show
Application.Visible = True
Sheets("ANAMEN�").Select
Application.WindowState = xlMaximized
End Sub
Sub auto_close()
Sheets("ANAMEN�").Select
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
Application.ScreenUpdating = False
a = Sheets("EMANET L�STES� 5").Cells(65536, 1).End(xlUp).Value
sat = Sheets("EMANET L�STES� 5").Cells(65536, 3).End(xlUp).Row
Sheets("EMANET L�STES� 5").Cells(sat + 1, 1) = a + 1
Sheets("EMANET L�STES� 5").Cells(sat + 1, 2) = [a2].Value
Range("G12:H14" & Cells(65536, 2).End(xlUp).Row).Copy
Sheets("EMANET L�STES� 5").Cells(sat + 1, 2).PasteSpecial Paste:=xlValue
Application.CutCopyMode = False
MsgBox "VER�LER L�STEYE KAYDED�LD�"
End Sub
----------kod bitir------
----------kod basla------
Sub sayfayagit()
Sheets([d22].Value).Select
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
say = WorksheetFunction.CountA(Range("a1:a65000"))
End Sub
Private Sub buttclr_Click()
txtuser.Value = ""
txtpass.Value = ""
txtuser.SetFocus
End Sub
End Sub
Private Sub UserForm_Click()
End Sub
----------kod bitir------
----------kod basla------
End Sub
Private Sub cbouser_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal
X As Single, ByVal Y As Single)
Dim myName As Range, nameRow As Long, lastRow As Long
With Sheets("Users")
lastRow = .Range("A65536").End(xlUp).Row
Set myName = .Range("A2:A" & lastRow).Find(cbouser.Value)
If Not myName Is Nothing Then
nameRow = myName.Row
txtpass.Value = .Cells(nameRow, 2).Value
cbouser.SetFocus
End If
End With
End Sub
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim dur As Integer
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long, ByVal dwNewLong As Long) As Long
End Sub
Private Sub Label25_Click()
Sheets("EMANET L�STES� 2").Select
On Error GoTo son
If txtbt.Value = "" Then
MsgBox "�NCE ARADI�INIZ KAYIT NOSUNU G�R�N�Z."
Exit Sub
End If
sat = Columns(2).Find(txtbt.Value).Row
For c = sat To Cells(65536, 3).End(xlUp).Row
For txt = 1 To 9
Controls("t" & txt) = Cells(c + txt - 1, 3).Value
If Cells(c + txt, 2) <> "" Or txt = 9 Then Exit Sub
Next txt
Next c
son: MsgBox "Arad���n�z kay�t no bulunamad�"
End Sub
Unload devir
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim dur As Integer
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long, ByVal dwNewLong As Long) As Long
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
End Sub
Private Sub buttusers_Click()
users.Show
End Sub
End Sub
End Sub
DoEvents
Loop
End Sub
Private Sub buttadd_Click()
Unload main
useradd.Show
End Sub
Private Sub UserForm_Initialize()
Label2.Caption = Worksheets("Users").Range("C1")
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Sheets("EMANET L�STES� 2").Select
Kay�t.Show
End Sub
Sub Auto_open()
Sheets("ANAMEN�").Select
Application.Visible = False
�ifre.Show
Application.Visible = True
Sheets("ANAMEN�").Select
Application.WindowState = xlMaximized
End Sub
Sub auto_close()
Sheets("ANAMEN�").Select
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
Application.ScreenUpdating = False
a = Sheets("EMANET L�STES� 5").Cells(65536, 1).End(xlUp).Value
sat = Sheets("EMANET L�STES� 5").Cells(65536, 3).End(xlUp).Row
Sheets("EMANET L�STES� 5").Cells(sat + 1, 1) = a + 1
Sheets("EMANET L�STES� 5").Cells(sat + 1, 2) = [a2].Value
Range("G12:H14" & Cells(65536, 2).End(xlUp).Row).Copy
Sheets("EMANET L�STES� 5").Cells(sat + 1, 2).PasteSpecial Paste:=xlValue
Application.CutCopyMode = False
MsgBox "VER�LER L�STEYE KAYDED�LD�"
End Sub
----------kod bitir------
----------kod basla------
Sub sayfayagit()
Sheets([d22].Value).Select
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
say = WorksheetFunction.CountA(Range("a1:a65000"))
End Sub
Private Sub buttclr_Click()
txtuser.Value = ""
txtpass.Value = ""
txtuser.SetFocus
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
End Sub
Private Sub cbouser_MouseUp(ByVal Button As Integer, ByVal Shift As Integer, ByVal
X As Single, ByVal Y As Single)
Dim myName As Range, nameRow As Long, lastRow As Long
With Sheets("Users")
lastRow = .Range("A65536").End(xlUp).Row
Set myName = .Range("A2:A" & lastRow).Find(cbouser.Value)
If Not myName Is Nothing Then
nameRow = myName.Row
txtpass.Value = .Cells(nameRow, 2).Value
cbouser.SetFocus
End If
End With
End Sub
End Sub
----------kod bitir------
----------kod basla------
End Sub
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v(15)
Dim c(3)
b$(0) = ""
b$(1) = "Bir"
b$(2) = "�ki"
b$(3) = "��"
b$(4) = "D�rt"
b$(5) = "Be�"
b$(6) = "Alt�"
b$(7) = "Yedi"
b$(8) = "Sekiz"
b$(9) = "Dokuz"
y$(0) = ""
y$(1) = "On"
y$(2) = "Yirmi"
y$(3) = "Otuz"
y$(4) = "K�rk"
y$(5) = "Elli"
y$(6) = "Altm�"
y$(7) = "Yetmi�"
y$(8) = "Seksen"
y$(9) = "Doksan"
m$(0) = "Trilyon"
m$(1) = "Milyar"
m$(2) = "Milyon"
m$(3) = "Bin"
m$(4) = ""
a$ = Str(sayi)
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
s$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�z"
Else
e$ = b$(c(1)) + "Y�z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "BirBin") Then e$ = "Bin"
s$ = s$ + e$
Next x
yaz$ = s$
GoTo tamam
hata: yaz$ = "Hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Sub deneme()
SAT1 = 1
For z = 4 To 53
al(z) = Cells((SAT1 * 2) + 13, z)
Next
For x = 4 To 53
For y = x To 53
If al(x) < al(y) Then
ara = al(x)
al(x) = al(y)
al(y) = ara
End If
Next
Next
End Sub
----------kod bitir------
----------kod basla------
Sub kulananlar()
End Sub
----------kod bitir------
----------kod basla------
Sub sec()
Application.SendKeys "{TAB}"
End Sub
Sub Auto_Close()
Application.OnKey "~"
End Sub
----------kod bitir------
----------kod basla------
Sub yurun()
[a25:d35].ClearContents
c = 0
For a = 3 To WorksheetFunction.CountA(Sheets("sayfa3").[b3:b65536]) + 3
If Sheets("sayfa3").Cells(a, 6) <> "" Then
c = c + 1
Cells(24 + c, 1) = Sheets("sayfa3").Cells(a, 6).Value
Cells(24 + c, 2) = Sheets("sayfa3").Cells(a, 9).Value
Cells(24 + c, 3) = Sheets("sayfa3").Cells(a, 7).Value
Cells(24 + c, 4) = Sheets("sayfa3").Cells(a, 8).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub Se�enekD��mesi9_T�klat()
Range("B7").Formula = "=""EK TABLO: PROJEL� DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
Sub Se�enekD��mesi10_T�klat()
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da ""&upper(C3)&""
���N YAPILAN MASRAFLAR"""
ActiveSheet.Shapes("Drop Down 21").Select
With Selection
.ListFillRange = "'VERI_GIRISI'!$F$6:$F$26"
.LinkedCell = "$C$1"
.DropDownLines = 8
.Display3DShading = False
End With
Range("C1").Value = ""
Range("L4").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "Yanurun"
MsgBox "Yanurun"
Else
ToggleButton1.Caption = "Yurun"
MsgBox "Yurun"
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
urun = LCase(Range("C3").Value)
proje = LCase(Range("H2").Value)
mevcut = LCase(Range("G2").Value)
Range("A3:P53").Select
Selection.Copy
Range("a1").Select
If Range("b1").Value = 2 And Range("c3").Value <> "" And urun <> mevcut Then
Application.ScreenUpdating = False
Sheets("MEVMAL").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F6:N26").Select
Selection.Sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
ElseIf Range("b1").Value = 1 And Range("c3").Value <> "" And urun <> proje Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F29:N49").Select
Selection.Sort Key1:=Range("F29"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
End If
Sheets("MGIRISI").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown21_Change()
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
'Columns("C:C").Select
Cells.Find(What:=mevcut, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("A3").Select
Application.CutCopyMode = False
Sheets("PMALIYET").Select
'Columns("C:C").Select
Cells.Find(What:=proje, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("MGIRISI").Select
Range("A3").Select
Application.CutCopyMode = False
End If
Range("D1").Value = ""
End Sub
Sub UrunSil()
'
' Macro4 Macro
' Macro recorded 26.06.2003 by Ayhan
'
'
Dim urun, mevcut, proje, ilkhucre, sonhucre
urun = Range("C3")
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
Sheets("VERI_GIRISI").Select
Sheets("MGIRISI").Select
Range("A3").Select
Sheets("PMALIYET").Select
Sheets("VERI_GIRISI").Select
Range("F29:F49").Select
Sheets("MGIRISI").Select
Range("A3").Select
Else: MsgBox ("Daha �nce b�yle bir �r�n girilmedi.")
End If
Range("C1").Value = ""
End Sub
Sub TabloSil()
Application.ScreenUpdating = False
Sheets("MGIRISI").Select
Range("C3:C6,H3:H6,C30:C43,D10:H51, F10:H51, M10:N51").Select
Selection.ClearContents
Range("C1").Value = ""
Range("C1").Value = ""
Range("a3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown25_Change()
Dim sil
Dim i As Integer
Dim ss As Integer
Application.Run "TabloSil"
urun = Range("d1").Value
urunad = Range("c3").Value
Worksheets("DONE_GIRIS").Select
Do
i = 1
For i = 1 To 225
Worksheets("MGIRISI").Select
Range("C3").Value = urun2
Range("C1").Value = ""
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub deg�st�r()
Cells.Replace What:="$", Replacement:="L", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
End Sub
----------kod bitir------
----------kod basla------
Sub yanurun()
[a25:d35].ClearContents
c = 0
For a = 3 To WorksheetFunction.CountA(Sheets("sayfa2").[b3:b65536]) + 3
If Sheets("sayfa2").Cells(a, 6) <> "" Then
c = c + 1
Cells(24 + c, 1) = Sheets("sayfa2").Cells(a, 6).Value
Cells(24 + c, 2) = Sheets("sayfa2").Cells(a, 9).Value
Cells(24 + c, 3) = Sheets("sayfa2").Cells(a, 7).Value
Cells(24 + c, 4) = Sheets("sayfa2").Cells(a, 8).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
[g6:I65536].ClearContents
[k6:k65535].ClearContents
c = 0
d = 0
For b = 1 To 4 Step 3
say = WorksheetFunction.CountA(Range(Cells(6, b), Cells(65536, b))) + 5
For a = 6 To say
Var = WorksheetFunction.CountIf([g6:g65536], Cells(a, b).Value)
If Var = 0 Then
c = c + 1
Cells(c + 5, 7) = Cells(a, b).Value
If b = 1 Then Cells(c + 5, 9) = Cells(a, b + 1).Value
Cells(c + 5, 8) = WorksheetFunction.SumIf([d2:d65536], Cells(c + 5, 7),
[e2:e65536])
End If
Next a
Next b
End Sub
----------kod bitir------
----------kod basla------
Private Sub esas_yaz_Click()
Sheets("esas").Range("a1:�48").PrintOut copies:=1
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
kay�t.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ara_��k_Click()
End
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
Sheets("ESAS").Unprotect ("1")
sat1 = Sheets("KAYIT_G�R").Cells(65536, 1).End(xlUp).Row
Sheets("KAYIT_G�R").Range("A" & sat1, "S" & sat1).Copy
sat2 = Sheets("ESAS").Cells(65536, 1).End(xlUp).Row
Sheets("ESAS").Range("A" & sat2 + 1).PasteSpecial
Application.CutCopyMode = False
Sheets("ESAS").Protect ("1")
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
sat1 = Sheets("KAYIT_G�R").Cells(65536, 1).End(xlUp).Row
Sheets("KAYIT_G�R").Rows(sat1).Copy
sat2 = Sheets("ESAS").Cells(65536, 1).End(xlUp).Row
Sheets("ESAS").Rows(sat2 + 1).PasteSpecial
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
End Sub
End Sub
----------kod bitir------
----------kod basla------
Exit Sub
Bitir: MsgBox "Arad���n�z Soyad� Bulunamam�t�r." & vbCrLf & _
"Soyad�n� Tekrar Kontrol Ediniz.", vbInformation, "Arama Sonucu."
End Sub
----------kod bitir------
----------kod basla------
Sub KarakterOtele()
'
' Makro2 Makro
' Makro Asri Akdeniz taraf�ndan 14.04.2005 tarihinde kaydedildi.
'
'
Dim i As Integer
Dim z As Integer
Dim s, gec As String
Dim s1 As String
Dim y As Integer
i = 0
For Each hucre In Range("A1:A863")
i = i + 1
s = Cells(i, 1).Value
For z = 1 To Len(s)
End If
Next z
Next hucre
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Aser taraf�ndan 14.04.2005 tarihinde kaydedildi.
'
'
Rows("7:7").Select
End Sub
Sub Makro2()
'
' Makro2 Makro
' Makro Aser taraf�ndan 14.04.2005 tarihinde kaydedildi.
'
'
Selection.EntireRow.Delete
End Sub
Sub Makro3()
'
' Makro3 Makro
' Makro Aser taraf�ndan 14.04.2005 tarihinde kaydedildi.
'
'
ActiveCell.FormulaR1C1 = "=LEN(R[1]C[-8])"
End Sub
----------kod bitir------
----------kod basla------
Sub el()
With Application
.Calculation = xlManual
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub
Sub otomatik()
With Application
.Calculation = xlAutomatic
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub
----------kod bitir------
----------kod basla------
Sub bo�luksil()
For i = 1 To 1000
If Cells(i, 1).Value = "" Then
Rows(i & ":" & i).Select
Application.CutCopyMode = False
Selection.Delete Shift:=xlUp
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Sub MANA()
For i = 2 To 342
Sheets("Sayfa1").Select
If Cells(i, 2).Value = "" Then
GoTo ge�
Else
a = Cells(i, 2).Value
Sheets("Sayfa3").Select
For z = 1 To 130
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Application.Visible = False
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Application.Visible = True
End Sub
----------kod bitir------
----------kod basla------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 04.10.2004 by kafkas
'
'
Range("B10").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
----------kod bitir------
----------kod basla------
Sub c_0_sil()
xs1 = WorksheetFunction.CountA(Range("a2:a65536"))
For y = 1 To xs1
If Cells(y + 1, 3) = 0 Then Rows(y + 1).Delete Shift:=xlUp
Next y
End Sub
Sub ozetal()
Set S3 = Sheets("sayfa3")
Set s2 = Sheets("Sayfa2")
xs3 = WorksheetFunction.CountA(S3.Range("a2:a65536"))
s2.Range("b2:af65536").ClearContents
ReDim al(xs3, 3)
For y = 1 To xs3
For z = 1 To 3
al(y, z) = S3.Cells(y + 1, z)
Next z, y
For y = 1 To xs3
son = WorksheetFunction.CountA(s2.Range("b" & al(y, 1) + 1 & ":af" & al(y, 1) + 1))
+ 1
For z = 1 To al(y, 3)
s2.Cells(al(y, 1) + 1, son + z) = al(y, 2)
Next z, y
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro asd taraf�ndan 20.04.2005 tarihinde kaydedildi.
'
'
Rows("4:4").Select
Selection.Delete Shift:=xlUp
End Sub
----------kod bitir------
----------kod basla------
Sub hesapla()
k = 4
Do While Cells(k, 7) <> ""
tutar = Cells(k, 7)
bastar = Cells(k, 8)
sontar = Cells(k, 9)
j = 4
ilk = 0
faiz = 0
Do Until Cells(j, 3) = ""
If ilk = 0 Then
faiz = faiz + ((Cells(j, 3) - bastar) * tutar * Cells(j - 1, 4)) / 36500
ilk = 1
GoTo 20
End If
If ilk = 1 Then
If sontar <= Cells(j, 3) Or Cells(j + 1, 3) = "" Then
faiz = faiz + (Cells(j, 3) - Cells(j - 1, 3)) * tutar * Cells(j - 1, 4) / 36500
faiz = faiz + (sontar - Cells(j, 3)) * tutar * Cells(j, 4) / 36500
GoTo 50
End If
End If
If ilk = 1 Then
faiz = faiz + (Cells(j, 3) - Cells(j - 1, 3)) * tutar * Cells(j - 1, 4) / 36500
End If
20
j = j + 1
Loop
50
Cells(k, 10) = faiz
k = k + 1
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub hesapla()
k = 4
Do While Cells(k, 7) <> ""
tutar = Cells(k, 7)
bastar = Cells(k, 8)
sontar = Cells(k, 9)
j = 4
ilk = 0
faiz = 0
Do Until Cells(j, 3) = ""
If ilk = 0 Then
faiz = faiz + ((Cells(j, 3) - bastar) * tutar * Cells(j - 1, 4)) / 36500
ilk = 1
GoTo 20
End If
If ilk = 1 Then
If sontar <= Cells(j, 3) Or Cells(j + 1, 3) = "" Then
faiz = faiz + (Cells(j, 3) - Cells(j - 1, 3)) * tutar * Cells(j - 1, 4) / 36500
faiz = faiz + (sontar - Cells(j, 3)) * tutar * Cells(j, 4) / 36500
GoTo 50
End If
End If
If ilk = 1 Then
faiz = faiz + (Cells(j, 3) - Cells(j - 1, 3)) * tutar * Cells(j - 1, 4) / 36500
End If
20
j = j + 1
Loop
50
If faiz = 0 Then faiz = (sontar - bastar) * tutar * Cells(4, 4).End(xlDown).Value /
36500
Cells(k, 10) = faiz
k = k + 1
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub faktoriyel()
b = 1
For a = 1 To [a1]
b = a * b
Next a
[b1] = b
[b1].Select
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
mesaj = MsgBox([b1] & " ismiyle kaydedilecek onayl�yormusunuz?", vbYesNo)
If mesaj = vbYes Then ActiveWorkbook.SaveAs Filename:="C:\Belgelerim\" & [b1]
If mesaj = vbNo Then MsgBox ("dosya kaydedilmedi")
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
mesaj = MsgBox([b1] & " ismiyle kaydedilecek onayl�yormusunuz?", vbYesNo)
If mesaj = vbYes Then ActiveWorkbook.SaveAs Filename:="C:\Belgelerim\" & [b1]
If mesaj = vbNo Then MsgBox ("dosya kaydedilmedi")
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
ActiveWorkbook.SaveAs Filename:="C:\" & Sheets("�ablon").[a2].Value
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub FrmAc()
'D�ng�y� burada kurmak istiyorum
'do
UserForm1.cmbLst.RowSource = "Sayfa1!A1:A22"
'loop
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Private Sub cmdKpt_Click()
Unload UserForm1
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub FrmAc()
'D�ng�y� burada kurmak istiyorum
'do
UserForm1.cmbLst.RowSource = "Sayfa1!A1:A22"
'loop
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Private Sub cmdKpt_Click()
Unload UserForm1
End Sub
----------kod bitir------
----------kod basla------
Sub arala()
Application.ScreenUpdating = False
For a = Cells(65536, 5).End(xlUp).Row To 2 Step -1
If Cells(a, 5) <> Cells(a - 1, 5) Then
sat = Cells(a, 5).Row
For b = 1 To 40
Rows(sat).Insert
Next b
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
BIR.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub IKI_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IKI.Text = "" Then GoTo BIT
If IsNumeric(IKI.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
IKI.Text = ""
End If
BIT:
SAYMA
End Sub
End Sub
If IsNumeric(UC.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
UC.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub DORD_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If DORD.Text = "" Then GoTo BIT
If IsNumeric(DORD.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
DORD.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub BES_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If BES.Text = "" Then GoTo BIT
If IsNumeric(BES.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
BES.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub ALTI_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If ALTI.Text = "" Then GoTo BIT
If IsNumeric(ALTI.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
ALTI.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub YEDI_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If YEDI.Text = "" Then GoTo BIT
If IsNumeric(YEDI.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
YEDI.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub SEKIZ_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If SEKIZ.Text = "" Then GoTo BIT
If IsNumeric(SEKIZ.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
SEKIZ.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub DOKUZ_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If DOKUZ.Text = "" Then GoTo BIT
If IsNumeric(DOKUZ.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
DOKUZ.Text = ""
End If
BIT:
SAYMA
End Sub
Private Sub ONON_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If ONON.Text = "" Then GoTo BIT
If IsNumeric(ONON.Text) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
ONON.Text = ""
End If
BIT:
SAYMA
End Sub
x = Range("D1")
urunsayi = Range("D3").Value
If SIRA.Caption = "" Then SIRA.Caption = urunsayi - 2
si = SIRA.Caption
si = si + 2
If si = 3 Then si = urunsayi
KOD.Text = Sheets("veri").Cells(si, 2).Value
MARKA.Text = Sheets("veri").Cells(si, 3).Value
SAYMA
End Sub
x = Range("D1")
urunsayi = Range("D3").Value
si = SIRA.Caption
si = si + 4
If si > urunsayi Then si = 4
KOD.Text = Sheets("veri").Cells(si, 2).Value
MARKA.Text = Sheets("veri").Cells(si, 3).Value
AD.Text = Sheets("veri").Cells(si, 4).Value
BIR.Text = Sheets("veri").Cells(si, x).Value
IKI.Text = Sheets("veri").Cells(si, x + 1).Value
UC.Text = Sheets("veri").Cells(si, x + 2).Value
DORD.Text = Sheets("veri").Cells(si, x + 3).Value
BES.Text = Sheets("veri").Cells(si, x + 4).Value
ALTI.Text = Sheets("veri").Cells(si, x + 5).Value
YEDI.Text = Sheets("veri").Cells(si, x + 6).Value
SEKIZ.Text = Sheets("veri").Cells(si, x + 7).Value
DOKUZ.Text = Sheets("veri").Cells(si, x + 9).Value
ONON.Text = Sheets("veri").Cells(si, 1).Value
SIRA.Caption = si - 3
SAYMA
End Sub
SAYMA
End Sub
GoTo Ahmet
Son:
Ibrahim = SIRA.Caption
If Not SIRA.Caption = "" Then KOD.Text = Sheets("veri").Cells(Ibrahim + 3, 2)
MsgBox (k & " nolu �r�n bulunamad�...")
Ahmet:
SAYMA
End Sub
a = a + 1
Loop
Devam:
Sheets("veri").Cells(a, 2).Value = KOD.Text
Sheets("veri").Cells(a, 3).Value = MARKA.Text
Sheets("veri").Cells(a, 4).Value = AD.Text
Sheets("veri").Cells(a, x).Value = BIR.Text
Sheets("veri").Cells(a, x + 1).Value = IKI.Text
Sheets("veri").Cells(a, x + 2).Value = UC.Text
Sheets("veri").Cells(a, x + 3).Value = DORD.Text
Sheets("veri").Cells(a, x + 4).Value = BES.Text
Sheets("veri").Cells(a, x + 5).Value = ALTI.Text
Sheets("veri").Cells(a, x + 6).Value = YEDI.Text
Sheets("veri").Cells(a, x + 7).Value = SEKIZ.Text
Sheets("veri").Cells(a, x + 9).Value = DOKUZ.Text
Sheets("veri").Cells(a, 1).Value = ONON.Text
Sheets("veri").Cells(a, x + 8).Value = YBIR
Sheets("veri").Cells(a, x + 10).Value = YIKI
Sheets("veri").Cells(a, x + 11).Value = YUC
Sheets("veri").Select
ActiveWindow.ScrollRow = 1
Rows("4:200").Select
ActiveWindow.ScrollRow = 1
Selection.Sort Key1:=Range("B4"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Sheets("veri").Range("A1").Select
Sheets("FatihGuler").Select
P = 4
Do Until Sheets("veri").Cells(P, 2).Value = ""
P = P + 1
Loop
Range("D3").Value = P - 1
a = 4
Do Until KOD.Text = Sheets("veri").Cells(a, 2).Value
a = a + 1
Loop
SIRA.Caption = a - 3
si = a - 3
wc:
SAYMA
BIR.SetFocus
End Sub
YBIR = Satis
YIKI = STOK
YUC = VAL10 * STOK
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 FAT�H G�LER
' Makro masa_9 taraf�ndan 23.06.2004 tarihinde kaydedildi.
'
' Klavye K�sayolu: Ctrl+a
'
Range("C1").Value = Range("B1").Value
Range("C2").Value = Range("F7").Value
a = -7
Y = -6
Bas:
a = a + 12
Y = Y + 12
Do Until Sheets("veri").Cells(1, a).Value = Range("C1").Value
If Sheets("veri").Cells(1, a).Value = "" Then GoTo Devam
a = a + 12
Y = Y + 12
Loop
If Not Sheets("veri").Cells(1, Y).Value = Range("C2").Value Then GoTo Bas
GoTo Son
Devam:
Sheets("veri").Cells(1, a).Value = Range("c1").Value
Sheets("veri").Cells(1, Y).Value = Range("c2").Value
Son:
Range("F1").Value = Range("B2").Value
Range("F2").Value = Range("F7").Value
Range("D1").Value = a
Range("D2").Value = Y
Ay = Range("C1").Value - 1
Yil = Range("C2").Value
If Range("C1").Value - 1 = 0 Then Ay = 12
If Range("C1").Value - 1 = 0 Then Yil = Range("C2").Value - 1
For s = 4 To Range("D3").Value
If Sheets("veri").Cells(s, a).Value = "" Then Sheets("veri").Cells(s, a).Value =
Sheets("veri").Cells(s, f + 10).Value
Next
Bitir:
End Sub
Sub Makro3()
'
' FAT�H G�LER
' Makro masa_9 taraf�ndan 23.06.2004 tarihinde kaydedildi.
'
'
Ay = Range("F1")
Yil = Range("F2")
FATIH.Show
FATIH.Caption = "FAT�H A.� - " & Yil & " YILI " & Ay & " AYI "
End Sub
----------kod bitir------
----------kod basla------
Sub Makro4()
'
'
Sheets("CIKTI").Select
Cells.Select
Selection.Copy
Sheets("CIKTI1").Select
Range("A1").Select
ActiveSheet.Paste
Sheets("FatihGuler").Select
ESatir = 4
Ay = Range("F1").Value
Yil = Range("F2").Value
Sayfa = 0
No = 0
YSatir = -42
Sakarya = Range("D1").Value
Yaz:
If ESatir = 44 Then
ESatir = 4
Sayfa = Sayfa + 1
YSatir = YSatir + 43
YekunSatir = YSatir + 42
Sheets("CIKTI").Select
Range("A1:P1").Select
ActiveCell.FormulaR1C1 = "GEYVE MA�ZA " & Yil & " " & Ay & " AYI FAAL�YET
RAPORU " & Sayfa
Range("A1:P43").Select
ActiveWindow.ScrollRow = 19
Selection.Copy
Sheets("CIKTI1").Select
Cells(YSatir, 1).Select
ActiveSheet.Paste
Cells(YSatir, 1).RowHeight = 27.75
Range("A4").Select
Sheets("CIKTI").Select
Application.CutCopyMode = False
For Su = 5 To 16
Yekun = Cells(44, Su).Value
For Sa = 4 To 43
Yekun = Yekun + Cells(Sa, Su).Value
Next
Cells(44, Su).Value = Yekun
Next
Range("A4:P43").Select
Selection.ClearContents
Range("A4").Select
Sheets("FatihGuler").Select
End If
No = No + 1
Sheets("CIKTI").Cells(ESatir, s).Value = No
For s = 2 To 4
Sheets("CIKTI").Cells(ESatir, s).Value = Sheets("veri").Cells(Satir,
s).Value
Next
s = 5
Sutun = Range("D1").Value
For a = Sutun To Sutun + 11
Sheets("CIKTI").Cells(ESatir, s).Value = Sheets("veri").Cells(Satir,
a).Value
s = s + 1
Next
ESatir = ESatir + 1
Son:
Sakarya = Range("D1").Value
Next
If Not ESatir = 44 Then
YekunSatir = YekunSatir + 43
Sayfa = Sayfa + 1
YSatir = YSatir + 43
Sheets("CIKTI").Select
Range("A1:P1").Select
ActiveCell.FormulaR1C1 = "GEYVE MA�ZA " & Yil & " " & Ay & " AYI FAAL�YET
RAPORU " & Sayfa
Range("A1:P43").Select
ActiveWindow.ScrollRow = 19
Selection.Copy
Sheets("CIKTI1").Select
Cells(YSatir, 1).Select
ActiveSheet.Paste
Cells(YSatir, 1).RowHeight = 27.75
Range("A4").Select
Sheets("CIKTI").Select
Application.CutCopyMode = False
For Su = 5 To 16
Yekun = Cells(44, Su).Value
For Sa = 4 To 43
Yekun = Yekun + Cells(Sa, Su).Value
Next
Cells(44, Su).Value = Yekun
Next
Range("A4:P43").Select
Selection.ClearContents
Range("A4").Select
Sheets("FatihGuler").Select
End If
Sheets("CIKTI1").Cells(YekunSatir, 3).Value = "YEK�N"
For Sut = 5 To 16
Sheets("CIKTI1").Cells(YekunSatir, Sut).Value = Sheets("CIKTI").Cells(44,
Sut).Value
Sheets("CIKTI").Cells(44, Sut).Value = ""
Next
'D�zenleme
Sheets("CIKTI1").Select
wc:
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
'
' Makro2 Makro
' Makro masa_7 taraf�ndan 05.07.2004 tarihinde kaydedildi.
'
'
'D�zenleme
Sayfa = 2
For Duzen = 1 To Sayfa
Satir = ((Duzen - 1) * 40) + (Duzen * 3) - 2
Altsatir = Satir + 3
Sheets("CIKTI1").Select
Rows("1:3").Select
Selection.Copy
Sheets("CIKTI").Select
Cells(Satir, 1).Select
ActiveSheet.Paste
Cells(Altsatir, 1).Select
Application.CutCopyMode = False
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlHairline
.ColorIndex = xlAutomatic
End With
Range("A1:P1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro7()
'
' Makro7 Makro
' Makro masa_1 taraf�ndan 06.07.2004 tarihinde kaydedildi.
'
'
Sheets("CIKTI1").Select
Cells.Select
Selection.Delete Shift:=xlUp
Sheets("FatihGuler").Select
End Sub
----------kod bitir------
----------kod basla------
Sub topla2()
Dim FATURATUT As Integer
FATURATUTAR = FATURA.Range("f30").Value
LISTEADRESI = LISTEFIRMA.Address
LISTETUTARADRES = LISTE.Range(LISTEADRESI).Offset(0, 6).Address
LISTEFIRMATUTAR = LISTE.Range(LISTEADRESI).Offset(0, 6)
FATURAFIRMA = FATURA.Range("b7")
If FATURAFIRMA = LISTEFIRMA Then
LISTE.Range(LISTETUTARADRES) = LISTEFIRMATUTAR + FATURATUTAR
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub cmdGuncelle_Click()
Worksheets("Kesintiler").Select
ActiveSheet.Unprotect
Range("C1").Value = txtDuzenleyen.Text
Range("C2").Value = txtHastaneAdi.Text
Range("C3").Value = txtHastaSayisi.Text
Range("C4").Value = txtFaturaninTarihi.Text
Range("C5").Value = txtFaturaninNosu.Text
Range("C6").Value = txtFaturaninTutari.Text
Unload Me
frmKesinti.Show
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub cboKesintiNedeni_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim tus
tus = KeyAscii
If tus = 13 Then txtKesintiTutari.SetFocus
End Sub
End Sub
Worksheets("Kesintiler").Activate
ActiveSheet.Unprotect
txtSiraNo.Text = ""
cboKesintiNedeni.Text = "-"
txtKesintiTutari.Text = ""
txtSiraNo.SetFocus
ListeKutusu
satir = sonsatir - 11
lstKesinti.ListIndex = (satir)
Else
If lstKesinti.ListIndex = -1 Then
optYeniKayit.Value = "True"
Exit Sub
End If
satir = lstKesinti.ListIndex
sonsatir = satir + 11
Cells(sonsatir, 1).Value = txtSiraNo.Text
Cells(sonsatir, 2).Value = cboKesintiNedeni.Text
Cells(sonsatir, 4).Value = txtKesintiTutari.Text
txtSiraNo.Text = ""
cboKesintiNedeni.Text = ""
txtKesintiTutari.Text = ""
optYeniKayit.Value = "True"
txtSiraNo.SetFocus
ListeKutusu
lstKesinti.ListIndex = (satir)
End If
If Range("A9").Value <> "" Then
lblUyari.BackColor = &H80000018
lblUyari.Caption = Range("A9").Value
Else
lblUyari.BackColor = &H8000000F
lblUyari.Caption = ""
End If
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
End Sub
End Sub
End Sub
Worksheets("db").Activate
Range("A3:A500").Select
sonsatir = Application.CountA(Selection) + 2
cboKesintiNedeni.RowSource = "db!A2:B" & sonsatir
Worksheets("Kesintiler").Activate
End Sub
'
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.Unprotect
End Sub
----------kod bitir------
----------kod basla------
Private Sub cmdGuncelle_Click()
Worksheets("Kesintiler").Select
ActiveSheet.Unprotect
Range("C1").Value = txtDuzenleyen.Text
Range("C2").Value = txtHastaneAdi.Text
Range("C3").Value = txtHastaSayisi.Text
Range("C4").Value = txtFaturaninTarihi.Text
Range("C5").Value = txtFaturaninNosu.Text
Range("C6").Value = txtFaturaninTutari.Text
Unload Me
frmKesinti.Show
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub cboKesintiNedeni_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Dim tus
tus = KeyAscii
If tus = 13 Then txtKesintiTutari.SetFocus
End Sub
Worksheets("Kesintiler").Activate
ActiveSheet.Unprotect
txtSiraNo.Text = ""
cboKesintiNedeni.Text = "-"
txtKesintiTutari.Text = ""
txtSiraNo.SetFocus
ListeKutusu
satir = sonsatir - 11
lstKesinti.ListIndex = (satir)
Else
If lstKesinti.ListIndex = -1 Then
optYeniKayit.Value = "True"
Exit Sub
End If
satir = lstKesinti.ListIndex
sonsatir = satir + 11
Cells(sonsatir, 1).Value = txtSiraNo.Text
Cells(sonsatir, 2).Value = cboKesintiNedeni.Text
Cells(sonsatir, 4).Value = txtKesintiTutari.Text
txtSiraNo.Text = ""
cboKesintiNedeni.Text = ""
txtKesintiTutari.Text = ""
optYeniKayit.Value = "True"
txtSiraNo.SetFocus
ListeKutusu
lstKesinti.ListIndex = (satir)
End If
If Range("A9").Value <> "" Then
lblUyari.BackColor = &H80000018
lblUyari.Caption = Range("A9").Value
Else
lblUyari.BackColor = &H8000000F
lblUyari.Caption = ""
End If
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Worksheets("db").Activate
Range("A3:A500").Select
sonsatir = Application.CountA(Selection) + 2
cboKesintiNedeni.RowSource = "db!A2:B" & sonsatir
Worksheets("Kesintiler").Activate
End Sub
'
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.Unprotect
End Sub
----------kod bitir------
----------kod basla------
Sub cekal()
Application.ScreenUpdating = False
takimim = Cells(1, 10)
k = 2
For i = 1 To Cells(1, 1).End(xlDown).Row
If Cells(i, 1) = takimim Or Cells(i, 2) = takimim Then
Range(Cells(i, 1), Cells(i, 4)).Copy
Range(Cells(k, 7), Cells(k, 10)).PasteSpecial
k = k + 1
End If
Next i
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Global adres As String
'excel.web.tr'den
'Bu Makro genel filtre ama�l�d�r.
'******************************************************
' A�IKLAMA
'****************************************************** // �rnekler
Application.ScreenUpdating = False
Sheets(HedefSayfa).Select
Range(Range(HedefAlan), Range(HedefAlan).End(xlDown)).Clear
Sheets(KaynakSayfa).Select
Range(FiltreBa�l���).AutoFilter
Range(FiltreBa�l���).AutoFilter Field:=FiltreAlan�, Criteria1:=�l��t & Kriter,
Operator:=xlAnd
Range(Range(AdresAlan�), Range(AdresAlan�).End(xlDown)).Copy
Sheets(HedefSayfa).Select
Range(HedefAlan).Select
ActiveSheet.Paste
Sheets(KaynakSayfa).AutoFilterMode = False
Application.CutCopyMode = False
adres = HedefSayfa & "!" & Range(Range(HedefAlan),
Range(HedefAlan).End(xlDown)).Address
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
Call AdresAl("stok", "A1:C1", "=", ComboBox1.Text, "A1:B1", "stok", "H1:I1", 3)
ListBox1.RowSource = adres
End Sub
'textleri bo�alt
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub
End Sub
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T10.Value = ""
T11.Value = ""
T12.Value = ""
T15.Value = ""
T16.Value = ""
T17.Value = ""
T20.Value = ""
T21.Value = ""
T22.Value = ""
T25.Value = ""
T26.Value = ""
T27.Value = ""
T29.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T33.Value = ""
T34.Value = ""
T35.Value = ""
T36.Value = ""
T37.Value = ""
T38.Value = ""
T39.Value = ""
T40.Value = ""
T41.Value = ""
T42.Value = ""
Sheets("1").Select
End
End Sub
Private Sub UserForm_Initialize()
Chk�stisna.Value = False
Cb�stisna.Visible = False
CommandButton4.Visible = True
End Sub
----------kod bitir------
----------kod basla------
Private Sub T1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsNumeric(T1) = True Then
T1 = Format(T1, "###,###.00")
Exit Sub
End If
T1.Value = ""
End Sub
End Sub
End Sub
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T10.Value = ""
T11.Value = ""
T12.Value = ""
T15.Value = ""
T16.Value = ""
T17.Value = ""
T20.Value = ""
T21.Value = ""
T22.Value = ""
T25.Value = ""
T26.Value = ""
T27.Value = ""
T29.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T33.Value = ""
T34.Value = ""
T35.Value = ""
T36.Value = ""
T37.Value = ""
T38.Value = ""
T39.Value = ""
T40.Value = ""
T41.Value = ""
T42.Value = ""
Sheets("1").Select
End
End Sub
Private Sub UserForm_Initialize()
Chk�stisna.Value = False
Cb�stisna.Visible = False
CommandButton4.Visible = True
End Sub
----------kod bitir------
----------kod basla------
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Dim eskiolcu As Integer
Private Sub UserForm_Activate()
Dim lngFormHwnd As Long
Dim lngFormStyle As Long
----------kod bitir------
----------kod basla------
Sub ShowChart()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Dim ChartNum As Integer
----------kod bitir------
----------kod basla------
Dim formlar As Object
Private Sub Formgoster()
formlar.CommandButton1.Top = CDbl(formlar.Left) + 25
formlar.CommandButton1.Left = CDbl(formlar.Left) + 20
formlar.Show
End Sub
Sub test()
xx = InputBox("hangi form? 1 veya 2")
Select Case xx
Case 1
Set formlar = UserForm1
Call Formgoster
Case 2
Set formlar = UserForm2
Call Formgoster
End Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
----------kod bitir------
----------kod basla------
End Sub
----------kod bitir------
----------kod basla------
Sub Test1()
Dim NoG As Long
NoG = Range("h65536").End(xlUp).Row
Range("g4").AutoFill Destination:=Range("g4:g" & NoG)
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
[b6:j65536].ClearContents
For a = 2 To Sheets("liste").Cells(65536, 1).End(xlUp).Row
If [c4].Value = Sheets("liste").Cells(a, 1).Value Then
c = c + 1
For b = 2 To 7
Cells(c + 5, b) = Sheets("liste").Cells(a, b).Value
Next
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Sub Goster()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton2_Click()
FrameGoster = False
End Sub
TL = Left(ParaStr, Len(ParaStr) - 3)
Kurus = Right(ParaStr, 2)
ParaCevirTL = IIf(Para < 0, "Eksi ", "") & Cevir(TL) & " TL ve " & Cevir(Kurus)
& " KURU�"
Exit Function
SayiDegil:
ParaCevirTL = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Public Function ParaCevir(Para)
Dim ParaStr As String
Dim YTL As String, Kurus As String
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(YTL) & " YTL ve " & Cevir(Kurus)
& " KURU�"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon ", "milyar ", "milyon ", "bin ", "")
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin ") Then e = "bin "
Sonuc = Sonuc + e
Next i
Windows("Ft.V001.xls").Activate
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
Sub ron()
If Val(Application.Version) = 10 Then
Application.Help "XLMAIN10.CHM", ActiveSheet.Cells(ActiveCell.Row, 3).Value
Else
Application.Help "XLMAIN9.CHM", ActiveSheet.Cells(ActiveCell.Row, 3).Value
End If
End Sub
Sub menu()
Application.CommandBars("Workbook tabs").ShowPopup 700, 150
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Sheets("AnaSayfa").Select
Range("E5").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Kaydet1()
ActiveWorkbook.Save
End Sub
Sub Kaydet2()
On Error Resume Next
ChDrive ("Z")
MkDir "C:\Fatura"
ChDir "C:\Fatura"
ActiveWorkbook.SaveAs Filename:="Ft" & Format(Day(Now), "00") & Format(Month(Now),
"00") & Year(Now)
Workbooks.Open "C:\Fatura\Ft.V001.xls"
ActiveWindow.ActivateNext
ActiveWindow.Close
End Sub
Sub Yedekle()
Kaydet1
Kaydet2
End Sub
Sub Otomatik�ekil19_T�klat()
Yedekle
End Sub
----------kod bitir------
----------kod basla------
Sub UserFormAc()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Sub ron()
If Val(Application.Version) = 10 Then
Application.help "XLMAIN10.CHM", ActiveSheet.Cells(ActiveCell.Row, 3).Value
Else
Application.help "XLMAIN9.CHM", ActiveSheet.Cells(ActiveCell.Row, 3).Value
End If
End Sub
Sub menu()
Application.CommandBars("Workbook tabs").ShowPopup 500, 200
End Sub
----------kod bitir------
----------kod basla------
Sub cekal()
Application.ScreenUpdating = False
k = 2
t = 2 'tak�m listesini yazmaya ba�lad���n�z sat�r say�s�, s�tunda 12
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Function vergihesapla(vergigiris)
Dim dilim1, oran1, dilim2, oran2, dilim3, oran3, dilim4, oran4, dilim5, oran5,
dilim1matrah, dilim2matrah, dilim3matrah, dilim4matrah, dilim5matrah, yuvarlama
dilim1 = Sheets("parametre").Cells(6, 1).Value
dilim2 = Sheets("parametre").Cells(7, 1).Value
dilim3 = Sheets("parametre").Cells(8, 1).Value
dilim4 = Sheets("parametre").Cells(9, 1).Value
dilim5 = Sheets("parametre").Cells(10, 1).Value
oran1 = Sheets("parametre").Cells(6, 2).Value
oran2 = Sheets("parametre").Cells(7, 2).Value
oran3 = Sheets("parametre").Cells(8, 2).Value
oran4 = Sheets("parametre").Cells(9, 2).Value
oran5 = Sheets("parametre").Cells(10, 2).Value
yuvarlama = Sheets("parametre").Cells(12, 2).Value
End Function
----------kod bitir------
----------kod basla------
Option Compare Text
Sub ara()
On Error Resume Next
Application.ScreenUpdating = False
sat = data.Columns(1).Find(sablon.[A1].Value).Row
data.Range("A" & sat, "F" & sat).Copy
s = WorksheetFunction.CountA(Sayfa2.[B1:B65536])
sablon.Range("B" & s + 1).PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
End Sub
Sub onoff()
Dim Mycell As Range
For Each Mycell In Selection
If Mycell.Value Like "*>>" Then
Mycell.Interior.ColorIndex = 44
ElseIf Mycell.Value Like "ON" Then
Mycell.Interior.ColorIndex = 4
ElseIf Mycell.Value Like "OFF" Then
Mycell.Interior.ColorIndex = 3
End If
Next
End Sub
Sub kopyalama()
Sub bul()
Set k = Sheets("deneme").Columns(1).Find(Range("B1").Value, lookat:=xlWhole,
LookIn:=xlValues)
If k Is Nothing Then
MsgBox Range("B1").Value & " ismi bulunamadi"
Else
MsgBox Range("B1").Value & " ismi bulundu"
End If
End Sub
----------kod bitir------
----------kod basla------
Sub deneme()
'
' deneme Macro
' Macro recorded 4/21/2005 by mehmeto
'
'
Range("B6").Select
Selection.Copy
Sheets("sablon").Select
Range("B9").Select
ActiveSheet.Paste
Sheets("data").Select
Range("A6").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("sablon").Select
Range("A9").Select
ActiveSheet.Paste
Sheets("data").Select
Range("C6").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("sablon").Select
Range("D9").Select
ActiveSheet.Paste
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As
Integer) As Long
Private Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Integer)
As Long
Private Declare Function CopyImage Lib "user32" (ByVal handle As Long, ByVal un1 As
Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (PicDesc As
uPicDesc, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As
Long
Dim r As Long
Dim uPicInfo As uPicDesc
Dim IID_IDispatch As GUID
Dim IPic As IPicture
With IID_IDispatch
.Data1 = &H7BF80980
.Data2 = &HBF32
.Data3 = &H101A
.Data4(0) = &H8B
.Data4(1) = &HBB
.Data4(2) = &H0
.Data4(3) = &HAA
.Data4(4) = &H0
.Data4(5) = &H30
.Data4(6) = &HC
.Data4(7) = &HAB
End With
With uPicInfo
.Size = Len(uPicInfo)
.Type = 1
.hPic = hCopy
.hPal = 0
End With
r = OleCreatePictureIndirect(uPicInfo, IID_IDispatch, True, IPic)
If r <> 0 Then MsgBox "Error": Exit Sub
Set Image1.Picture = IPic
End If
Exit Sub
ErrHandler:
h = CloseClipboard
End Sub
'
Private Sub ListBox1_Click()
Sheets("Sheet1").Shapes(ListBox1.Text).CopyPicture xlScreen, xlBitmap
Call GetPicture
End Sub
'
Private Sub UserForm_Initialize()
Dim objPic As Object
For Each objPic In Sheets("Sheet1").Shapes
If objPic.Name Like "*Picture*" Then ListBox1.AddItem objPic.Name
Next
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function IsClipboardFormatAvailable Lib "user32" (ByVal wFormat As
Integer) As Long
Private Declare Function GetClipboardData Lib "user32" (ByVal wFormat As Integer)
As Long
Private Declare Function CopyImage Lib "user32" (ByVal handle As Long, ByVal un1 As
Long, ByVal n1 As Long, ByVal n2 As Long, ByVal un2 As Long) As Long
Private Declare Function CloseClipboard Lib "user32" () As Long
Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (PicDesc As
uPicDesc, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As
Long
Dim r As Long
Dim uPicInfo As uPicDesc
Dim IID_IDispatch As GUID
Dim IPic As IPicture
With IID_IDispatch
.Data1 = &H7BF80980
.Data2 = &HBF32
.Data3 = &H101A
.Data4(0) = &H8B
.Data4(1) = &HBB
.Data4(2) = &H0
.Data4(3) = &HAA
.Data4(4) = &H0
.Data4(5) = &H30
.Data4(6) = &HC
.Data4(7) = &HAB
End With
With uPicInfo
.Size = Len(uPicInfo)
.Type = 1
.hPic = hCopy
.hPal = 0
End With
r = OleCreatePictureIndirect(uPicInfo, IID_IDispatch, True, IPic)
If r <> 0 Then MsgBox "Error": Exit Sub
Set Image1.Picture = IPic
End If
Exit Sub
ErrHandler:
h = CloseClipboard
End Sub
'
Private Sub ListBox1_Click()
Sheets("Sheet1").Shapes(ListBox1.Text).CopyPicture xlScreen, xlBitmap
Call GetPicture
End Sub
'
Private Sub UserForm_Initialize()
Dim objPic As Object
For Each objPic In Sheets("Sheet1").Shapes
If objPic.Name Like "*Picture*" Then ListBox1.AddItem objPic.Name
Next
End Sub
----------kod bitir------
----------kod basla------
Const TempFile As String = "C:\TempPic.jpg"
'
Private Sub CommandButton1_Click()
Unload Me
End Sub
'
Private Sub ListBox1_Click()
Dim MyShape As String
MyShape = ListBox1.Text
Call GetPicture2(MyShape)
End Sub
'
Private Sub UserForm_Initialize()
Dim objPic As Object
For Each objPic In Sheets("Sheet1").Shapes
If objPic.Name Like "*Picture*" Then ListBox1.AddItem objPic.Name
Next
End Sub
'
Private Sub GetPicture2(MyShape As String)
Dim MyChart As Chart
Sheets("Sheet1").Shapes(MyShape).CopyPicture xlScreen, xlBitmap
Set MyChart = ActiveSheet.ChartObjects.Add(1, 1, 30, 30).Chart
With MyChart
.Paste
.Export TempFile
.Parent.Delete
End With
Image1.Picture = LoadPicture(TempFile)
Kill TempFile
Set MyChart = Nothing
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Stok.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
yeniekle
End Sub
Sub yeniekle()
kay�tekle.Show
End Sub
Private Sub CommandButton2_Click()
Kay�tsil
End Sub
Sub Kay�tsil()
Sil.Show
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
frmsifre.Show
End Sub
Sub D��me2_T�klat()
Columns("A:H").Hidden = True
End Sub
----------kod bitir------
----------kod basla------
Sub gizle()
'yanl�s yaparak umar�m do�rusunu kavr�cam
Sheets("b1,b2,b3,c1,c2,c3,").Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("�ndex").Select
End Sub
----------kod bitir------
----------kod basla------
Sub gizlebc()
Application.ScreenUpdating = False
Sheets("a1").Visible = True
Sheets("a2").Visible = True
Sheets("a3").Visible = True
Sheets("b1").Visible = True
Sheets("b2").Visible = True
Sheets("b3").Visible = True
Sheets("c1").Visible = True
Sheets("c2").Visible = True
Sheets("c3").Visible = True
Sheets(Array("b1", "b2", "b3", "c1", "c2", "c3")).Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("index").Select
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Sub gizleab()
Application.ScreenUpdating = False
Sheets("a1").Visible = True
Sheets("a2").Visible = True
Sheets("a3").Visible = True
Sheets("b1").Visible = True
Sheets("b2").Visible = True
Sheets("b3").Visible = True
Sheets("c1").Visible = True
Sheets("c2").Visible = True
Sheets("c3").Visible = True
Sheets(Array("b1", "b2", "b3", "a1", "a2", "a3")).Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("index").Select
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Sub gizleac()
Application.ScreenUpdating = False
Sheets("a1").Visible = True
Sheets("a2").Visible = True
Sheets("a3").Visible = True
Sheets("b1").Visible = True
Sheets("b2").Visible = True
Sheets("b3").Visible = True
Sheets("c1").Visible = True
Sheets("c2").Visible = True
Sheets("c3").Visible = True
Sheets(Array("a1", "a2", "a3", "c1", "c2", "c3")).Select
ActiveWindow.SelectedSheets.Visible = False
Sheets("index").Select
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Option Explicit
Sub D��me1_T�klat()
frmsifre.Show
End Sub
Sub D��me2_T�klat()
Columns("A:H").Hidden = True
End Sub
----------kod bitir------
----------kod basla------
Sub Macro9()
'
' Macro9 Macro
' Macro recorded 4/22/2005 by Sinan ISIM
'
'
Rows("22:26").Select
Selection.EntireRow.Hidden = True
Range("A27").Select
Rows("28:33").Select
Selection.EntireRow.Hidden = False
Range("A27").Select
End Sub
Sub Rusca()
Range("B20").Select
Sheets("GrafikR").Select
Range("A20").Select
End Sub
Sub Turkce()
Range("B20").Select
Sheets("Grafik").Select
Range("A20").Select
End Sub
Sub Ingilizce()
Range("B20").Select
Sheets("GrafikE").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub doldur()
sut = [m3].Value
For a = 5 To 26
Cells(a, 7) = Cells(a, 1)
Cells(a, 8) = Cells(a, sut * 2)
Cells(a, 9) = Cells(a, sut * 2 + 1)
Next a
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("Sheet1").ChartObjects(1).Activate
ActiveChart.Export ("C:\MyChart.jpg")
Image1.PictureSizeMode = fmPictureSizeModeStretch
Image1.Picture = LoadPicture("C:\MyChart.jpg")
Kill ("C:\MyChart.jpg")
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Dim brkyt As Integer, prckyt As Integer, tdrkyt As Integer, prbrmkyt As Integer,
nklkyt As Integer, _
dsykyt As Integer, dsyyl As Date, frmbslk As String, prclbl As Integer, tdrlbl As
Integer, _
KptMsg As String, brmhsb As Double, tplhsb As Double, HtMsg As String, IslKyt As
Integer, _
MktMsg As String, BrmFytMsg As String, LstBsMsg As String, eskbar As String, LstSy
As Integer, _
KytEk As Integer, SnMsg As String
With cmbMlz
.RowSource = "listeler!A2:A" & prckyt
.ColumnHeads = True
.ListIndex = 0
prclbl = .ListIndex + 2
End With
With cmbTdr
.RowSource = "listeler!C2:C" & tdrkyt
.ColumnHeads = True
.ListIndex = 0
tdrlbl = .ListIndex + 2
End With
With cmbPrBrm
.RowSource = "listeler!E2:E" & prbrmkyt
.ColumnHeads = True
.ListIndex = 1
End With
With cmbNkl
.RowSource = "listeler!F2:F" & nklkyt
.ColumnHeads = True
.ListIndex = 0
End With
With cmbBrm
.RowSource = "listeler!G2:G" & brkyt
.ColumnHeads = True
.ListIndex = 0
End With
'<--diger tan�mlamalar-->
frmbslk = "�thalat Dosyas� A�ma"
frmDsyAc.Caption = frmbslk
lblMlz = shLst.Cells(prclbl, 2)
lblTdr = shLst.Cells(tdrlbl, 4)
dtCksTrh = Date
dtVrsTrh = Date
dtFtrTrh = Date
End Sub
frmDsyAc.Hide
eskbar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Kay�t i�lemi devam ederken l�tfen bekleyiniz !"
With shdsy
Dim LstKyt As Object
Set LstKyt = lvwKytlr.ListItems.Item(LstSy)
KytEk = WorksheetFunction.CountA(.Columns(1)) + 1
.Cells(KytEk, 1) = CStr(LstKyt) 'Dosya No
.Cells(KytEk, 2) = CStr(LstKyt.SubItems(1)) 'Tedarik�i
.Cells(KytEk, 3) = CStr(LstKyt.SubItems(2)) 'Par�a No
.Cells(KytEk, 4) = CStr(LstKyt.SubItems(3)) 'Par�a Tan�m�
.Cells(KytEk, 5) = CDate(LstKyt.SubItems(4)) 'Fatura Tarihi
.Cells(KytEk, 6) = CStr(LstKyt.SubItems(5)) 'Fatura No
.Cells(KytEk, 7) = CStr(LstKyt.SubItems(6)) '�rsaliye No
.Cells(KytEk, 8) = CLng(LstKyt.SubItems(7)) 'Fatura Miktar�
.Cells(KytEk, 10) = CLng(LstKyt.SubItems(7)) 'Fiktif Miktar�
.Cells(KytEk, 11) = CStr(LstKyt.SubItems(8)) 'Birim
.Cells(KytEk, 12) = CDbl(LstKyt.SubItems(9)) 'Birim Fiyat�
.Cells(KytEk, 13) = CInt(LstKyt.SubItems(10)) ' �arpan
.Cells(KytEk, 14) = CDbl(LstKyt.SubItems(11)) 'Bak�r
.Cells(KytEk, 15) = CCur(LstKyt.SubItems(12)) ' Fatura Tutar�
.Cells(KytEk, 17) = CCur(LstKyt.SubItems(12)) 'Fiktif Tutar�
.Cells(KytEk, 18) = CStr(LstKyt.SubItems(13)) 'Para Birimi
.Cells(KytEk, 19) = CStr(LstKyt.SubItems(14)) 'Plaka
.Cells(KytEk, 20) = CDate(LstKyt.SubItems(15)) '��k� Tarihi
.Cells(KytEk, 21) = CDate(LstKyt.SubItems(16)) 'Var� Tarihi
.Cells(KytEk, 22) = CStr(LstKyt.SubItems(17)) 'Nakliyeci
.Cells(KytEk, 23) = CStr(LstKyt.SubItems(18)) 'NT (Nakliye T�r�)
.Cells(KytEk, 24) = "Y" 'HD ( Hareket Durumu )
End With
Next LstSy
Application.StatusBar = False
Application.DisplayStatusBar = eskbar
Application.ActiveWorkbook.Save
SnMsg = MsgBox("Kayit i�lemi tamamlanm�t�r !", , frmbslk)
Unload frmDsyAc
End If
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Dim vr As Long, str As Long, hrkvr As Long
With shdsy
Set bln = .[A1:A65536].Find(lstDsy.List(lstDsy.ListIndex), LookIn:=xlValues)
If Not bln Is Nothing Then
ilk = bln.Address
Do
If lstDsy.Selected(lstDsy.ListIndex) = True Then
.Cells(bln.Row, 26) = "x"
Else
.Cells(bln.Row, 26) = ""
End If
Set bln = .Columns(1).FindNext(bln)
Loop While Not bln Is Nothing And bln.Address <> ilk
End If
End With
End Sub
For i = 2 To vr
If shdsy.Rows(i).Hidden = False Then
Set ls = frmFktRp.lvLst.ListItems.Add(, , shdsy.Cells(i, 2))
ls.SubItems(1) = shdsy.Cells(i, 3)
ls.SubItems(2) = shdsy.Cells(i, 8)
ls.SubItems(3) = shdsy.Cells(i, 9)
ls.SubItems(4) = shdsy.Cells(i, 10)
ls.SubItems(5) = shdsy.Cells(i, 12)
ls.SubItems(6) = shdsy.Cells(i, 17)
ls.SubItems(7) = shdsy.Cells(i, 6)
ls.SubItems(8) = shdsy.Cells(i, 5)
ls.SubItems(9) = shdsy.Cells(i, 24)
ls.SubItems(10) = Mid(shdsy.Cells(i, 1), 6)
End If
Next i
shdsy.Range("A1:Y" & vr).AutoFilter
End Sub
For i = 1 To lvLst.ColumnHeaders.Count
Sheets("fiktif").Cells(1, i) = lvLst.ColumnHeaders(i).Text
Sheets("fiktif").Cells(1, i).Font.Bold = True
Next
On Error Resume Next
For i = 1 To lvLst.ListItems.Count
Sheets("fiktif").Cells(i + 1, 1) = lvLst.ListItems(i)
Sheets("fiktif").Cells(i + 1, 2) = lvLst.ListItems(i).SubItems(1)
Sheets("fiktif").Cells(i + 1, 3) = CLng(lvLst.ListItems(i).SubItems(2))
Sheets("fiktif").Cells(i + 1, 4) = CLng(lvLst.ListItems(i).SubItems(3))
Sheets("fiktif").Cells(i + 1, 5) = CLng(lvLst.ListItems(i).SubItems(4))
Sheets("fiktif").Cells(i + 1, 6) = CDbl(lvLst.ListItems(i).SubItems(5))
Sheets("fiktif").Cells(i + 1, 7) = CDbl(lvLst.ListItems(i).SubItems(6))
Sheets("fiktif").Cells(i + 1, 8) = lvLst.ListItems(i).SubItems(7)
Sheets("fiktif").Cells(i + 1, 9) = CDate(lvLst.ListItems(i).SubItems(8))
Sheets("fiktif").Cells(i + 1, 10) = lvLst.ListItems(i).SubItems(9)
Sheets("fiktif").Cells(i + 1, 11) = lvLst.ListItems(i).SubItems(10)
Next i
Application.ScreenUpdating = True
MsgBox "Sayfaya veri g�nderme i�lemi tamamland�!", , frmFktRp.Caption
End Sub
For i = 2 To WorksheetFunction.CountA(shdsy.Columns(1))
If cmbDsy = shdsy.Cells(i, 1) Then
If shdsy.Cells(i, 24) = "F" Then
Set ls = lvLst.ListItems.Add(, , shdsy.Cells(i, 1))
ls.SubItems(1) = shdsy.Cells(i, 2)
ls.SubItems(2) = shdsy.Cells(i, 3)
ls.SubItems(3) = shdsy.Cells(i, 5)
ls.SubItems(4) = shdsy.Cells(i, 6)
ls.SubItems(5) = shdsy.Cells(i, 8)
ls.SubItems(6) = shdsy.Cells(i, 12)
ls.SubItems(7) = shdsy.Cells(i, 15)
ls.SubItems(8) = shdsy.Cells(i, 18)
ls.SubItems(9) = shdsy.Cells(i, 19)
ls.SubItems(10) = shdsy.Cells(i, 20)
ls.SubItems(11) = shdsy.Cells(i, 21)
ls.SubItems(12) = shdsy.Cells(i, 22)
ls.SubItems(13) = kc(shdsy.Cells(i, 25))
End If
End If
Next i
End Sub
End Sub
Sub BtnDosyaKapakOlustur_Click()
frmDsyKp.Show
End Sub
Sub BtnFiktifGirisi_Click()
frmFktGr.Show
End Sub
Sub BtnKismiCekOlustur_Click()
frmKsmCk.Show
End Sub
Sub BtnFiktifCikisi_Click()
frmFktCk.Show
End Sub
Sub BtnFiktifRaporu_Click()
frmFktRp.Show
End Sub
Sub BtnKapat_Click()
Application.Quit
End Sub
Sub BtnSimge_Click()
Application.WindowState = xlMinimized
End Sub
Sub BtnKapla_Click()
Select Case Application.WindowState
Case xlNormal
Application.WindowState = xlMaximized
Case xlMaximized
Application.WindowState = xlNormal
End Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
'
' Makro2 Makro
' Makro �brahim DO�U� taraf�ndan 15.04.2005 tarihinde kaydedildi.
'
'
Selection.AutoFilter
Range("A1:K7").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Range("A1:K7").Sort Key1:=Range("A1"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
End Sub
Sub Makro3()
'
' Makro3 Makro
' Makro �brahim DO�U� taraf�ndan 15.04.2005 tarihinde kaydedildi.
'
'
Range("A1:Y100").Sort Key1:=Range("B1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
Range("A1:Y100").Sort Key1:=Range("B1"), Order1:=xlDescending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Public vr As Long, say As Long, YlTpl As Currency, Tpl As Currency, Fkt As
Currency, _
Yl As Currency, i As Integer, ls As Object
Sub Dgr_Hsb()
vr = WorksheetFunction.CountA(shdsy.Columns(1))
Yl = 0: Fkt = 0: Tpl = 0: YlTpl = 0
For say = 2 To vr
If CStr(shdsy.Cells(say, 24)) = "Y" Then
Yl = Yl + shdsy.Cells(say, 17)
frmFktRp.txtYl = Format(Yl, "#,##0.00 �")
End If
If shdsy.Cells(say, 24) = "F" Then
Fkt = Fkt + shdsy.Cells(say, 17)
frmFktRp.txtFkt = Format(Fkt, "#,##0.00 �")
End If
If shdsy.Cells(say, 24) = "F" Or shdsy.Cells(say, 24) = "Y" Then
Tpl = Tpl + shdsy.Cells(say, 17)
frmFktRp.txtTpl = Format(Tpl, "#,##0.00 �")
End If
If Mid(shdsy.Cells(say, 1), 1, 4) = Format(Date, "yyyy") Then
YlTpl = YlTpl + shdsy.Cells(say, 15)
frmFktRp.txtYlTpl = Format(YlTpl, "#,##0.00 �")
End If
Next say
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Option Explicit
Dim brkyt As Integer, prckyt As Integer, tdrkyt As Integer, prbrmkyt As Integer,
nklkyt As Integer, _
dsykyt As Integer, dsyyl As Date, frmbslk As String, prclbl As Integer, tdrlbl As
Integer, _
KptMsg As String, brmhsb As Double, tplhsb As Double, HtMsg As String, IslKyt As
Integer, _
MktMsg As String, BrmFytMsg As String, LstBsMsg As String, eskbar As String, LstSy
As Integer, _
KytEk As Integer, SnMsg As String
With cmbMlz
.RowSource = "listeler!A2:A" & prckyt
.ColumnHeads = True
.ListIndex = 0
prclbl = .ListIndex + 2
End With
With cmbTdr
.RowSource = "listeler!C2:C" & tdrkyt
.ColumnHeads = True
.ListIndex = 0
tdrlbl = .ListIndex + 2
End With
With cmbPrBrm
.RowSource = "listeler!E2:E" & prbrmkyt
.ColumnHeads = True
.ListIndex = 1
End With
With cmbNkl
.RowSource = "listeler!F2:F" & nklkyt
.ColumnHeads = True
.ListIndex = 0
End With
With cmbBrm
.RowSource = "listeler!G2:G" & brkyt
.ColumnHeads = True
.ListIndex = 0
End With
'<--diger tan�mlamalar-->
frmbslk = "�thalat Dosyas� A�ma"
frmDsyAc.Caption = frmbslk
lblMlz = shLst.Cells(prclbl, 2)
lblTdr = shLst.Cells(tdrlbl, 4)
txtBkrFyt = 0
dtCksTrh = Date
dtVrsTrh = Date
dtFtrTrh = Date
End Sub
frmDsyAc.Hide
eskbar = Application.DisplayStatusBar
Application.DisplayStatusBar = True
Application.StatusBar = "Kay�t i�lemi devam ederken l�tfen bekleyiniz !"
With shdsy
Dim LstKyt As Object
Set LstKyt = lvwKytlr.ListItems.Item(LstSy)
KytEk = WorksheetFunction.CountA(.Columns(1)) + 1
.Cells(KytEk, 1) = CStr(LstKyt) 'Dosya No
.Cells(KytEk, 2) = CStr(LstKyt.SubItems(1)) 'Tedarik�i
.Cells(KytEk, 3) = CStr(LstKyt.SubItems(2)) 'Par�a No
.Cells(KytEk, 4) = CStr(LstKyt.SubItems(3)) 'Par�a Tan�m�
.Cells(KytEk, 5) = CDate(LstKyt.SubItems(4)) 'Fatura Tarihi
.Cells(KytEk, 6) = CStr(LstKyt.SubItems(5)) 'Fatura No
.Cells(KytEk, 7) = CStr(LstKyt.SubItems(6)) '�rsaliye No
.Cells(KytEk, 8) = CLng(LstKyt.SubItems(7)) 'Fatura Miktar�
.Cells(KytEk, 10) = CLng(LstKyt.SubItems(7)) 'Fiktif Miktar�
.Cells(KytEk, 11) = CStr(LstKyt.SubItems(8)) 'Birim
.Cells(KytEk, 12) = CDbl(LstKyt.SubItems(9)) 'Birim Fiyat�
.Cells(KytEk, 13) = CInt(LstKyt.SubItems(10)) ' �arpan
.Cells(KytEk, 14) = CDbl(LstKyt.SubItems(11)) 'Bak�r
.Cells(KytEk, 15) = CCur(LstKyt.SubItems(12)) ' Fatura Tutar�
.Cells(KytEk, 17) = CCur(LstKyt.SubItems(12)) 'Fiktif Tutar�
.Cells(KytEk, 18) = CStr(LstKyt.SubItems(13)) 'Para Birimi
.Cells(KytEk, 19) = CStr(LstKyt.SubItems(14)) 'Plaka
.Cells(KytEk, 20) = CDate(LstKyt.SubItems(15)) '��k� Tarihi
.Cells(KytEk, 21) = CDate(LstKyt.SubItems(16)) 'Var� Tarihi
.Cells(KytEk, 22) = CStr(LstKyt.SubItems(17)) 'Nakliyeci
.Cells(KytEk, 23) = CStr(LstKyt.SubItems(18)) 'NT (Nakliye T�r�)
.Cells(KytEk, 24) = "Y" 'HD ( Hareket Durumu )
End With
Next LstSy
Application.StatusBar = False
Application.DisplayStatusBar = eskbar
Application.ActiveWorkbook.Save
SnMsg = MsgBox("Kayit i�lemi tamamlanm�t�r !", , frmbslk)
Unload frmDsyAc
End If
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Dim c As Object, sts As Integer, i As Integer, sys As Single, ilk As String, hdf As
Object, _
str As Integer, dsysn As Integer
----------kod bitir------
----------kod basla------
Option Explicit
Dim vr As Long, str As Long, hrkvr As Long
With shdsy
Set bln = .[A1:A65536].Find(lstDsy.List(lstDsy.ListIndex), LookIn:=xlValues)
If Not bln Is Nothing Then
ilk = bln.Address
Do
If lstDsy.Selected(lstDsy.ListIndex) = True Then
.Cells(bln.Row, 26) = "x"
Else
.Cells(bln.Row, 26) = ""
End If
Set bln = .Columns(1).FindNext(bln)
Loop While Not bln Is Nothing And bln.Address <> ilk
End If
End With
End Sub
End If
Else
If shdsy.Cells(i, 24) = "F" Or shdsy.Cells(i, 24) = "Y" Then
If shdsy.Cells(i, 3) >= cmbMlz1.Value And _
shdsy.Cells(i, 3) <= cmbMlz2.Value Then 'Or _
'shdsy.Cells(i, 5) >= txtTrh1.Value And _
'shdsy.Cells(i, 5) <= txtTrh2.Value Or _
'shdsy.Cells(i, 2) >= cmbTdr1.Value And _
'shdsy.Cells(i, 2) <= cmbTdr2.Value Then
Set ls = frmFktRp.lvLst.ListItems.Add(, , shdsy.Cells(i, 2))
ls.SubItems(1) = shdsy.Cells(i, 3)
ls.SubItems(2) = shdsy.Cells(i, 8)
End If
If shdsy.Cells(i, 5) >= CDate(txtTrh1) And _
shdsy.Cells(i, 5) <= CDate(txtTrh2) Then
Set ls = frmFktRp.lvLst.ListItems.Add(, , shdsy.Cells(i, 2))
ls.SubItems(1) = shdsy.Cells(i, 3)
ls.SubItems(2) = shdsy.Cells(i, 8)
End If
End If
End If
Next i
End Sub
For i = 2 To WorksheetFunction.CountA(shdsy.Columns(1))
If cmbDsy = shdsy.Cells(i, 1) Then
If shdsy.Cells(i, 24) = "F" Then
Set ls = lvLst.ListItems.Add(, , shdsy.Cells(i, 1))
ls.SubItems(1) = shdsy.Cells(i, 2)
ls.SubItems(2) = shdsy.Cells(i, 3)
ls.SubItems(3) = shdsy.Cells(i, 5)
ls.SubItems(4) = shdsy.Cells(i, 6)
ls.SubItems(5) = shdsy.Cells(i, 8)
ls.SubItems(6) = shdsy.Cells(i, 12)
ls.SubItems(7) = shdsy.Cells(i, 15)
ls.SubItems(8) = shdsy.Cells(i, 18)
ls.SubItems(9) = shdsy.Cells(i, 19)
ls.SubItems(10) = shdsy.Cells(i, 20)
ls.SubItems(11) = shdsy.Cells(i, 21)
ls.SubItems(12) = shdsy.Cells(i, 22)
ls.SubItems(13) = kc(shdsy.Cells(i, 25))
End If
End If
Next i
End Sub
End Sub
Sub BtnDosyaAc_Click()
frmDsyAc.Show
End Sub
Sub BtnDosyaKapakOlustur_Click()
frmDsyKp.Show
End Sub
Sub BtnFiktifGirisi_Click()
frmFktGr.Show
End Sub
Sub BtnKismiCekOlustur_Click()
frmKsmCk.Show
End Sub
Sub BtnFiktifCikisi_Click()
frmFktCk.Show
End Sub
Sub BtnFiktifRaporu_Click()
frmFktRp.Show
End Sub
Sub BtnKapat_Click()
Application.Quit
End Sub
Sub BtnSimge_Click()
Application.WindowState = xlMinimized
End Sub
Sub BtnKapla_Click()
Select Case Application.WindowState
Case xlNormal
Application.WindowState = xlMaximized
Case xlMaximized
Application.WindowState = xlNormal
End Select
End Sub
Sub de()
If Mid(Range("A2"), 1, 4) = Format(Date, "yyyy") Then
MsgBox "dogru"
Else
MsgBox "Yanl�"
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro �brahim DO�U� taraf�ndan 14.04.2005 tarihinde kaydedildi.
'
'
[A2:Y725].AutoFilter Field:=2, Criteria1:="=AKO" ', Operator:=xlAnd, _
Criteria2:="<=PRETTL APPL POL"
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Public vr As Long, say As Long, YlTpl As Currency, Tpl As Currency, Fkt As
Currency, _
Yl As Currency, i As Integer, ls As Object
Dim tdrc As String, mlzn As String, ftrmk As Long, cklmk As Long, klnmk As
Long, brfy As Double, _
klntt As Currency, ftrn As String, ftrtr As Date, drm As String, dsyn As String
Sub Dgr_Hsb()
vr = WorksheetFunction.CountA(shdsy.Columns(1))
Yl = 0: Fkt = 0: Tpl = 0: YlTpl = 0
For say = 2 To vr
If CStr(shdsy.Cells(say, 24)) = "Y" Then
Yl = Yl + shdsy.Cells(say, 17)
frmFktRp.txtYl = Format(Yl, "#,##0.00 �")
End If
If shdsy.Cells(say, 24) = "F" Then
Fkt = Fkt + shdsy.Cells(say, 17)
frmFktRp.txtFkt = Format(Fkt, "#,##0.00 �")
End If
If shdsy.Cells(say, 24) = "F" Or shdsy.Cells(say, 24) = "Y" Then
Tpl = Tpl + shdsy.Cells(say, 17)
frmFktRp.txtTpl = Format(Tpl, "#,##0.00 �")
End If
If Mid(shdsy.Cells(say, 1), 1, 4) = Format(Date, "yyyy") Then
YlTpl = YlTpl + shdsy.Cells(say, 15)
frmFktRp.txtYlTpl = Format(YlTpl, "#,##0.00 �")
End If
Next say
End Sub
Sub tbl(tdrc As String, mlzn As String, ftrmk As Long, cklmk As Long, klnmk As
Long, _
brfy As Double, klntt As Currency, ftrn As String, ftrtr As Date, drm As String,
dsyn As String)
Set ls = frmFktRp.lvLst.ListItems.Add(, , tdrc) 'shdsy.Cells(i, 2))
ls.SubItems(1) = mlzn 'shdsy.Cells(i, 3)
ls.SubItems(2) = ftrmk 'shdsy.Cells(i, 8)
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Option Explicit
----------kod bitir------
----------kod basla------
Sub AUTO_OPEN()
Set T = Worksheets("DATA")
Sheets("SONUC").Select
DialogSheets("FORM").Show
T.Cells(1, 1).Value = 1000
End Sub
Sub KAYIT()
Set T = Worksheets("DATA")
Set B = Worksheets("BUTCE")
Set F = DialogSheets("FORM")
If F.EditBoxes("D�ZENLEME KUTUSU 36").Text = "" Or F.EditBoxes("D�ZENLEME
KUTUSU 38").Text = "" Then
MESAJ = "M��TER� GECELEME VE �DENMEZ GECELEME BO� GE��LEMEZ"
�ekil = vbQuestion
Ba�l�k = " AMAN D�KKAT!! "
g�ster = MsgBox(MESAJ, �ekil, Ba�l�k)
Exit Sub
Else
End If
If T.Cells(1, 1).Value = 1000 Then
MESAJ = "TAR�H SE��M�N� YAPINIZ"
�ekil = vbQuestion
Ba�l�k = " L�TFEN D�KKAT!! "
g�ster = MsgBox(MESAJ, �ekil, Ba�l�k)
Exit Sub
Else
End If
N = T.Cells(2, 1).Value
T.Cells(2, 2).Value = T.Cells(1, 2).Text
BB = T.Cells(2, 2).Value + 1
B1 = (B.Cells(6, BB).Value) / (B.Cells(3, BB).Value) 'S�GORTA
B2 = (B.Cells(7, BB).Value) / (B.Cells(3, BB).Value) 'TEKN�K
B3 = (B.Cells(12, BB).Value) / (B.Cells(3, BB).Value) 'MOZOT
B4 = (B.Cells(13, BB).Value) / (B.Cells(3, BB).Value) 'TEL
B5 = (B.Cells(14, BB).Value) / (B.Cells(3, BB).Value) 'PAZ
B6 = (B.Cells(15, BB).Value) / (B.Cells(3, BB).Value) 'KIRT
B7 = (B.Cells(16, BB).Value) / (B.Cells(3, BB).Value) 'S�G
B8 = (B.Cells(17, BB).Value) / (B.Cells(3, BB).Value) 'LOJMAN
B9 = (B.Cells(18, BB).Value) / (B.Cells(3, BB).Value) 'SEY
B10 = (B.Cells(19, BB).Value) / (B.Cells(3, BB).Value) 'KD
B11 = (B.Cells(20, BB).Value) / (B.Cells(3, BB).Value) 'D��
B12 = (B.Cells(10, BB).Value) / (B.Cells(3, BB).Value) 'ELEKTR�K
'TABLOYA YAZ
T.Cells(1, 2).Value = T.Cells(N, 1).Value
T.Cells(N, 2).Value = F.EditBoxes("D�zenleme Kutusu 5").Text
T.Cells(N, 3).Value = F.EditBoxes("D�zenleme Kutusu 7").Text
T.Cells(N, 4).Value = F.EditBoxes("D�zenleme Kutusu 9").Text
T.Cells(N, 5).Value = F.EditBoxes("D�zenleme Kutusu 10").Text
T.Cells(N, 6).Value = F.EditBoxes("D�zenleme Kutusu 11").Text
T.Cells(N, 7).Value = F.EditBoxes("D�zenleme Kutusu 13").Text
T.Cells(N, 8).Value = F.EditBoxes("D�zenleme Kutusu 14").Text
T.Cells(N, 9).Value = F.EditBoxes("D�zenleme Kutusu 15").Text
T.Cells(N, 10).Value = F.EditBoxes("D�zenleme Kutusu 17").Text
T.Cells(N, 11).Value = F.EditBoxes("D�zenleme Kutusu 18").Text
T.Cells(N, 12).Value = F.EditBoxes("D�zenleme Kutusu 19").Text
T.Cells(N, 13).Value = F.EditBoxes("D�zenleme Kutusu 20").Text
T.Cells(N, 14).Value = F.EditBoxes("D�zenleme Kutusu 22").Text
T.Cells(N, 15).Value = F.EditBoxes("D�zenleme Kutusu 23").Text
T.Cells(N, 16).Value = F.EditBoxes("D�zenleme Kutusu 24").Text
'ELEKT�R��� SAYA�LARDAN ALMA
'T.Cells(N, 17).Value = F.EditBoxes("D�zenleme Kutusu 25").Text
'ELEKT�R��� B�T�EDEN ALMA
T.Cells(N, 17).Value = B12
T.Cells(N, 18).Value = F.EditBoxes("D�zenleme Kutusu 26").Text
T.Cells(N, 19).Value = F.EditBoxes("D�zenleme Kutusu 27").Text
T.Cells(N, 20).Value = F.EditBoxes("D�zenleme Kutusu 28").Text
T.Cells(N, 21).Value = F.EditBoxes("D�zenleme Kutusu 29").Text
T.Cells(N, 22).Value = F.EditBoxes("D�zenleme Kutusu 31").Text
T.Cells(N, 23).Value = F.EditBoxes("D�zenleme Kutusu 32").Text
T.Cells(N, 24).Value = F.EditBoxes("D�zenleme Kutusu 33").Text
T.Cells(N, 25).Value = F.EditBoxes("D�zenleme Kutusu 35").Text
T.Cells(N, 26).Value = F.EditBoxes("D�zenleme Kutusu 36").Text
T.Cells(N, 27).Value = F.EditBoxes("D�zenleme Kutusu 37").Text
T.Cells(N, 28).Value = F.EditBoxes("D�zenleme Kutusu 38").Text
T.Cells(N, 29).Value = F.EditBoxes("D�zenleme Kutusu 39").Text
T.Cells(N, 30).Value = F.EditBoxes("D�zenleme Kutusu 40").Text
T.Cells(N, 31).Value = F.EditBoxes("D�zenleme Kutusu 41").Text
T.Cells(N, 32).Value = F.EditBoxes("D�zenleme Kutusu 42").Text
T.Cells(N, 33).Value = B1
T.Cells(N, 34).Value = B2
T.Cells(N, 35).Value = B3
T.Cells(N, 36).Value = B4
T.Cells(N, 37).Value = B5
T.Cells(N, 38).Value = B6
T.Cells(N, 39).Value = B7
T.Cells(N, 40).Value = B8
T.Cells(N, 41).Value = B9
T.Cells(N, 42).Value = B10
T.Cells(N, 43).Value = B11
'TABLOYU S�L
F.EditBoxes("D�zenleme Kutusu 5").Text = ""
F.EditBoxes("D�zenleme Kutusu 7").Text = ""
F.EditBoxes("D�zenleme Kutusu 9").Text = ""
F.EditBoxes("D�zenleme Kutusu 10").Text = ""
F.EditBoxes("D�zenleme Kutusu 11").Text = ""
F.EditBoxes("D�zenleme Kutusu 13").Text = ""
F.EditBoxes("D�zenleme Kutusu 14").Text = ""
F.EditBoxes("D�zenleme Kutusu 15").Text = ""
F.EditBoxes("D�zenleme Kutusu 17").Text = ""
F.EditBoxes("D�zenleme Kutusu 18").Text = ""
F.EditBoxes("D�zenleme Kutusu 19").Text = ""
F.EditBoxes("D�zenleme Kutusu 20").Text = ""
F.EditBoxes("D�zenleme Kutusu 22").Text = ""
F.EditBoxes("D�zenleme Kutusu 23").Text = ""
F.EditBoxes("D�zenleme Kutusu 24").Text = ""
F.EditBoxes("D�zenleme Kutusu 25").Text = ""
F.EditBoxes("D�zenleme Kutusu 26").Text = ""
F.EditBoxes("D�zenleme Kutusu 27").Text = ""
F.EditBoxes("D�zenleme Kutusu 28").Text = ""
F.EditBoxes("D�zenleme Kutusu 29").Text = ""
F.EditBoxes("D�zenleme Kutusu 31").Text = ""
F.EditBoxes("D�zenleme Kutusu 32").Text = ""
F.EditBoxes("D�zenleme Kutusu 33").Text = ""
F.EditBoxes("D�zenleme Kutusu 35").Text = ""
F.EditBoxes("D�zenleme Kutusu 36").Text = ""
F.EditBoxes("D�zenleme Kutusu 37").Text = ""
F.EditBoxes("D�zenleme Kutusu 38").Text = ""
F.EditBoxes("D�zenleme Kutusu 39").Text = ""
F.EditBoxes("D�zenleme Kutusu 40").Text = ""
F.EditBoxes("D�zenleme Kutusu 41").Text = ""
F.EditBoxes("D�zenleme Kutusu 42").Text = ""
'K�M�LE HESABI
If T.Cells(1, 1).Value = 1 Then
T.Cells(N, 48).Value = T.Cells(N, 3).Value
T.Cells(N, 49).Value = T.Cells(N, 33).Value
T.Cells(N, 50).Value = T.Cells(N, 34).Value
T.Cells(N, 51).Value = T.Cells(N, 4).Value
T.Cells(N, 52).Value = T.Cells(N, 5).Value
T.Cells(N, 53).Value = T.Cells(N, 6).Value
T.Cells(N, 54).Value = T.Cells(N, 44).Value
T.Cells(N, 55).Value = T.Cells(N, 45).Value
T.Cells(N, 56).Value = T.Cells(N, 12).Value
T.Cells(N, 57).Value = T.Cells(N, 13).Value
T.Cells(N, 58).Value = T.Cells(N, 46).Value
T.Cells(N, 59).Value = T.Cells(N, 47).Value
T.Cells(N, 60).Value = T.Cells(N, 10).Value
T.Cells(N, 61).Value = T.Cells(N, 11).Value
T.Cells(N, 62).Value = T.Cells(N, 9).Value
T.Cells(N, 63).Value = T.Cells(N, 17).Value
T.Cells(N, 64).Value = T.Cells(N, 21).Value
T.Cells(N, 65).Value = T.Cells(N, 35).Value
T.Cells(N, 66).Value = T.Cells(N, 36).Value
T.Cells(N, 67).Value = T.Cells(N, 37).Value
T.Cells(N, 68).Value = T.Cells(N, 38).Value
T.Cells(N, 69).Value = T.Cells(N, 39).Value
T.Cells(N, 70).Value = T.Cells(N, 40).Value
T.Cells(N, 71).Value = T.Cells(N, 41).Value
T.Cells(N, 72).Value = T.Cells(N, 42).Value
T.Cells(N, 73).Value = T.Cells(N, 43).Value
T.Cells(N, 74).Value = T.Cells(N, 22).Value
T.Cells(N, 75).Value = T.Cells(N, 23).Value
T.Cells(N, 76).Value = T.Cells(N, 24).Value
T.Cells(N, 77).Value = T.Cells(N, 28).Value
Else
T.Cells(N, 48).Value = T.Cells(N, 3).Value + T.Cells(N - 1, 48).Value
T.Cells(N, 49).Value = T.Cells(N, 33).Value + T.Cells(N - 1, 49).Value
T.Cells(N, 50).Value = T.Cells(N, 34).Value + T.Cells(N - 1, 50).Value
T.Cells(N, 51).Value = T.Cells(N, 4).Value + T.Cells(N - 1, 51).Value
T.Cells(N, 52).Value = T.Cells(N, 5).Value + T.Cells(N - 1, 52).Value
T.Cells(N, 53).Value = T.Cells(N, 6).Value + T.Cells(N - 1, 53).Value
T.Cells(N, 54).Value = T.Cells(N, 44).Value + T.Cells(N - 1, 54).Value
T.Cells(N, 55).Value = T.Cells(N, 45).Value + T.Cells(N - 1, 55).Value
T.Cells(N, 56).Value = T.Cells(N, 12).Value + T.Cells(N - 1, 56).Value
T.Cells(N, 57).Value = T.Cells(N, 13).Value + T.Cells(N - 1, 57).Value
T.Cells(N, 58).Value = T.Cells(N, 46).Value + T.Cells(N - 1, 58).Value
T.Cells(N, 59).Value = T.Cells(N, 47).Value + T.Cells(N - 1, 59).Value
T.Cells(N, 60).Value = T.Cells(N, 10).Value + T.Cells(N - 1, 60).Value
T.Cells(N, 61).Value = T.Cells(N, 11).Value + T.Cells(N - 1, 61).Value
T.Cells(N, 62).Value = T.Cells(N, 9).Value + T.Cells(N - 1, 62).Value
T.Cells(N, 63).Value = T.Cells(N, 17).Value + T.Cells(N - 1, 63).Value
T.Cells(N, 64).Value = T.Cells(N, 21).Value + T.Cells(N - 1, 64).Value
T.Cells(N, 65).Value = T.Cells(N, 35).Value + T.Cells(N - 1, 65).Value
T.Cells(N, 66).Value = T.Cells(N, 36).Value + T.Cells(N - 1, 66).Value
T.Cells(N, 67).Value = T.Cells(N, 37).Value + T.Cells(N - 1, 67).Value
T.Cells(N, 68).Value = T.Cells(N, 38).Value + T.Cells(N - 1, 68).Value
T.Cells(N, 69).Value = T.Cells(N, 39).Value + T.Cells(N - 1, 69).Value
T.Cells(N, 70).Value = T.Cells(N, 40).Value + T.Cells(N - 1, 70).Value
T.Cells(N, 71).Value = T.Cells(N, 41).Value + T.Cells(N - 1, 71).Value
T.Cells(N, 72).Value = T.Cells(N, 42).Value + T.Cells(N - 1, 72).Value
T.Cells(N, 73).Value = T.Cells(N, 43).Value + T.Cells(N - 1, 73).Value
T.Cells(N, 74).Value = T.Cells(N, 22).Value + T.Cells(N - 1, 74).Value
T.Cells(N, 75).Value = T.Cells(N, 23).Value + T.Cells(N - 1, 75).Value
T.Cells(N, 76).Value = T.Cells(N, 24).Value + T.Cells(N - 1, 76).Value
T.Cells(N, 77).Value = T.Cells(N, 28).Value + T.Cells(N - 1, 77).Value
End If
Sub CAGIR()
Set T = Worksheets("DATA")
Set F = DialogSheets("FORM")
N = T.Cells(2, 1).Value
Sub RAPOR()
Set T = Worksheets("DATA")
Set S = Worksheets("SONUC")
N = T.Cells(2, 1).Value
S.Cells(2, 1).Value = T.Cells(1, 3).Text
'G�N
S.Cells(5, 2).Value = T.Cells(N, 25).Value
S.Cells(6, 2).Value = T.Cells(N, 26).Value
S.Cells(7, 2).Value = T.Cells(N, 28).Value
S.Cells(8, 2).Value = T.Cells(N, 29).Value
S.Cells(9, 2).Value = T.Cells(N, 31).Value
S.Cells(15, 2).Value = T.Cells(N, 3).Value / 1000
S.Cells(16, 2).Value = T.Cells(N, 33).Value / 1000
S.Cells(17, 2).Value = T.Cells(N, 34).Value / 1000
S.Cells(19, 2).Value = T.Cells(N, 4).Value / 1000
S.Cells(20, 2).Value = T.Cells(N, 5).Value / 1000
S.Cells(21, 2).Value = T.Cells(N, 6).Value / 1000
S.Cells(25, 2).Value = T.Cells(N, 44).Value / 1000
S.Cells(26, 2).Value = T.Cells(N, 45).Value / 1000
S.Cells(28, 2).Value = T.Cells(N, 12).Value / 1000
S.Cells(29, 2).Value = T.Cells(N, 13).Value / 1000
S.Cells(32, 2).Value = T.Cells(N, 46).Value / 1000
S.Cells(33, 2).Value = T.Cells(N, 47).Value / 1000
S.Cells(35, 2).Value = T.Cells(N, 10).Value / 1000
S.Cells(36, 2).Value = T.Cells(N, 11).Value / 1000
S.Cells(37, 2).Value = T.Cells(N, 9).Value / 1000
S.Cells(38, 2).Value = T.Cells(N, 17).Value / 1000
S.Cells(39, 2).Value = T.Cells(N, 21).Value / 1000
S.Cells(40, 2).Value = T.Cells(N, 35).Value / 1000
S.Cells(41, 2).Value = T.Cells(N, 36).Value / 1000
S.Cells(42, 2).Value = T.Cells(N, 37).Value / 1000
S.Cells(43, 2).Value = T.Cells(N, 38).Value / 1000
S.Cells(44, 2).Value = T.Cells(N, 39).Value / 1000
S.Cells(45, 2).Value = T.Cells(N, 40).Value / 1000
S.Cells(46, 2).Value = T.Cells(N, 41).Value / 1000
S.Cells(47, 2).Value = T.Cells(N, 42).Value / 1000
S.Cells(48, 2).Value = T.Cells(N, 43).Value / 1000
S.Cells(51, 2).Value = T.Cells(N, 22).Value / 1000
S.Cells(52, 2).Value = T.Cells(N, 23).Value / 1000
S.Cells(53, 2).Value = T.Cells(N, 24).Value / 1000
'K�M�LE
S.Cells(5, 5).Value = T.Cells(N, 25).Value
S.Cells(6, 5).Value = T.Cells(N, 27).Value
S.Cells(7, 5).Value = T.Cells(N, 77).Value
S.Cells(8, 5).Value = T.Cells(N, 30).Value
S.Cells(9, 5).Value = T.Cells(N, 32).Value
S.Cells(15, 5).Value = T.Cells(N, 48).Value / 1000
S.Cells(16, 5).Value = T.Cells(N, 49).Value / 1000
S.Cells(17, 5).Value = T.Cells(N, 50).Value / 1000
S.Cells(19, 5).Value = T.Cells(N, 51).Value / 1000
S.Cells(20, 5).Value = T.Cells(N, 52).Value / 1000
S.Cells(21, 5).Value = T.Cells(N, 53).Value / 1000
S.Cells(25, 5).Value = T.Cells(N, 54).Value / 1000
S.Cells(26, 5).Value = T.Cells(N, 55).Value / 1000
S.Cells(28, 5).Value = T.Cells(N, 56).Value / 1000
S.Cells(29, 5).Value = T.Cells(N, 57).Value / 1000
S.Cells(32, 5).Value = T.Cells(N, 58).Value / 1000
S.Cells(33, 5).Value = T.Cells(N, 59).Value / 1000
S.Cells(35, 5).Value = T.Cells(N, 60).Value / 1000
S.Cells(36, 5).Value = T.Cells(N, 61).Value / 1000
S.Cells(37, 5).Value = T.Cells(N, 62).Value / 1000
S.Cells(38, 5).Value = T.Cells(N, 63).Value / 1000
S.Cells(39, 5).Value = T.Cells(N, 64).Value / 1000
S.Cells(40, 5).Value = T.Cells(N, 65).Value / 1000
S.Cells(41, 5).Value = T.Cells(N, 66).Value / 1000
S.Cells(42, 5).Value = T.Cells(N, 67).Value / 1000
S.Cells(43, 5).Value = T.Cells(N, 68).Value / 1000
S.Cells(44, 5).Value = T.Cells(N, 69).Value / 1000
S.Cells(45, 5).Value = T.Cells(N, 70).Value / 1000
S.Cells(46, 5).Value = T.Cells(N, 71).Value / 1000
S.Cells(47, 5).Value = T.Cells(N, 72).Value / 1000
S.Cells(48, 5).Value = T.Cells(N, 73).Value / 1000
S.Cells(51, 5).Value = T.Cells(N, 74).Value / 1000
S.Cells(52, 5).Value = T.Cells(N, 75).Value / 1000
S.Cells(53, 5).Value = T.Cells(N, 76).Value / 1000
Sheets("SONUC").Select
End Sub
Sub E_KULLANIM_HESAP()
Set T = Worksheets("DATA")
Set F = DialogSheets("FORM")
Sub LPG_KULLANIM_HESAP()
Set T = Worksheets("DATA")
Set F = DialogSheets("FORM")
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
End Sub
End Sub
----------kod bitir------
----------kod basla------
Function Gelir_Vergisi(Matrah)
a = Range("gvlim_3").Value
b = Range("gvlim_2").Value
c = Range("gvlim_1").Value
d = c * 0.15
e = (b - c) * 0.2 + d
f = (a - b) * 0.25 + e
TextBox1.Value = ""
TextBox2.Value = "0"
TextBox3.Value = "0"
TextBox4.Value = "0"
TextBox5.Value = "0"
TextBox1.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Sub fiyat()
'mevcut se�ili �r�n�n ad�n�n al�nmas�
urun = ActiveCell.Value
mevcutsatir = ActiveCell.Row
'maliyet fiyat�n�n bulunmas�
satir = Sheets("maliyet").Range("A:A").Find(urun).Row
maliyetfiyat = Sheets("maliyet").Cells(satir, 2).Value
'maliyet fiyat�n�n bulunmas�
satir = Sheets("satis").Range("A:A").Find(urun).Row
satisfiyat = Sheets("satis").Cells(satir, 2).Value
'al�nan bilgilerin sayfaya yazd�r�lmas�
Cells(mevcutsatir, 2).Value = maliyetfiyat
Cells(mevcutsatir, 3).Value = satisfiyat
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
If Not TextBox1 = Empty Then
Say = WorksheetFunction.CountA(Sheets("sayfa1").Range("l2:aj15000"))
Set bulHucre = Sheets("sayfa1").Range("l2:aj" & Say).Find(TextBox1.Text,
lookat:=xlPart)
If bulHucre Is Nothing Then Exit Sub
ilkAdres = bulHucre.Address
i = 0
Sub register()
Dim InputData As Variant
Dim FileNum As Long
Dim x As Integer
FileNum = FreeFile
If Dir(strTxtFile) <> Empty Then
Open strTxtFile For Input As FileNum
x = x + 1
Do While Not EOF(FileNum)
Line Input #FileNum, InputData
If Left(InputData, 6) <> MyCheckVal Then GoTo NoGo:
If x = 1 Then Exit Sub
Loop
Close FileNum
ThisWorkbook.IsAddin = False
Else
NoGo:
ThisWorkbook.IsAddin = True
MsgBox "Kayitli kullanici degilsiniz.... L�tfen Program �reticisi �le
G�r��n.", vbCritical, "Kullanicinin dikkatine !"
ThisWorkbook.Close SaveChanges:=False
End If
End Sub
Sub auto_open()
register
Application.DisplayFullScreen = True
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
PopupYap
UserForm6.Show
End Sub
Sub PopupSil()
On Error Resume Next
CommandBars(MenuAdi).Delete
On Error GoTo 0
End Sub
Sub PopupYap()
Dim cb As CommandBar
PopupSil
Set cb = CommandBars.Add(MenuAdi, msoBarPopup, False, True)
With cb
With .Controls.Add(Type:=msoControlButton)
.OLEUsage = msoControlOLEUsageBoth
.Caption = "Kaydet"
.FaceId = 3
.OnAction = "kay�t"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "�hale Sil"
.FaceId = 478
.OnAction = "isil"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "�hale Bilgileri"
.FaceId = 1058
.OnAction = "ibde�i�tir"
.BeginGroup = True
End With
With .Controls.Add(Type:=msoControlPopup)
.Caption = "G�r�n�mler"
With .Controls.Add(Type:=msoControlButton)
.Caption = "Ayr�nt�"
.FaceId = 634
.OnAction = "ayr�nt�"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "B�y�k Simge"
.FaceId = 631
.OnAction = "BS"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Liste"
.FaceId = 633
.OnAction = "liste"
End With
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "T�m �haleleri Sil"
.FaceId = 1019
.OnAction = "tsil"
.BeginGroup = True
End With
Set cb = Nothing
End With
End Sub
Sub tsil()
UserForm1.ListView1.ListItems.Clear
Sheets("sayfa1").Range("a1:z10000").Clear
UserForm1.StatusBar1.Panels(1).Text = "Aktif Masa Say�s�:" &
UserForm1.ListView1.ListItems.Count
End Sub
Sub ayr�nt�()
UserForm1.ListView1.View = lvwReport
End Sub
Sub BS()
UserForm1.ListView1.View = lvwIcon
End Sub
Sub liste()
UserForm1.ListView1.View = lvwList
End Sub
Sub kay�t()
ActiveWorkbook.Save
End Sub
Sub isil()
If UserForm1.ListView1.ListItems.Count = 0 Then Exit Sub
For e = 1 To WorksheetFunction.CountA(Sheets("sayfa1").Range("A1:A1000"))
UserForm1.ListView1.ListItems(e).ListSubItems(3).Text = ""
Sheets("sayfa1").Cells(e, 5).Value = Time
Call UserForm1.ListView1.ListItems(Sheets("sayfa1").Cells(e, 1).Value) _
.ListSubItems.Add(3, , Sheets("sayfa1").Cells(e, 6).Text)
Call UserForm1.ListView1.ListItems(Sheets("sayfa1").Cells(e, 1).Value) _
.ListSubItems.Add(4, , Sheets("sayfa1").Cells(e, 7).Text)
Call UserForm1.ListView1.ListItems(Sheets("sayfa1").Cells(e, 1).Value) _
.ListSubItems.Add(5, , Sheets("sayfa1").Cells(e, 8).Text)
Next
soru = MsgBox("Se�iminiz Kal�c� Olarak Silinecektir, �leme Devam Edilsin mi?",
vbYesNo, "ihale'05")
If soru = 6 Then
k = UserForm1.ListView1.SelectedItem.Index
'MsgBox k
UserForm1.ListView1.ListItems.Remove (k)
Sheets("Sayfa1").Rows(k).Delete
For e = 1 To WorksheetFunction.CountA(Sheets("sayfa1").Range("A1:A1000"))
Sheets("sayfa1").Cells(e, 1).Value = e
Next
UserForm1.StatusBar1.Panels(1).Text = "Kay�tl� �hale Say�s�:" &
UserForm1.ListView1.ListItems.Count
Else
MsgBox "Silme �lemi �ptal Edildi", vbInformation, "ihale'05"
End If
ActiveWorkbook.Save
End Sub
Sub ibde�i�tir()
UserForm4.Show
End Sub
Sub BORA()
UserForm3.Show
End Sub
Sub Makro2()
On Error Resume Next
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Sub Makro3()
On Error Resume Next
ActiveWindow.SelectedSheets.PrintOut
End Sub
----------kod bitir------
----------kod basla------
Const MenuAdi As String = "TemporaryPopupMenu"
Dim t, soru, e, k, p, R As Integer
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
ComboBox3.List = Sheets("3").Range("b1:b100").Value
ComboBox6.List = Sheets("1").Range("r1:r2").Value
ComboBox5.List = Sheets("1").Range("s1:s2").Value
ComboBox1.List = Sheets("sayfa1").Range("c1:c100").Value
ComboBox2.List = Sheets("1").Range("n1:n2:n3").Value
ComboBox4.List = Sheets("2").Range("B1:B1000").Value
Worksheets("yapi ara� taah.").Cells(17, 3).Value = Cells(19, 6).Value & " " &
Cells(20, 6).Value
Worksheets("yapi ara� taah.").Cells(19, 8).Value = Cells(22, 6).Value
Worksheets("yapi ara� taah.").Cells(23, 3).Value = "[ " & Cells(25, 6).Value &
" ] tarihinde ihalesi yap�lacak olan [" & Cells(23, 6).Value & "] i�i i�in �dari
�artnamenin [" & Cells(40, 6).Value & " F�kras�nda] yer alan listede belirtilen
yap� ara�lar�n�;yeterli miktarda ara�, makine ve te�hizat� bulundurmay� kabul ve
taahh�t ediyoruz."
Worksheets("yapi ara� taah.").Cells(32, 10).Value = Cells(24, 6).Value
Worksheets("yapi ara� taah.").Cells(33, 10).Value = Cells(14, 8).Value
Worksheets("dis zarf").Cells(9, 3).Value = "[" & Cells(23, 6).Value & "] 'N�N
�HALES�NE A�T TEKL�F ZARFIDIR."
Worksheets("dis zarf").Cells(17, 6).Value = Cells(6, 6).Value
Worksheets("dis zarf").Cells(18, 6).Value = Cells(7, 6).Value
Worksheets("dis zarf").Cells(19, 6).Value = Cells(8, 6).Value
Worksheets("dis zarf").Cells(20, 6).Value = Cells(9, 6).Value
Worksheets("dis zarf").Cells(21, 6).Value = Cells(11, 6).Value
Worksheets("dis zarf").Cells(30, 6).Value = Cells(27, 6).Value
Worksheets("dis zarf").Cells(31, 6).Value = Cells(19, 6).Value & " " &
Cells(20, 6).Value
Worksheets("dis zarf").Cells(32, 6).Value = Cells(21, 6).Value
Worksheets("dis zarf").Cells(33, 6).Value = Cells(23, 6).Value
Worksheets("dis zarf").Cells(34, 6).Value = Cells(25, 6).Value
Worksheets("dis zarf").Cells(35, 6).Value = Cells(29, 6).Value
Worksheets("is bey").Cells(17, 3).Value = Cells(19, 6).Value & " " & Cells(20,
6).Value
Worksheets("is bey").Cells(19, 8).Value = Cells(22, 6).Value
Worksheets("is bey").Cells(23, 3).Value = "[ " & Cells(25, 6).Value & " ]
tarihinde ihalesi yap�lacak olan [" & Cells(23, 6).Value & "] i�ine ili�kin olarak
isteklilerden [" & Cells(6, 6).Value & "]'nin sundu�u i� bitirme belgesinin t�zel
ki�i [" & Cells(6, 6).Value & "] ad�na d�zenlendi�ini, bu sebeble � bitirme
belgesinin ba�kalar�na kulland�r�lam�yaca��n� beyan ederiz."
Worksheets("is bey").Cells(32, 10).Value = Cells(24, 6).Value
Worksheets("is bey").Cells(33, 10).Value = Cells(14, 8).Value
----------kod bitir------
----------kod basla------
Option Explicit
Const MenuAdi As String = "TemporaryPopupMenu"
Dim e, soru, k As Integer
Const strTxtFile As String = "C:\Sirket.txt"
Const MyCheckVal As Long = 43045
Sub auto_close()
Application.DisplayFullScreen = False
With ActiveWindow
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
PopupSil
End Sub
Sub register()
Dim InputData As Variant
Dim FileNum As Long
Dim x As Integer
FileNum = FreeFile
If Dir(strTxtFile) <> Empty Then
Open strTxtFile For Input As FileNum
x = x + 1
Do While Not EOF(FileNum)
Line Input #FileNum, InputData
If Left(InputData, 6) <> MyCheckVal Then GoTo NoGo:
If x = 1 Then Exit Sub
Loop
Close FileNum
ThisWorkbook.IsAddin = False
Else
NoGo:
ThisWorkbook.IsAddin = True
MsgBox "Kayitli kullanici degilsiniz.... L�tfen Program �reticisi �le
G�r��n.", vbCritical, "Kullanicinin dikkatine !"
ThisWorkbook.Close SaveChanges:=False
End If
End Sub
Sub auto_open()
register
Application.DisplayFullScreen = True
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
PopupYap
UserForm6.Show
End Sub
Sub PopupSil()
On Error Resume Next
CommandBars(MenuAdi).Delete
On Error GoTo 0
End Sub
Sub PopupYap()
Dim cb As CommandBar
PopupSil
Set cb = CommandBars.Add(MenuAdi, msoBarPopup, False, True)
With cb
With .Controls.Add(Type:=msoControlButton)
.OLEUsage = msoControlOLEUsageBoth
.Caption = "Kaydet"
.FaceId = 3
.OnAction = "kay�t"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "�hale Sil"
.FaceId = 478
.OnAction = "isil"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "�hale Bilgileri"
.FaceId = 1058
.OnAction = "ibde�i�tir"
.BeginGroup = True
End With
With .Controls.Add(Type:=msoControlPopup)
.Caption = "G�r�n�mler"
With .Controls.Add(Type:=msoControlButton)
.Caption = "Ayr�nt�"
.FaceId = 634
.OnAction = "ayr�nt�"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "B�y�k Simge"
.FaceId = 631
.OnAction = "BS"
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "Liste"
.FaceId = 633
.OnAction = "liste"
End With
End With
With .Controls.Add(Type:=msoControlButton)
.Caption = "T�m �haleleri Sil"
.FaceId = 1019
.OnAction = "tsil"
.BeginGroup = True
End With
Set cb = Nothing
End With
End Sub
Sub tsil()
UserForm1.ListView1.ListItems.Clear
Sheets("sayfa1").Range("a1:z10000").Clear
UserForm1.StatusBar1.Panels(1).Text = "Aktif Masa Say�s�:" &
UserForm1.ListView1.ListItems.Count
End Sub
Sub ayr�nt�()
UserForm1.ListView1.View = lvwReport
End Sub
Sub BS()
UserForm1.ListView1.View = lvwIcon
End Sub
Sub liste()
UserForm1.ListView1.View = lvwList
End Sub
Sub kay�t()
ActiveWorkbook.Save
End Sub
Sub isil()
If UserForm1.ListView1.ListItems.Count = 0 Then Exit Sub
For e = 1 To WorksheetFunction.CountA(Sheets("sayfa1").Range("A1:A1000"))
UserForm1.ListView1.ListItems(e).ListSubItems(3).Text = ""
Sheets("sayfa1").Cells(e, 5).Value = Time
Call UserForm1.ListView1.ListItems(Sheets("sayfa1").Cells(e, 1).Value) _
.ListSubItems.Add(3, , Sheets("sayfa1").Cells(e, 6).Text)
Call UserForm1.ListView1.ListItems(Sheets("sayfa1").Cells(e, 1).Value) _
.ListSubItems.Add(4, , Sheets("sayfa1").Cells(e, 7).Text)
Call UserForm1.ListView1.ListItems(Sheets("sayfa1").Cells(e, 1).Value) _
.ListSubItems.Add(5, , Sheets("sayfa1").Cells(e, 8).Text)
Next
soru = MsgBox("Se�iminiz Kal�c� Olarak Silinecektir, �leme Devam Edilsin mi?",
vbYesNo, "ihale'05")
If soru = 6 Then
k = UserForm1.ListView1.SelectedItem.Index
'MsgBox k
UserForm1.ListView1.ListItems.Remove (k)
Sheets("Sayfa1").Rows(k).Delete
For e = 1 To WorksheetFunction.CountA(Sheets("sayfa1").Range("A1:A1000"))
Sheets("sayfa1").Cells(e, 1).Value = e
Next
UserForm1.StatusBar1.Panels(1).Text = "Kay�tl� �hale Say�s�:" &
UserForm1.ListView1.ListItems.Count
Else
MsgBox "Silme �lemi �ptal Edildi", vbInformation, "ihale'05"
End If
ActiveWorkbook.Save
End Sub
Sub ibde�i�tir()
UserForm4.Show
End Sub
Sub BORA()
UserForm3.Show
End Sub
Sub Makro2()
On Error Resume Next
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Sub Makro3()
On Error Resume Next
ActiveWindow.SelectedSheets.PrintOut
End Sub
----------kod bitir------
----------kod basla------
Const MenuAdi As String = "TemporaryPopupMenu"
Dim t, soru, e, k, p, R As Integer
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
ComboBox3.List = Sheets("3").Range("b1:b100").Value
ComboBox6.List = Sheets("1").Range("r1:r2").Value
ComboBox5.List = Sheets("1").Range("s1:s2").Value
ComboBox1.List = Sheets("sayfa1").Range("c1:c100").Value
ComboBox2.List = Sheets("1").Range("n1:n2:n3").Value
ComboBox4.List = Sheets("2").Range("B1:B1000").Value
Worksheets("yapi ara� taah.").Cells(17, 3).Value = Cells(19, 6).Value & " " &
Cells(20, 6).Value
Worksheets("yapi ara� taah.").Cells(19, 8).Value = Cells(22, 6).Value
Worksheets("yapi ara� taah.").Cells(23, 3).Value = "[ " & Cells(25, 6).Value &
" ] tarihinde ihalesi yap�lacak olan [" & Cells(23, 6).Value & "] i�i i�in �dari
�artnamenin [" & Cells(40, 6).Value & " F�kras�nda] yer alan listede belirtilen
yap� ara�lar�n�;yeterli miktarda ara�, makine ve te�hizat� bulundurmay� kabul ve
taahh�t ediyoruz."
Worksheets("yapi ara� taah.").Cells(32, 10).Value = Cells(24, 6).Value
Worksheets("yapi ara� taah.").Cells(33, 10).Value = Cells(14, 8).Value
Worksheets("dis zarf").Cells(9, 3).Value = "[" & Cells(23, 6).Value & "] 'N�N
�HALES�NE A�T TEKL�F ZARFIDIR."
Worksheets("dis zarf").Cells(17, 6).Value = Cells(6, 6).Value
Worksheets("dis zarf").Cells(18, 6).Value = Cells(7, 6).Value
Worksheets("dis zarf").Cells(19, 6).Value = Cells(8, 6).Value
Worksheets("dis zarf").Cells(20, 6).Value = Cells(9, 6).Value
Worksheets("dis zarf").Cells(21, 6).Value = Cells(11, 6).Value
Worksheets("dis zarf").Cells(30, 6).Value = Cells(27, 6).Value
Worksheets("dis zarf").Cells(31, 6).Value = Cells(19, 6).Value & " " &
Cells(20, 6).Value
Worksheets("dis zarf").Cells(32, 6).Value = Cells(21, 6).Value
Worksheets("dis zarf").Cells(33, 6).Value = Cells(23, 6).Value
Worksheets("dis zarf").Cells(34, 6).Value = Cells(25, 6).Value
Worksheets("dis zarf").Cells(35, 6).Value = Cells(29, 6).Value
Worksheets("is bey").Cells(17, 3).Value = Cells(19, 6).Value & " " & Cells(20,
6).Value
Worksheets("is bey").Cells(19, 8).Value = Cells(22, 6).Value
Worksheets("is bey").Cells(23, 3).Value = "[ " & Cells(25, 6).Value & " ]
tarihinde ihalesi yap�lacak olan [" & Cells(23, 6).Value & "] i�ine ili�kin olarak
isteklilerden [" & Cells(6, 6).Value & "]'nin sundu�u i� bitirme belgesinin t�zel
ki�i [" & Cells(6, 6).Value & "] ad�na d�zenlendi�ini, bu sebeble � bitirme
belgesinin ba�kalar�na kulland�r�lam�yaca��n� beyan ederiz."
Worksheets("is bey").Cells(32, 10).Value = Cells(24, 6).Value
Worksheets("is bey").Cells(33, 10).Value = Cells(14, 8).Value
----------kod bitir------
----------kod basla------
Sub Makro1()
Range("A3:AN59050").Select
Selection.Clear
Range("A1").Select
a = InputBox("tak�m say�s�")
If a > 10 Then
MsgBox "HATA"
GoTo 10
End If
c = 3 ^ a 'ihtimal say�s�
Cells(1, 6) = c
For tak�m = a - 1 To 0 Step -1
h = 3 ^ tak�m 'tekrar say�s�
For t1 = 1 To h
Cells(t1 + 2, tak�m + 1) = "0"
s1 = Cells(t1 + 2, tak�m + 1).Row
Next t1
For t2 = 1 To h
Cells(s1 + t2, tak�m + 1) = "1"
s2 = Cells(s1 + t2, tak�m + 1).Row
Next t2
For t3 = 1 To h
Cells(s2 + t3, tak�m + 1) = "2"
s3 = Cells(s2 + t3, tak�m + 1).Row
Next t3
If a = 1 Then
GoTo 10
End If
Next tak�m
k = o
For sut = a - 1 To 1 Step -1
k = k + 1
For sat = 1 To c - 3 ^ (a - k)
Cells(sat + 2 + c - (c - 3 ^ (a - k)), sut) = Cells(sat + 2, sut)
Next sat
Next sut
10 End Sub
----------kod bitir------
----------kod basla------
Dim Alignments(5) As String
SpinButton1.Min = 0
SpinButton1.Max = 4
SpinButton1.Value = 0
TextBox1.Text = Alignments(0)
Frame1.PictureAlignment = SpinButton1.Value
OptionButton1.Caption = "Kesilmi�"
OptionButton1.Value = True
OptionButton2.Caption = "Uzat�lm�"
OptionButton3.Caption = "Yak�nla�m�"
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
If TextBox1.Value = "" Then
MsgBox "Gelir Bo� Olamaz"
End If
If TextBox1.Value <> "" Then
Sheets("N�SAN").Activate
Cells(2, 3).Select
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
ActiveCell.Offset(0, 4).Value = TextBox3.Value
ActiveCell.Offset(0, 6).Value = TextBox4.Value
End If
End Sub
Start = Timer
CommandButton2.Enabled = False
MyProgBar.ScrType = TypeLed
MyProgBar.Width = 240
MyProgBar.Height = 15
MyProgBar.X = 32
MyProgBar.Y = 75
For i = 2 To NoA
DoEvents
MyData = "Data-" & i - 1
TempTime = Timer
Label1.Caption = "Yaziliyor .... " & MyData
Label2.Caption = "Sure : " & Format(TempTime - Start, "00") & " san."
MySh = DataWB1.Sheets(1).Range("A" & i).Text
For j = 1 To DBWB1.Sheets.Count
If DBWB1.Worksheets(j).Name = MySh Then
GoTo ResumeSub:
Else
If j = DBWB1.Sheets.Count Then
Set NewSh = DBWB1.Sheets.Add
NewSh.Name = MySh
End If
End If
Next
ResumeSub:
Set Sh = DBWB1.Sheets(MySh)
DoEvents
ProgBarVal = (i / NoA) * 100
SendMessage ProgBarHwnd, psh3, ProgBarVal, 0&
Set Sh = Nothing
Next
Label1.Caption = "Tamamlandi..."
Finish = Timer
Label2.Caption = "Sure : " & Format(Finish - Start, "00") & " san."
DestroyWindow ProgBarHwnd
NewXL.Workbooks(Dir(DBWB)).Close SaveChanges:=True
NewXL.Workbooks(Dir(DataWB)).Close SaveChanges:=False
NewXL.Quit
CommandButton2.Enabled = True
CommandButton1.Enabled = False
ErrHandler:
MsgBox "Hata olustu..."
Label1.Caption = "Hata..."
DestroyWindow ProgBarHwnd
NewXL.Workbooks(Dir(DBWB)).Close SaveChanges:=False
NewXL.Workbooks(Dir(DataWB)).Close SaveChanges:=False
NewXL.Quit
CommandButton1.Enabled = False
CommandButton2.Enabled = True
Set Sh = Nothing
Set DBWB1 = Nothing
Set DataWB1 = Nothing
Set NewXL = Nothing
End Sub
'
Private Sub CommandButton2_Click()
Unload Me
End Sub
'
Private Sub UserForm_Initialize()
FrmHwnd = FindWindow(vbNullString, Me.Caption)
MyHandle = GetSystemMenu(FrmHwnd, 0)
Call RemoveMenu(MyHandle, 6, MyVal)
Label1.Caption = "Hazir..."
End Sub
'
----------kod bitir------
----------kod basla------
Sub Otomatik�ekil14_T�klat()
'
' Otomatik�ekil14_T�klat Makro
' Makro metin taraf�ndan 24.03.2005 tarihinde kaydedildi.
'
ActiveWorkbook.Sheets.Copy
ActiveWorkbook.Application.Quit
'
End Sub
----------kod bitir------
----------kod basla------
Sub Otomatik�ekil17_T�klat()
'
' Otomatik�ekil17_T�klat Makro
' Makro metin taraf�ndan 24.03.2005 tarihinde kaydedildi.
'
' Klavye K�sayolu: Ctrl+�stKrkt+Z
End Sub
----------kod bitir------
----------kod basla------
Sub Otomatik�ekil16_T�klat()
'
' Otomatik�ekil16_T�klat Makro
' Makro metin taraf�ndan 24.03.2005 tarihinde kaydedildi.
'
'
Sheets("Veri").Select
End Sub
Sub OnayKutusu3_T�klat()
'
' OnayKutusu3_T�klat Makro
' Makro metin taraf�ndan 24.03.2005 tarihinde kaydedildi.
'
'
Sheets("�rsaliye").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Macro9()
'
' Macro9 Macro
' Macro recorded 4/22/2005 by Sinan ISIM
'
'
Rows("22:26").Select
Selection.EntireRow.Hidden = True
Range("A27").Select
Rows("28:33").Select
Selection.EntireRow.Hidden = False
Range("A27").Select
End Sub
Sub Rusca()
Range("B20").Select
Sheets("GrafikR").Select
Range("A20").Select
End Sub
Sub Turkce()
Range("B20").Select
Sheets("Grafik").Select
Range("A20").Select
End Sub
Sub Ingilizce()
Range("B20").Select
Sheets("GrafikE").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
'
' Makro13 Makro
' Makro KSS taraf�ndan 06.05.2003 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("r7").Select
End Sub
'
Sheets("2003-F�r").Select
Range("BC1").Select
End Sub
'
Application.Goto Reference:="TipTesti"
ActiveWindow.SmallScroll Down:=-1
Range("CL20").Select
End Sub
End Sub
'
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
'
Application.Goto Reference:="Pid"
ActiveWindow.SmallScroll Down:=22
End Sub
'
Sheets("�sEmri").Select
Range("O2").Select
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro KSS taraf�ndan 05.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("A1").Select
End Sub
Sub ac()
UserForm1.Show
End Sub
Sub Makro2()
'
' Makro2 Makro
' Makro KSS taraf�ndan 05.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
ActiveWindow.LargeScroll ToRight:=2
Range("db4").Select
End Sub
Sub Makro3()
'
' Makro3 Makro
' Makro KSS taraf�ndan 05.02.2003 tarihinde kaydedildi.
'
'
Sheets("Ba�lang��").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro17()
'
' Makro17 Makro
' Makro KSS taraf�ndan 28.07.2003 tarihinde kaydedildi.
'
'
Sheets("2003-Ser").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro16()
'
' Makro16 Makro
' Makro KSS taraf�ndan 29.08.2003 tarihinde kaydedildi.
'
'
Range("A1:P61").Select
Selection.PrintOut Copies:=1, Collate:=True
ActiveWindow.LargeScroll Down:=-1
End Sub
----------kod bitir------
----------kod basla------
Sub Makro18()
'
' Makro18 Makro
' Makro KSS taraf�ndan 01.06.2004 tarihinde kaydedildi.
'
'
Application.Goto Reference:="TipTesti"
ActiveWindow.SmallScroll Down:=-1
Range("CH2:CR2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro19()
'
' Makro19 Makro
' Makro KSS taraf�ndan 14.06.2004 tarihinde kaydedildi.
'
'
Application.Goto Reference:="Pid"
ActiveWindow.SmallScroll Down:=22
End Sub
----------kod bitir------
----------kod basla------
Sub Makro20()
'
' Makro20 Makro
' Makro KSS taraf�ndan 23.06.2004 tarihinde kaydedildi.
'
'
Range("A282").Select
End Sub
----------kod bitir------
----------kod basla------
Sub formac()
frmbulsil.Show
End Sub
----------kod bitir------
----------kod basla------
Sub isemriyazdir()
'
' isemriyazdir Makro
' Makro alser taraf�ndan 24.02.2005 tarihinde kaydedildi.
'
'
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
----------kod bitir------
----------kod basla------
Sub isemrinegit()
'
' isemrinegit Makro
' Makro alser taraf�ndan 24.02.2005 tarihinde kaydedildi.
'
'
Sheets("�sEmri").Select
Range("O2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro4()
'
' Makro4 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("BC1").Select
End Sub
Sub Makro5()
'
' Makro5 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("BA1").Select
End Sub
Sub Makro6()
'
' Makro6 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("AY1").Select
End Sub
Sub Makro7()
'
' Makro7 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("Sorgulama").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro8()
'
' Makro8 Makro
' Makro KSS taraf�ndan 20.02.2003 tarihinde kaydedildi.
'
'
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
Sub Makro9()
'
' Makro9 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Range("A5:H34").Select
Selection.PrintOut Copies:=1, Collate:=True
End Sub
----------kod bitir------
----------kod basla------
Sub Makro10()
'
' Makro10 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Range("D40").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro11()
'
' Makro11 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Range("X4:AE32").Select
Selection.PrintOut Copies:=1, Collate:=True
End Sub
Sub Makro12()
'
' Makro12 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Sheets("Sorgulama").Select
ActiveWindow.LargeScroll ToRight:=2
Range("X1").Select
ActiveWindow.SmallScroll ToRight:=2
End Sub
----------kod bitir------
----------kod basla------
Sub Makro13()
'
' Makro13 Makro
' Makro KSS taraf�ndan 06.05.2003 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("r7").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro14()
'
' Makro14 Makro
' Makro KSS taraf�ndan 07.05.2003 tarihinde kaydedildi.
'
'
Sheets("Bilgi").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro15()
'
' Makro15 Makro
' Makro KSS taraf�ndan 02.06.2003 tarihinde kaydedildi.
'
'
ActiveWindow.SmallScroll ToRight:=29
Range("AI1:AV38").Select
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.47244094488189)
.RightMargin = Application.InchesToPoints(0.47244094488189)
.TopMargin = Application.InchesToPoints(0.31496062992126)
.BottomMargin = Application.InchesToPoints(0.236220472440945)
.HeaderMargin = Application.InchesToPoints(0.236220472440945)
.FooterMargin = Application.InchesToPoints(0.196850393700787)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -2
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Selection.PrintOut Copies:=1, Preview:=True, Collate:=True
Range("AI39").Select
ActiveCell.FormulaR1C1 = "F.XX / 24.05.2003 - 2"
Range("A40").Select
ActiveWindow.LargeScroll Down:=-1
Range("A7").Select
ActiveSheet.Shapes("Button 50").Select
Selection.OnAction = "Makro15"
Range("J9").Select
Application.Goto Reference:="Makro15"
ActiveWindow.SmallScroll ToRight:=25
ActiveWindow.SmallScroll Down:=9
Range("AI39").Select
Application.CommandBars("Visual Basic").Visible = False
Range("AJ39").Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Italic = True
Range("AI39").Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Italic = True
Range("AG20").Select
ActiveWindow.ScrollRow = 8
ActiveWindow.LargeScroll Down:=-1
Range("A3").Select
Sheets("Sayfa1").Select
Range("O38").Select
ActiveWindow.LargeScroll Down:=-2
Range("G6:J6").Select
Sheets("Sorgulama").Select
Application.Run "'� Emirleri.xls'!Makro3"
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Click()
Rows(2).AutoFilter 11, ComboBox1.Value
End Sub
Private Sub ComboBox2_Click()
Rows(2).AutoFilter 13, ComboBox2.Value
End Sub
Private Sub CommandButton1_Click()
Rows(2).AutoFilter
For a = 1 To 2
Controls("combobox" & a) = ""
Next
Rows(2).AutoFilter
End Sub
'combobox1 i�in
Set s1 = Sheets("2003-F�r")
s1.Rows(2).AutoFilter
For b = 3 To s1.Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(s1.Range("K2:K" & b), s1.Cells(b, 11).Value) = 1 Then
ComboBox1.AddItem Sheets("2003-F�r").Cells(b, 11).Value '11=K s�tunudur
End If
Next
'combobox2 i�in
For b = 3 To s1.Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(s1.Range("M2:M" & b), s1.Cells(b, 13).Value) = 1 Then
ComboBox2.AddItem Sheets("2003-F�r").Cells(b, 13).Value '13=M s�tunudur
End If
Next
'D��ER COMBOLARADA AYNI D�NG�Y� KURARSINIZ SADECE COMBONUN ADINI, HARF VE RAKAM
OLARAK S�TUN NOSUNU DE���T�R�N.
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Sheets("2003-F�r").Rows(2).AutoFilter
End Sub
----------kod bitir------
----------kod basla------
Private Sub cmdkapat_Click()
Unload frmbulsil
End Sub
End Sub
'
Sheets("2003-F�r").Select
ActiveWindow.LargeScroll ToRight:=2
Range("db4").Select
End Sub
'
' Makro13 Makro
' Makro KSS taraf�ndan 06.05.2003 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("r7").Select
End Sub
Private Sub CommandButton4_Click()
'
' Makro4 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("BC1").Select
End Sub
'
Application.Goto Reference:="TipTesti"
ActiveWindow.SmallScroll Down:=-1
Range("CL20").Select
End Sub
End Sub
'
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
End Sub
'
Application.Goto Reference:="Pid"
ActiveWindow.SmallScroll Down:=22
End Sub
'
Sheets("�sEmri").Select
Range("O2").Select
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro KSS taraf�ndan 05.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("A1").Select
End Sub
Sub Makro2()
'
' Makro2 Makro
' Makro KSS taraf�ndan 05.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
ActiveWindow.LargeScroll ToRight:=2
Range("db4").Select
End Sub
Sub Makro3()
'
' Makro3 Makro
' Makro KSS taraf�ndan 05.02.2003 tarihinde kaydedildi.
'
'
Sheets("Ba�lang��").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro17()
'
' Makro17 Makro
' Makro KSS taraf�ndan 28.07.2003 tarihinde kaydedildi.
'
'
Sheets("2003-Ser").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro16()
'
' Makro16 Makro
' Makro KSS taraf�ndan 29.08.2003 tarihinde kaydedildi.
'
'
Range("A1:P61").Select
Selection.PrintOut Copies:=1, Collate:=True
ActiveWindow.LargeScroll Down:=-1
End Sub
----------kod bitir------
----------kod basla------
Sub Makro18()
'
' Makro18 Makro
' Makro KSS taraf�ndan 01.06.2004 tarihinde kaydedildi.
'
'
Application.Goto Reference:="TipTesti"
ActiveWindow.SmallScroll Down:=-1
Range("CH2:CR2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro19()
'
' Makro19 Makro
' Makro KSS taraf�ndan 14.06.2004 tarihinde kaydedildi.
'
'
Application.Goto Reference:="Pid"
ActiveWindow.SmallScroll Down:=22
End Sub
----------kod bitir------
----------kod basla------
Sub Makro20()
'
' Makro20 Makro
' Makro KSS taraf�ndan 23.06.2004 tarihinde kaydedildi.
'
'
Range("A282").Select
End Sub
----------kod bitir------
----------kod basla------
Sub FormAc()
frmbulsil.Show
End Sub
----------kod bitir------
----------kod basla------
Sub isemriyazdir()
'
' isemriyazdir Makro
' Makro alser taraf�ndan 24.02.2005 tarihinde kaydedildi.
'
'
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
----------kod bitir------
----------kod basla------
Sub isemrinegit()
'
' isemrinegit Makro
' Makro alser taraf�ndan 24.02.2005 tarihinde kaydedildi.
'
'
Sheets("�sEmri").Select
Range("O2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro4()
'
' Makro4 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("BC1").Select
End Sub
Sub Makro5()
'
' Makro5 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("BA1").Select
End Sub
Sub Makro6()
'
' Makro6 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("2003-F�r").Select
Range("AY1").Select
End Sub
Sub Makro7()
'
' Makro7 Makro
' Makro KSS taraf�ndan 19.02.2003 tarihinde kaydedildi.
'
'
Sheets("Sorgulama").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro8()
'
' Makro8 Makro
' Makro KSS taraf�ndan 20.02.2003 tarihinde kaydedildi.
'
'
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
Sub Makro9()
'
' Makro9 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Range("A5:H34").Select
Selection.PrintOut Copies:=1, Collate:=True
End Sub
----------kod bitir------
----------kod basla------
Sub Makro10()
'
' Makro10 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Range("D40").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro11()
'
' Makro11 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Range("X4:AE32").Select
Selection.PrintOut Copies:=1, Collate:=True
End Sub
Sub Makro12()
'
' Makro12 Makro
' Makro KSS taraf�ndan 28.02.2003 tarihinde kaydedildi.
'
'
Sheets("Sorgulama").Select
ActiveWindow.LargeScroll ToRight:=2
Range("X1").Select
ActiveWindow.SmallScroll ToRight:=2
End Sub
----------kod bitir------
----------kod basla------
Sub Makro13()
'
' Makro13 Makro
' Makro KSS taraf�ndan 06.05.2003 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("r7").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro14()
'
' Makro14 Makro
' Makro KSS taraf�ndan 07.05.2003 tarihinde kaydedildi.
'
'
Sheets("Bilgi").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro15()
'
' Makro15 Makro
' Makro KSS taraf�ndan 02.06.2003 tarihinde kaydedildi.
'
'
ActiveWindow.SmallScroll ToRight:=29
Range("AI1:AV38").Select
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = ""
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.47244094488189)
.RightMargin = Application.InchesToPoints(0.47244094488189)
.TopMargin = Application.InchesToPoints(0.31496062992126)
.BottomMargin = Application.InchesToPoints(0.236220472440945)
.HeaderMargin = Application.InchesToPoints(0.236220472440945)
.FooterMargin = Application.InchesToPoints(0.196850393700787)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = -2
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
End With
Selection.PrintOut Copies:=1, Preview:=True, Collate:=True
Range("AI39").Select
ActiveCell.FormulaR1C1 = "F.XX / 24.05.2003 - 2"
Range("A40").Select
ActiveWindow.LargeScroll Down:=-1
Range("A7").Select
ActiveSheet.Shapes("Button 50").Select
Selection.OnAction = "Makro15"
Range("J9").Select
Application.Goto Reference:="Makro15"
ActiveWindow.SmallScroll ToRight:=25
ActiveWindow.SmallScroll Down:=9
Range("AI39").Select
Application.CommandBars("Visual Basic").Visible = False
Range("AJ39").Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Italic = True
Range("AI39").Select
With Selection.Font
.Name = "Arial"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Selection.Font.Italic = True
Range("AG20").Select
ActiveWindow.ScrollRow = 8
ActiveWindow.LargeScroll Down:=-1
Range("A3").Select
Sheets("Sayfa1").Select
Range("O38").Select
ActiveWindow.LargeScroll Down:=-2
Range("G6:J6").Select
Sheets("Sorgulama").Select
Application.Run "'� Emirleri.xls'!Makro3"
End Sub
----------kod bitir------
----------kod basla------
Sub isimdegistir()
Sheets(2).Name = Sheets("sayfa1").[a1]
Sheets(3).Name = Sheets("sayfa1").[a2]
Sheets(4).Name = Sheets("sayfa1").[a3]
End Sub
----------kod bitir------
----------kod basla------
Sub isimdegistir()
Sheets(2).Name = Sheets("sayfa1").[a1]
End Sub
----------kod bitir------
----------kod basla------
Sub s�z()
On Error Resume Next
sat = Range("A11:L23").Find([i8].Value).Row
Range("A" & sat & ":" & "L" & sat).Copy
yaz = WorksheetFunction.CountA(Range("A30:A65536"))
Range("A" & yaz + 30).PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Sub s�z()
Range("A30:L65536").ClearContents
c = 0
For a = 11 To 23
If [i8].Value = Cells(a, 9).Value Then
sat = Cells(a, 9).Row
c = c + 1
Range("A" & sat & ":" & "L" & sat).Copy
Range("A" & c + 29).PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub s�z()
Range("A30:L65536").ClearContents
c = 0
For s = 9 To 12
For a = 11 To 23
If [i8].Value = Cells(a, s).Value Then
sat = Cells(a, s).Row
c = c + 1
Range("A" & sat & ":" & "L" & sat).Copy
Range("A" & c + 29).PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
End If
Next a
Next s
End Sub
----------kod bitir------
----------kod basla------
Sub donustur()
sayac = 1
For sutun = 1 To 47
For satir = 1 To 23
Sheets("sheet2").Cells(sayac, 1).Value = Sheets("sheet1").Cells(1, sutun).Value
Sheets("sheet2").Cells(sayac, 2).Value = Sheets("sheet1").Cells(satir + 1,
sutun).Value
sayac = sayac + 1
Next satir
Next sutun
End Sub
----------kod bitir------
----------kod basla------
Sub a()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
'Takvimden Bir Tarih Se�ince Takvimi Kapat
Private Sub Calendar1_Click()
TextBox1.Value = Format(Calendar1.Value, "dd.mm.yyyy")
TextBox1.Value = CDate(TextBox1.Text)
Calendar1.Visible = False
End Sub
'butona t�klay�nca takvimi ac
Private Sub CommandButton7_Click()
Calendar1.Visible = True
With Calendar1
.Height = 140
.Width = 175
'takvim a��l�nca bug�n�n tarihinde dursun
.Today
'.Day = 15
'.Month = 1
'.Year = 2005
End With
End Sub
ComboBox1.Value = ListBox1.Column("0")
ComboBox2.Value = ListBox1.Column("1")
ComboBox3.Value = ListBox1.Column("2")
ComboBox4.Value = ListBox1.Column("3")
ComboBox5.Value = ListBox1.Column("4")
ComboBox6.Value = ListBox1.Column("5")
TextBox1.Value = ListBox1.Column("6")
TextBox1.Value = Format(TextBox1.Value, "dd.mm.yyyy")
TextBox1.Value = CDate(TextBox1.Text)
End Sub
Selection.CurrentRegion.Copy
Sheets("Rapor").Range("A1").PasteSpecial
Selection.AutoFilter
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2 = Format(TextBox2, "dd.mm.yyyy")
End Sub
Private Sub TextBox3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox3 = Format(TextBox3, "dd.mm.yyyy")
End Sub
ComboBox1.RowSource = "DATA!A1:A2"
ComboBox2.RowSource = "DATA!B1:B3"
ComboBox3.RowSource = "DATA!C1:C27"
ComboBox4.RowSource = "DATA!D1:D4"
ComboBox5.RowSource = "DATA!E1:E6"
ComboBox6.RowSource = "DATA!F1:F2"
ComboBox7.RowSource = "DATA!A1:A2"
ComboBox8.RowSource = "DATA!B1:B3"
ComboBox9.RowSource = "DATA!C1:C27"
ComboBox10.RowSource = "DATA!D1:D4"
ComboBox11.RowSource = "DATA!E1:E6"
ComboBox12.RowSource = "DATA!F1:F2"
ListBox1.ColumnCount = 7
ListBox1.RowSource = "L�STE!A1:G50"
ListBox1.ColumnWidths = "60;80;120;100;80;80;90"
ListBox2.ColumnCount = 7
ListBox2.RowSource = "Rapor!A1:G50"
ListBox2.ColumnWidths = "60;80;120;100;80;80;90"
End Sub
----------kod bitir------
----------kod basla------
Private Sub Label1_Click()
End Sub
Private Sub UserForm_Activate()
Do
DoEvents
Label1 = Date & " " & Time
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Anamenu.Show
End Sub
----------kod bitir------
----------kod basla------
Sub linkleriyaz()
On Error Resume Next
say = WorksheetFunction.CountA([b2:b65536]) + 2
For a = 3 To say
Cells(a, 3) = Cells(a, 2).Hyperlinks(1).Address
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub git()
'
' git Makro
' Makro .. taraf�ndan 14/02/2001 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("F3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub karsilik()
Selection.Replace What:="1200 i�m ", Replacement:="69,96", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="1200ukm ", Replacement:="72,96", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="a", Replacement:="1", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="b", Replacement:="2", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="c", Replacement:="3", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="d", Replacement:="4", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="e", Replacement:="5", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="f", Replacement:="6", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="g", Replacement:="7", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="h", Replacement:="8", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="�", Replacement:="9", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="j", Replacement:="10", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="k", Replacement:="11", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="l", Replacement:="12", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
Selection.Replace What:="m", Replacement:="13", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False
End Sub
----------kod bitir------
----------kod basla------
Sub kar��la�t�rma()
Sheets("liste").Range("a2:f100").ClearContents
Dim i As Variant
Dim s As Variant
For Each i In Sheets("aa").Range("a1:f100")
i.Value = Trim(i.Value)
Next i
For Each s In Sheets("bb").Range("a1:f100")
s.Value = Trim(s.Value)
Next s
On Error Resume Next
alacakl� = WorksheetFunction.CountA(Sheets("aa").Range("a1:a100"))
c = 0
For a = 1 To alacakl� + 5
kriter = Sheets("aa").Cells(a, 1) & " " & Sheets("aa").Cells(a, 2)
ara = WorksheetFunction.CountIf(Sheets("bb").[[b1:b100]&" "&[c1:c100]], kriter)
If ara > 0 Then
c = c + 1
bul = Sheets("bb").Cells(a, ara).Find(kriter).Row
Sheets("liste").Cells(c + 1, 2) = kriter
Sheets("liste").Cells(c + 1, 1).Value = Sheets("bb").Cells(a, 6)
Sheets("liste").Cells(c + 1, 3).Value = Sheets("bb").Cells(a, 4)
Sheets("liste").Cells(c + 1, 4).Value = Sheets("bb").Cells(a, 5)
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub kar��la�t�rma()
Sheets("liste").Range("a2:f100").ClearContents
Dim i As Variant
Dim s As Variant
For Each i In Sheets("aa").Range("a1:f100")
i.Value = Trim(i.Value)
Next i
For Each s In Sheets("bb").Range("a1:f100")
s.Value = Trim(s.Value)
Next s
On Error Resume Next
alacakl� = WorksheetFunction.CountA(Sheets("aa").Range("a1:a100"))
c = 0
For a = 1 To alacakl� + 5
kriter = Sheets("aa").Cells(a, 1) & " " & Sheets("aa").Cells(a, 2)
ara = WorksheetFunction.CountIf(Sheets("bb").[[b1:b100]&" "&[c1:c100]], kriter)
If ara > 0 Then
c = c + 1
bul = Sheets("bb").Cells(a, ara).Find(kriter).Row
Sheets("liste").Cells(c + 1, 2) = kriter
Sheets("liste").Cells(c + 1, 1).Value = Sheets("bb").Cells(a, 6)
Sheets("liste").Cells(c + 1, 3).Value = Sheets("bb").Cells(a, 4)
Sheets("liste").Cells(c + 1, 4).Value = Sheets("bb").Cells(a, 5)
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub kartno()
Dim nums As String
For i = 1 To Cells(65536, 1).End(xlUp).Row
For b = 1 To Len(Cells(i, 1)) Step 4
nums = nums + Mid(Cells(i, 1), b, 4) + " "
Next b
Cells(i, 1) = nums
nums = ""
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub kartno()
Dim nums As String
For i = 1 To Cells(65536, 1).End(xlUp).Row
For b = 1 To Len(Cells(i, 1)) Step 4
nums = nums + Mid(Cells(i, 1), b, 4) + " "
Next b
Cells(i, 1) = nums
nums = ""
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub kartno()
Dim nums As String
For i = 1 To Cells(65536, 1).End(xlUp).Row
For b = 1 To Len(Cells(i, 1)) Step 4
nums = nums + Mid(Cells(i, 1), b, 4) + " "
Next b
Cells(i, 1) = nums
nums = ""
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub kartno()
Dim nums As String
For i = 1 To Cells(65536, 1).End(xlUp).Row
For b = 1 To Len(Cells(i, 1)) Step 4
nums = nums + Mid(Cells(i, 1), b, 4) + " "
Next b
Cells(i, 1) = nums
nums = ""
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub yaz()
Range("B25:DP37").ClearContents
uz = Len(Range("E41"))
uzunluk = 0
For s�ra = 1 To uz
sat = 0
h1 = Mid(Range("E41"), s�ra, 1)
If h1 = " " Then
s = 47
GoTo 20
End If
For s = 1 To 47
If h1 = Sheets("sayfa1").Cells(1, s).Value Then
k1 = Sheets("sayfa1").Cells(2, s).Value
For sut = 2 + uzunluk To 1 + k1 + uzunluk
If sut > 120 Then Exit Sub
For satir = 25 To 37
sat = sat + 1
Cells(satir, sut) = Sheets("sayfa1").Cells(sat + 2, s).Value
Next satir
Next sut
20 uzunluk = Sheets("sayfa1").Cells(2, s).Value + uzunluk + 1
GoTo 10
End If
Next s
10 Next s�ra
[db41] = k + uzunluk
[ct41] = 0
Range("A41").Select
End Sub
----------kod bitir------
----------kod basla------
Function a(sat�r, sutun)
a = Cells(sat�r, sutun).Value
End Function
Sub sayac()
j = 0
a5 = 0
[dn41] = 0
[dh41] = 0
ResumeSub:
Start = Timer * [bm41]
Do
DoEvents
finish = Timer * [bm41]
[ct41] = Format((finish - Start - j), "00")
If ((Cells(15, [db41]) = 1 Or Cells(11, [db41]) = 1 Or Cells(7, [db41]) = 1))
And [a5] = [cb41] Then Exit Sub
If [dn41] = 1 Then Exit Sub
Loop While ((finish - Start) - j) <= 118
a5 = a5 + 1
j = [db41] - 1
[dh41] = a5
GoTo ResumeSub:
End Sub
Sub durdur()
[dn41] = 1
End Sub
----------kod bitir------
----------kod basla------
Sub ara()
Range("B9:G65536").ClearContents
a = WorksheetFunction.CountA(Range("B9:A65536"))
c = 0
For aa = 2 To a + 1
For bb = 2 To Sheets("2").Cells(65536, 1).End(xlUp).Row
If Cells(aa, 1) = Sheets("2").Cells(bb, 1).Value Then
c = c + 1
Cells(c + 1, 2) = Cells(aa, 1).Value
Cells(c + 1, 3) = Sheets("2").Cells(bb, 3).Value
Cells(c + 1, 4) = Sheets("2").Cells(bb, 6).Value
End If
Next bb
Next aa
End Sub
----------kod bitir------
----------kod basla------
Sub ara()
Range("B9:G65536").ClearContents
a = WorksheetFunction.CountA(Range("B9:A65536"))
c = 0
For aa = 2 To a + 1
For bb = 2 To Sheets("2").Cells(65536, 1).End(xlUp).Row
If Cells(aa, 1) = Sheets("2").Cells(bb, 1).Value Then
c = c + 1
Cells(c + 1, 2) = Cells(aa, 1).Value
Cells(c + 1, 3) = Sheets("2").Cells(bb, 3).Value
Cells(c + 1, 4) = Sheets("2").Cells(bb, 6).Value
End If
Next bb
Next aa
End Sub
----------kod bitir------
----------kod basla------
Sub ara()
Range("B9:G65536").ClearContents
a = WorksheetFunction.CountA(Range("B9:A65536"))
c = 0
For aa = 2 To a + 1
For bb = 2 To Sheets("2").Cells(65536, 1).End(xlUp).Row
If Cells(aa, 1) = Sheets("2").Cells(bb, 1).Value Then
c = c + 1
Cells(c + 1, 2) = Cells(aa, 1).Value
Cells(c + 1, 3) = Sheets("2").Cells(bb, 3).Value
Cells(c + 1, 4) = Sheets("2").Cells(bb, 6).Value
End If
Next bb
Next aa
End Sub
----------kod bitir------
----------kod basla------
Sub ara()
Range("B9:G65536").ClearContents
a = WorksheetFunction.CountA(Range("B9:A65536"))
c = 0
For aa = 2 To a + 1
For bb = 2 To Sheets("2").Cells(65536, 1).End(xlUp).Row
If Cells(aa, 1) = Sheets("2").Cells(bb, 1).Value Then
c = c + 1
Cells(c + 1, 2) = Cells(aa, 1).Value
Cells(c + 1, 3) = Sheets("2").Cells(bb, 3).Value
Cells(c + 1, 4) = Sheets("2").Cells(bb, 6).Value
End If
Next bb
Next aa
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
satir = WorksheetFunction.CountA(Sheets("kay�t").Range("A1:A65536")) + 1 'kay�t
sayfas�nda, a kolonundaki son dolu h�creden sonraki satir
Sheets("kay�t").Cells(satir, 1) = ComboBox7.Value
Sheets("kay�t").Cells(satir, 2) = TextBox1.Value
Sheets("kay�t").Cells(satir, 3) = ComboBox8.Value
Sheets("kay�t").Cells(satir, 4) = ComboBox9.Value
Sheets("kay�t").Cells(satir, 5) = TextBox2.Value
Sheets("kay�t").Cells(satir, 6) = ComboBox10.Value
ComboBox7.Value = ""
TextBox1.Value = ""
ComboBox8.Value = ""
ComboBox9.Value = ""
TextBox2.Value = ""
ComboBox10.Value = ""
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub AUTO_OPEN()
Application.Visible = False
kay�t_veri.Show
End Sub
----------kod bitir------
----------kod basla------
Dim al(5000, 2), sfson, sf
Sub aktar()
Set sf = Sheets("sayfa1")
sfson = WorksheetFunction.CountA(sf.Range("a2:a65536"))
sf.[d2:I65536].ClearContents
For x = 1 To sfson
al(x, 1) = sf.Cells(x + 1, 1)
al(x, 2) = sf.Cells(x + 1, 2)
Next
Call karsilastir(Sheets("lise2"), 4,
WorksheetFunction.CountA(Sheets("lise2").Range("a2:a65536")))
Call karsilastir(Sheets("lise1"), 6,
WorksheetFunction.CountA(Sheets("lise1").Range("a2:a65536")))
Call karsilastir(Sheets("ilk7"), 8,
WorksheetFunction.CountA(Sheets("ilk7").Range("a2:a65536")))
End Sub
Function karsilastir(sayfa, sutun, kactane)
c = 1
For x = 1 To sfson
For y = 1 To kactane
If al(x, 1) = sayfa.Cells(y + 1, 1) And al(x, 2) = sayfa.Cells(y + 1, 2) Then
c = c + 1
sf.Cells(c, sutun) = al(x, 1)
sf.Cells(c, sutun + 1) = al(x, 2)
End If
Next
Next
End Function
----------kod bitir------
----------kod basla------
Sub HHH()
KAYITSAYISI = Application.CountA(Sheets("SAYFA2").UsedRange)
Z = Cells.SpecialCells(xlLastCell).Row
MsgBox Z
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Cevat Aykiroglu taraf�ndan 03.09.2004 tarihinde kaydedildi.
'
'
Selection.SpecialCells(xlCellTypeConstants, 23).Select
End Sub
----------kod bitir------
----------kod basla------
Public MyPass
Public MyVal As Boolean
'
Sub Auto_Open()
Dim UserArray()
Dim i As Byte
Dim MyVal As Boolean
MyVal = False
Set RaiderMenu = Application.CommandBars("Worksheet Menu Bar").Controls(1)
With RaiderMenu.Controls.Add(msoControlButton, 1, ,
RaiderMenu.Controls.Count - 1, True)
.BeginGroup = True
.Caption = "Dosya Eri�imi (by Raider �)"
.OnAction = "ShowForm"
.FaceId = 7
End With
Set RaiderMenu = Nothing
Call OrganizeMenus(MyVal)
Call EnableShortcutMenus(MyVal)
End Sub
'
Sub Auto_Close()
Call OrganizeMenus(True)
Call EnableShortcutMenus(True)
End Sub
'
Sub ShowForm()
Dim PassWForm
Set PassWForm = ThisWorkbook.VBProject.VBComponents.Add(3)
PassWForm.properties("Width") = 200
PassWForm.properties("Height") = 100
Set NewTextBox = PassWForm.Designer.Controls.Add("forms.TextBox.1")
PassWForm.properties("Caption") = "�ifre giri�i !"
With NewTextBox
.Width = 120
.Height = 18
.Left = 8
.Top = 50
.PasswordChar = "*"
.ForeColor = &HFF&
End With
Set NewCommandButton1 =
PassWForm.Designer.Controls.Add("forms.CommandButton.1")
With NewCommandButton1
.Caption = "Vazge�"
.Height = 18
.Width = 50
.Left = 140
.Top = 26
End With
Set NewCommandButton2 =
PassWForm.Designer.Controls.Add("forms.CommandButton.1")
With NewCommandButton2
.Caption = "Tamam"
.Height = 18
.Width = 50
.Left = 140
.Top = 50
End With
Set NewOpButton = PassWForm.Designer.Controls.Add("forms.OptionButton.1")
With NewOpButton
.Caption = "K�s�tlamalar� uygula"
.Height = 18
.Width = 100
.Left = 8
.Top = 10
.Value = True
End With
Set NewOpButton = PassWForm.Designer.Controls.Add("forms.OptionButton.1")
With NewOpButton
.Caption = "K�s�tlamalar� iptal et"
.Height = 18
.Width = 100
.Left = 8
.Top = 28
End With
With PassWForm.CodeModule
X = .CountOfLines
.InsertLines X + 1, "Sub CommandButton1_Click()"
.InsertLines X + 2, "Unload Me"
.InsertLines X + 3, "End Sub"
.InsertLines X + 4, "Sub CommandButton2_Click()"
.InsertLines X + 5, "MyPass = TextBox1"
.InsertLines X + 6, "MyVal = IIf(OptionButton1.Value, False, True)"
.InsertLines X + 7, "Unload Me"
.InsertLines X + 8, "End Sub"
.InsertLines X + 9, "Sub UserForm_Activate()"
.InsertLines X + 10, "Me.SpecialEffect=3"
.InsertLines X + 11, "TextBox1.SetFocus"
.InsertLines X + 12, "End Sub"
VBA.UserForms.Add(PassWForm.Name).Show
ThisWorkbook.VBProject.VBComponents.Remove VBComponent:=PassWForm
End With
If MyPass <> "" Then
If LCase(MyPass) = LCase("Raider") Then
MyVal = MyVal
Else
MyVal = Not MyVal
End If
Else
MyVal = False
End If
Call OrganizeMenus(MyVal)
Call EnableShortcutMenus(MyVal)
End Sub
'
Sub OrganizeMenus(MyBoolean As Boolean)
On Error Resume Next
For Each Ctrl In Application.CommandBars.FindControls(ID:=3) 'Save
Ctrl.Enabled = MyBoolean
Next Ctrl
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
If TextBox2 = "" Then TextBox2.Value = 0
If TextBox3 = "" Then TextBox3.Value = 0
TextBox4 = Format(TextBox2 * 1 - (TextBox3 / 3), "0.00")
s1 = WorksheetFunction.CountA(Sheets("sayfa1").[a2:a65536])
s2 = WorksheetFunction.CountA(Sheets("sayfa2").[b5:f5])
Sheets("sayfa1").Cells(s1 + 2, 1) = s1 + 1
Sheets("sayfa1").Cells(s1 + 2, 2) = TextBox1.Value
Sheets("sayfa1").Cells(s1 + 2, 3) = TextBox2.Value * 1
Sheets("sayfa1").Cells(s1 + 2, 4) = TextBox3.Value * 1
Sheets("sayfa1").Cells(s1 + 2, 5) = TextBox4.Value * 1
Sheets("sayfa2").Cells(2, s2 + 2) = TextBox2 * 1 + TextBox3 * 1
Sheets("sayfa2").Cells(3, s2 + 2) = TextBox2.Value * 1
Sheets("sayfa2").Cells(4, s2 + 2) = TextBox3.Value * 1
Sheets("sayfa2").Cells(5, s2 + 2) = TextBox4.Value * 1
TextBox1.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
If TextBox1.Text = "" Or TextBox2.Text = "" Then
MsgBox "Tarih veya Tutar bo� ge�ilemez", vbOKOnly
Else
dene = Application.CountA(Sheets("DATA").Columns("A")) + 1
sira = TextBox1.Text
Sheets("DATA").Cells(dene, 1) = TextBox1.Text
Sheets("DATA").Cells(dene, 2) = TextBox2.Text
TextBox1.Text = sira + 1
TextBox2.Text = ""
MsgBox "Kay�t i�lemi Tamamland�", vbInformation
TextBox2.Value = ""
TextBox2.Value = ""
TextBox2.SetFocus
TextBox3 = [A1].Value
End If
End Sub
----------kod bitir------
----------kod basla------
Sub a()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
For i = 1 To 20
[a1] = "='C:\Belgelerim\[Kitap2.xls]Sayfa1'!$A$" & i
ListBox1.AddItem Range("A1")
Next
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
[a1].ClearContents
End Sub
----------kod bitir------
----------kod basla------
Sub D��me5_T�klat()
'
' D��me5_T�klat Makro
' Makro metin taraf�ndan 01.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim wb As Workbook
Dim ws As Worksheet
Workbooks.Open ("C:\Documents and Settings\mrcplus\Desktop\kitap1.xls")
Set wb = ActiveWorkbook
Set ws = ActiveSheet
wb.Activate
ws.Activate
'Asagidaki 50 yerine istediginiz sayiyi girebilirsiniz bu say�
'Sizin sorgu yapmak istediginiz ve aktarmak istediginiz kac veri
'olduguna bagl�
For i = 1 To 65000
If ws.Cells(i, 1).Text = Sayfa1.Cells(i, 1).Text Then
Sayfa1.Cells(i, 2) = ws.Cells(i, 2)
Sayfa1.Cells(i, 3) = ws.Cells(i, 3)
Else
End If
Next
wb.Save
wb.Close
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim wb As Workbook
Dim ws As Worksheet
Workbooks.Open ("C:\kitap1.xls")
Set wb = ActiveWorkbook
Set ws = ActiveSheet
wb.Activate
ws.Activate
'Asagidaki 50 yerine istediginiz sayiyi girebilirsiniz bu say�
'Sizin sorgu yapmak istediginiz ve aktarmak istediginiz kac veri
'olduguna bagl�
For i = 1 To 65000
If ws.Cells(i, 1).Text = Sayfa1.Cells(i, 1).Text Then
Sayfa1.Cells(i, 2) = ws.Cells(i, 2)
Sayfa1.Cells(i, 3) = ws.Cells(i, 3)
Else
End If
Next
wb.Save
wb.Close
End Sub
----------kod bitir------
----------kod basla------
Public arananay
Private Sub ComboBox1_Change()
arananay = ComboBox1.Value
End Sub
Sub ilan()
yer = Worksheets("yeni").Range("c6").Value
MsgBox " " & yer & "rezervasyon kay�d� yap�ld�"
ActiveWorkbook.save
End Sub
Sub clear()
Application.ScreenUpdating = False
Sheets("yeni").Select
Range("c3:c12").Select
Selection.ClearContents
Range("c13").Select
Range("c2").Select
ActiveCell.FormulaR1C1 = "=Now()"
Range("c3").Select
End Sub
Sub dbase()
Range("a2").Select
Selection.End(xlDown).Select
ActiveCell.Select
End Sub
Sub save()
a = WorksheetFunction.CountA(Sheets("dbase").Range("A2:A65000")) + 2
Application.ScreenUpdating = False
Sheets("yeni").Select
Range("c2:c13").Select
Selection.Copy
Sheets("dbase").Select
Range("A" & a).Select
Selection.PasteSpecial , , , True
Range("c2:c13").clear
clear
Application.ScreenUpdating = True
ilan
End Sub
----------kod bitir------
----------kod basla------
Sub al()
bol = [b1]
uzunluk = Len(bol)
bas = 1
For x = 1 To uzunluk
If Mid(bol, x, 1) = ";" Then
c = c + 1
Cells(c, 1) = Mid(bol, bas, x - bas)
bas = x + 1
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Sub Kay�t2()
With Assistant
.Visible = True
.Animation = msoAnimationAppear
.Animation = msoAnimationEmptyTrash
End With
End With
Assistant.Visible = False
End Sub
----------kod bitir------
----------kod basla------
'***************TEXTBOX FORMATLARI****************
Private Sub T1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsNumeric(T1) = True Then
T1 = Format(T1, "###,###.00")
Exit Sub
End If
T1.Value = ""
End Sub
End Sub
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T10.Value = ""
T11.Value = ""
T12.Value = ""
T15.Value = ""
T16.Value = ""
T17.Value = ""
T20.Value = ""
T21.Value = ""
T22.Value = ""
T25.Value = ""
T26.Value = ""
T27.Value = ""
T29.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T33.Value = ""
T34.Value = ""
T35.Value = ""
T36.Value = ""
T37.Value = ""
T38.Value = ""
T39.Value = ""
T40.Value = ""
T41.Value = ""
T42.Value = ""
Kay�t2
Sheets("1").Select
UserForm3.Show
End
End Sub
Private Sub UserForm_Initialize()
Chk�stisna.Value = False
Cb�stisna.Visible = False
CommandButton4.Visible = True
End Sub
Private Sub UserForm_Activate()
Call Denet
End Sub
Private Sub Denet()
On Error Resume Next
Refaire:
Label1.Left = Label1.Left - 10
DoEvents
For j = 1 To 2000000: Next
If Label1.Left + Label1.Width < 0 Then Label1.Left = Me.Width
GoTo Refaire
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton3_Click()
Sheets("1").Select
Range("N40").Value = T1
Range("O40").Value = T1A
say�1 = Format(T1B, "###,###.00")
Range("L40").Value = say�1
say�2 = Format(T1C, "###,###.00")
Range("P40").Value = say�2
Range("N41").Value = T2
Range("O41").Value = T2A
say�3 = Format(T2B, "###,###.00")
Range("L41").Value = say�3
say�4 = Format(T2C, "###,###.00")
Range("P41").Value = say�4
Range("N42").Value = T3
Range("O42").Value = T3A
say�5 = Format(T3B, "###,###.00")
Range("L42").Value = say�5
say�6 = Format(T3C, "###,###.00")
Range("P42").Value = say�6
Range("N43").Value = T4
Range("O43").Value = T4A
say�7 = Format(T4B, "###,###.00")
Range("L43").Value = say�7
say�8 = Format(T4C, "###,###.00")
Range("P43").Value = say�8
Range("N44").Value = T5
Range("O44").Value = T5A
say�9 = Format(T5B, "###,###.00")
Range("L44").Value = say�9
say�10 = Format(T5C, "###,###.00")
Range("P44").Value = say�10
Range("N46").Value = T6
Range("O46").Value = T6A
say�11 = Format(T6B, "###,###.00")
Range("L46").Value = say�11
say�12 = Format(T6C, "###,###.00")
Range("P46").Value = say�12
Range("N47").Value = T7
Range("O47").Value = T7A
say�13 = Format(T7B, "###,###.00")
Range("L47").Value = say�13
say�14 = Format(T7C, "###,###.00")
Range("P47").Value = say�14
Range("N48").Value = T8
Range("O48").Value = T8A
say�15 = Format(T8B, "###,###.00")
Range("L48").Value = say�15
say�16 = Format(T8C, "###,###.00")
Range("P48").Value = say�16
Range("N49").Value = T9
Range("O49").Value = T9A
say�17 = Format(T9B, "###,###.00")
Range("L49").Value = say�17
say�18 = Format(T9C, "###,###.00")
Range("P49").Value = say�18
Range("N50").Value = T10
Range("O50").Value = T10A
say�19 = Format(T10B, "###,###.00")
Range("L50").Value = say�19
say�20 = Format(T10C, "###,###.00")
Range("P50").Value = say�20
Range("N52").Value = T11
Range("O52").Value = T11A
say�21 = Format(T11B, "###,###.00")
Range("L52").Value = say�21
say�22 = Format(T11C, "###,###.00")
Range("P52").Value = say�22
Range("N53").Value = T12
Range("O53").Value = T12A
say�23 = Format(T12B, "###,###.00")
Range("L53").Value = say�23
say�24 = Format(T12C, "###,###.00")
Range("P53").Value = say�24
Range("N54").Value = T13
Range("O54").Value = T13A
say�25 = Format(T13B, "###,###.00")
Range("L54").Value = say�25
say�26 = Format(T13C, "###,###.00")
Range("P54").Value = say�26
Range("N55").Value = T14
Range("O55").Value = T14A
say�27 = Format(T14B, "###,###.00")
Range("L55").Value = say�27
say�28 = Format(T14C, "###,###.00")
Range("P55").Value = say�28
Range("N56").Value = T15
Range("O56").Value = T15A
say�29 = Format(T15B, "###,###.00")
Range("L56").Value = say�29
say�30 = Format(T15C, "###,###.00")
Range("P56").Value = say�30
say�31 = Format(T15Z, "###,###.00")
Range("P59").Value = say�31
say�32 = Format(T16, "###,###.00")
Range("L61").Value = say�32
say�33 = Format(T16B, "###,###.00")
Range("P61").Value = say�33
say�34 = Format(T17, "###,###.00")
Range("L62").Value = say�34
say�35 = Format(T17B, "###,###.00")
Range("P62").Value = say�35
say�36 = Format(T18, "###,###.00")
Range("L63").Value = say�36
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T1A.Value = ""
T2A.Value = ""
T3A.Value = ""
T4A.Value = ""
T5A.Value = ""
T1B.Value = ""
T2B.Value = ""
T3B.Value = ""
T4B.Value = ""
T5B.Value = ""
T1C.Value = ""
T2C.Value = ""
T3C.Value = ""
T4C.Value = ""
T5C.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T10.Value = ""
T6A.Value = ""
T7A.Value = ""
T8A.Value = ""
T9A.Value = ""
T10A.Value = ""
T6B.Value = ""
T7B.Value = ""
T8B.Value = ""
T9B.Value = ""
T10B.Value = ""
T6C.Value = ""
T7C.Value = ""
T8C.Value = ""
T9C.Value = ""
T10C.Value = ""
T11.Value = ""
T12.Value = ""
T13.Value = ""
T14.Value = ""
T15.Value = ""
T11A.Value = ""
T12A.Value = ""
T13A.Value = ""
T14A.Value = ""
T15A.Value = ""
T11B.Value = ""
T12B.Value = ""
T13B.Value = ""
T14B.Value = ""
T15B.Value = ""
T11C.Value = ""
T12C.Value = ""
T13C.Value = ""
T14C.Value = ""
T15C.Value = ""
T15Z.Value = ""
T16.Value = ""
T16B.Value = ""
T17.Value = ""
T17B.Value = ""
T18.Value = ""
End
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub topla1()
Dim FATURATUT As Integer
FATURATUTAR = FATURA.Range("C14").Value
LISTEADRESI = LISTEFIRMA.Address
LISTETUTARADRES = LISTE.Range(LISTEADRESI).Offset(0, 3).Address
LISTEFIRMATUTAR = LISTE.Range(LISTEADRESI).Offset(0, 3)
FATURAFIRMA = FATURA.Range("A1")
If FATURAFIRMA = LISTEFIRMA Then
LISTE.Range(LISTETUTARADRES) = LISTEFIRMATUTAR + FATURATUTAR
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Sub D��me9_T�klat()
Workbooks.Open ("C:\kitap1.xls")
Set wb = ActiveWorkbook
Set ws = ActiveSheet
wb.Activate
ws.Activate
'Asagidaki 50 yerine istediginiz sayiyi girebilirsiniz bu say�
'Sizin sorgu yapmak istediginiz ve aktarmak istediginiz kac veri
'olduguna bagl�
For i = 1 To 15
If ws.Cells(i, 1).Text = Sayfa1.Cells(i, 1).Text Then
Sayfa1.Cells(i, 2) = ws.Cells(i, 2)
Sayfa1.Cells(i, 3) = ws.Cells(i, 3)
Else
End If
Next
wb.Save
wb.Close
End Sub
----------kod bitir------
----------kod basla------
Sub Silgi()
'
' Silgi Makro
' Makro Ferbay taraf�ndan 04.04.2005 tarihinde kaydedildi.
'
'
Range("B1:B1100").Select
Selection.ClearContents
End Sub
----------kod bitir------
----------kod basla------
Sub D�gme9_Tiklat()
Workbooks.Open ("C:\kitap1.xls")
Set wb = ActiveWorkbook
Set ws = ActiveSheet
wb.Activate
ws.Activate
For i = 1 To WorksheetFunction.CountA(ActiveSheet.[b2:b65536]) + 1
Sayfa1.Cells(i, 1) = ws.Cells(i, 1)
Sayfa1.Cells(i, 2) = ws.Cells(i, 2)
Sayfa1.Cells(i, 3) = ws.Cells(i, 3)
Next
End Sub
----------kod bitir------
----------kod basla------
'global k_sayfa,k_alan,
Global kriter, sayfa, adres As String
Sub stokal()
Sheets(sayfa).Select
Columns("H:I").Select
Selection.ClearContents
Range("A1:C1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=3, Criteria1:=kriter
Range("A1:C1").Select
Range(Selection, Selection.End(xlDown)).Select
Range("A1:B1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("H1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Sheets(sayfa).AutoFilterMode = False
Range("H1:I1").Select
Range(Selection, Selection.End(xlDown)).Select
adres = sayfa & "!" & Selection.Address
End Sub
Function ata(Fkriter, Fsayfa As String)
kriter = Fkriter
sayfa = Fsayfa
End Function
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
F = ata(ComboBox1.Text, "stok")
stokal
ListBox1.RowSource = adres
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub toplam_al()
MsgBox "��LEM�N�Z�N DO�RU YAPILAB�LMES� ���N L�TFEN �NCEDEN TOPLAM ALDI�INIZ ALANI
S�L�N�Z", vbCritical, "UYARI"
Worksheets("MOTOR�N").Select
Dim SonHucre As Range
Set SonHucre = Range("A65536").End(xlUp)
'T O P L A M A L***************
SonHucre(2, 1) = "T O P L A M "
SonHucre(2, 2).Formula = "=SUM(B6:B" & SonHucre.Row & ")"
SonHucre(2, 3).Formula = "=SUM(C6:C" & SonHucre.Row & ")"
SonHucre(2, 4).Formula = "=SUM(D6:D" & SonHucre.Row & ")"
'YAZDIRMA ALANINI TANIMLA
ActiveSheet.PageSetup.PrintArea = "$A$1:$F$" & SonHucre(2, 6).Row
'KENARLIK YAZ
'h�creleri se�
Range(Cells(6, 1), SonHucre(2, 6)).Select
'tan�mla
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End Sub
----------kod bitir------
----------kod basla------
Sub Kay�t2()
With Assistant
.Visible = True
.Animation = msoAnimationAppear
.Animation = msoAnimationEmptyTrash
End With
Set Wiz = Assistant.NewBalloon
With Wiz
.Heading = "KAYIT ��LEMLER�"
.Text = "Sedaysen@mynet.com"
.Labels(1).Text = "1- KDV �n Sayfa Kay�t �leminiz Tamamlanm�t�r."
.Labels(2).Text = "2- �ST�SNALAR ���N �stisna butonunu i�aretleyiniz."
.BalloonType = msoBalloonTypeButtons
.Mode = msoModeAutoDown
.Button = msoButtonSetOK
.Show
End With
Assistant.Visible = False
End Sub
----------kod bitir------
----------kod basla------
'***************TEXTBOX FORMATLARI****************
Private Sub T1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsNumeric(T1) = True Then
T1 = Format(T1, "###,###.00")
Exit Sub
End If
T1.Value = ""
End Sub
End Sub
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T10.Value = ""
T11.Value = ""
T12.Value = ""
T15.Value = ""
T16.Value = ""
T17.Value = ""
T20.Value = ""
T21.Value = ""
T22.Value = ""
T25.Value = ""
T26.Value = ""
T27.Value = ""
T29.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T33.Value = ""
T34.Value = ""
T35.Value = ""
T36.Value = ""
T37.Value = ""
T38.Value = ""
T39.Value = ""
T40.Value = ""
T41.Value = ""
T42.Value = ""
Kay�t2
Sheets("1").Select
UserForm3.Show
End
End Sub
Private Sub UserForm_Initialize()
Chk�stisna.Value = False
Cb�stisna.Visible = False
CommandButton4.Visible = True
End Sub
Private Sub UserForm_Activate()
Call Denet
End Sub
Private Sub Denet()
On Error Resume Next
Refaire:
Label1.Left = Label1.Left - 10
DoEvents
For j = 1 To 2000000: Next
If Label1.Left + Label1.Width < 0 Then Label1.Left = Me.Width
GoTo Refaire
End Sub
----------kod bitir------
----------kod basla------
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T1A.Value = ""
T2A.Value = ""
T3A.Value = ""
T4A.Value = ""
T5A.Value = ""
T1B.Value = ""
T2B.Value = ""
T3B.Value = ""
T4B.Value = ""
T5B.Value = ""
T1C.Value = ""
T2C.Value = ""
T3C.Value = ""
T4C.Value = ""
T5C.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T10.Value = ""
T6A.Value = ""
T7A.Value = ""
T8A.Value = ""
T9A.Value = ""
T10A.Value = ""
T6B.Value = ""
T7B.Value = ""
T8B.Value = ""
T9B.Value = ""
T10B.Value = ""
T6C.Value = ""
T7C.Value = ""
T8C.Value = ""
T9C.Value = ""
T10C.Value = ""
T11.Value = ""
T12.Value = ""
T13.Value = ""
T14.Value = ""
T15.Value = ""
T11A.Value = ""
T12A.Value = ""
T13A.Value = ""
T14A.Value = ""
T15A.Value = ""
T11B.Value = ""
T12B.Value = ""
T13B.Value = ""
T14B.Value = ""
T15B.Value = ""
T11C.Value = ""
T12C.Value = ""
T13C.Value = ""
T14C.Value = ""
T15C.Value = ""
T15Z.Value = ""
T16.Value = ""
T16B.Value = ""
T17.Value = ""
T17B.Value = ""
T18.Value = ""
End
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T1A.Value = ""
T2A.Value = ""
T3A.Value = ""
T4A.Value = ""
T5A.Value = ""
T6A.Value = ""
T7A.Value = ""
T8A.Value = ""
T9A.Value = ""
T1B.Value = ""
T2B.Value = ""
T3B.Value = ""
T4B.Value = ""
T5B.Value = ""
T6B.Value = ""
T7B.Value = ""
T8B.Value = ""
T9B.Value = ""
T10.Value = ""
T11.Value = ""
T12.Value = ""
T13.Value = ""
T10.Value = ""
T14.Value = ""
T16.Value = ""
T17.Value = ""
Me.Hide
UserForm5.Show
End
End Sub
Private Sub UserForm_Activate()
Call Denet
End Sub
Private Sub Denet()
On Error Resume Next
Refaire:
Label1.Left = Label1.Left - 10
DoEvents
For j = 1 To 2000000: Next
If Label1.Left + Label1.Width < 0 Then Label1.Left = Me.Width
GoTo Refaire
End Sub
End Sub
----------kod bitir------
----------kod basla------
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T1A.Value = ""
T2A.Value = ""
T3A.Value = ""
T4A.Value = ""
T1B.Value = ""
T2B.Value = ""
T3B.Value = ""
T4B.Value = ""
T1C.Value = ""
T2C.Value = ""
T3C.Value = ""
T4C.Value = ""
T1D.Value = ""
T2D.Value = ""
T3D.Value = ""
T4D.Value = ""
End
Me.Hide
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub Kay�t2()
With Assistant
.Visible = True
.Animation = msoAnimationAppear
.Animation = msoAnimationEmptyTrash
End With
End With
Assistant.Visible = False
End Sub
----------kod bitir------
----------kod basla------
'***************TEXTBOX FORMATLARI****************
Private Sub T1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If IsNumeric(T1) = True Then
T1 = Format(T1, "###,###.00")
Exit Sub
End If
T1.Value = ""
End Sub
End Sub
T20.Value = ""
T21.Value = ""
T22.Value = ""
T25.Value = ""
T26.Value = ""
T27.Value = ""
T29.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T30.Value = ""
T31.Value = ""
T32.Value = ""
T33.Value = ""
T34.Value = ""
T35.Value = ""
T36.Value = ""
T37.Value = ""
T38.Value = ""
T39.Value = ""
T40.Value = ""
T41.Value = ""
T42.Value = ""
Kay�t2
Sheets("1").Select
UserForm3.Show
End
End Sub
Private Sub UserForm_Initialize()
Chk�stisna.Value = False
Cb�stisna.Visible = False
CommandButton4.Visible = True
End Sub
Private Sub UserForm_Activate()
Call Denet
End Sub
Private Sub Denet()
On Error Resume Next
Refaire:
Label1.Left = Label1.Left - 10
DoEvents
For j = 1 To 2000000: Next
If Label1.Left + Label1.Width < 0 Then Label1.Left = Me.Width
GoTo Refaire
End Sub
----------kod bitir------
----------kod basla------
T1.Value = ""
T2.Value = ""
T3.Value = ""
T4.Value = ""
T5.Value = ""
T1A.Value = ""
T2A.Value = ""
T3A.Value = ""
T4A.Value = ""
T5A.Value = ""
T1B.Value = ""
T2B.Value = ""
T3B.Value = ""
T4B.Value = ""
T5B.Value = ""
T1C.Value = ""
T2C.Value = ""
T3C.Value = ""
T4C.Value = ""
T5C.Value = ""
T6.Value = ""
T7.Value = ""
T8.Value = ""
T9.Value = ""
T10.Value = ""
T6A.Value = ""
T7A.Value = ""
T8A.Value = ""
T9A.Value = ""
T10A.Value = ""
T6B.Value = ""
T7B.Value = ""
T8B.Value = ""
T9B.Value = ""
T10B.Value = ""
T6C.Value = ""
T7C.Value = ""
T8C.Value = ""
T9C.Value = ""
T10C.Value = ""
T11.Value = ""
T12.Value = ""
T13.Value = ""
T14.Value = ""
T15.Value = ""
T11A.Value = ""
T12A.Value = ""
T13A.Value = ""
T14A.Value = ""
T15A.Value = ""
T11B.Value = ""
T12B.Value = ""
T13B.Value = ""
T14B.Value = ""
T15B.Value = ""
T11C.Value = ""
T12C.Value = ""
T13C.Value = ""
T14C.Value = ""
T15C.Value = ""
T15Z.Value = ""
T16.Value = ""
T16B.Value = ""
T17.Value = ""
T17B.Value = ""
T18.Value = ""
End
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Range("B12").Value = TextBox1.Text
Range("B14").Value = TextBox2.Text
Range("B15").Value = TextBox3.Text
Range("E16").Value = TextBox4.Text
Range("C17").Value = TextBox5.Text
Range("F17").Value = TextBox6.Text
Range("L7").Value = TextBox8.Text
Range("L8").Value = TextBox9.Text
Range("L9").Value = TextBox7.Text
Range("A20").Value = TextBox10.Text
Range("A21").Value = TextBox20.Text
Range("A22").Value = TextBox19.Text
Range("A23").Value = TextBox18.Text
Range("A24").Value = TextBox17.Text
Range("A25").Value = TextBox16.Text
Range("A26").Value = TextBox15.Text
Range("A27").Value = TextBox14.Text
Range("A28").Value = TextBox13.Text
Range("E20").Value = TextBox21.Text
Range("E21").Value = TextBox30.Text
Range("E22").Value = TextBox29.Text
Range("E23").Value = TextBox28.Text
Range("E24").Value = TextBox27.Text
Range("E25").Value = TextBox26.Text
Range("E26").Value = TextBox25.Text
Range("E27").Value = TextBox24.Text
Range("E28").Value = TextBox23.Text
Range("F20").Value = TextBox41.Text
Range("F21").Value = TextBox40.Text
Range("F22").Value = TextBox39.Text
Range("F23").Value = TextBox38.Text
Range("F24").Value = TextBox37.Text
Range("F25").Value = TextBox36.Text
Range("F26").Value = TextBox35.Text
Range("F27").Value = TextBox34.Text
Range("F28").Value = TextBox33.Text
Range("G20").Value = TextBox74.Text
Range("G21").Value = TextBox73.Text
Range("G22").Value = TextBox72.Text
Range("G23").Value = TextBox71.Text
Range("G24").Value = TextBox70.Text
Range("G25").Value = TextBox69.Text
Range("G26").Value = TextBox68.Text
Range("G27").Value = TextBox67.Text
Range("G28").Value = TextBox66.Text
Range("H20").Value = TextBox85.Text
Range("H21").Value = TextBox84.Text
Range("H22").Value = TextBox83.Text
Range("H23").Value = TextBox82.Text
Range("H24").Value = TextBox81.Text
Range("H25").Value = TextBox80.Text
Range("H26").Value = TextBox79.Text
Range("H27").Value = TextBox78.Text
Range("H28").Value = TextBox77.Text
Range("I20").Value = TextBox96.Text
Range("I21").Value = TextBox95.Text
Range("I22").Value = TextBox94.Text
Range("I23").Value = TextBox93.Text
Range("I24").Value = TextBox92.Text
Range("I25").Value = TextBox91.Text
Range("I26").Value = TextBox90.Text
Range("I27").Value = TextBox89.Text
Range("I28").Value = TextBox88.Text
Range("J20").Value = TextBox107.Text
Range("J21").Value = TextBox106.Text
Range("J22").Value = TextBox105.Text
Range("J23").Value = TextBox104.Text
Range("J24").Value = TextBox103.Text
Range("J25").Value = TextBox102.Text
Range("J26").Value = TextBox101.Text
Range("J27").Value = TextBox100.Text
Range("J28").Value = TextBox99.Text
Range("K20").Value = TextBox120.Text
Range("K21").Value = TextBox129.Text
Range("K22").Value = TextBox128.Text
Range("K23").Value = TextBox127.Text
Range("K24").Value = TextBox126.Text
Range("K25").Value = TextBox125.Text
Range("K26").Value = TextBox124.Text
Range("K27").Value = TextBox123.Text
Range("K28").Value = TextBox122.Text
Range("G33").Value = TextBox118.Text
Range("G34").Value = TextBox117.Text
Range("G35").Value = TextBox116.Text
Range("G36").Value = TextBox115.Text
Range("G37").Value = TextBox114.Text
Range("G38").Value = TextBox113.Text
Range("G39").Value = TextBox112.Text
Range("G40").Value = TextBox111.Text
Range("G41").Value = TextBox110.Text
End Sub
Private Sub CommandButton2_Click()
TextBox1.SetFocus
Unload UserForm1
End Sub
----------kod bitir------
----------kod basla------
Sub MyCombination()
Dim x As Long, y As Long
Dim z As Long, w As Long
Dim Counter As Long
Dim Choice_Array
TotalNum = 13
Range("A2:E" & Application.Combin(TotalNum, 5) + 1).Clear
ReDim Choice_Array(1 To TotalNum)
For x = 1 To TotalNum
Choice_Array(x) = Cells(1, x)
Next x
For x = w + 1 To TotalNum - 2
For y = x + 1 To TotalNum - 1
For z = y + 1 To TotalNum
Counter = Counter + 1
Cells(i + 2, 1) = Choice_Array(x)
Cells(i + 2, 2) = Choice_Array(y)
Cells(i + 2, 3) = Choice_Array(z)
i = i + 1
Next z
Next y
Next x
End Sub
----------kod bitir------
----------kod basla------
Sub kontrol()
xsayfa1 = WorksheetFunction.CountA(Range("sayfa1!a2:a65536"))
xsayfa2 = WorksheetFunction.CountA(Range("sayfa2!a2:a65536"))
c = xsayfa2 + 1
ReDim al(xsayfa1, 3), kont(xsayfa2, 2), ekle(xsayfa1, 3)
For y = 1 To xsayfa2
For z = 1 To 2
kont(y, z) = Sheets("sayfa2").Cells(y + 1, z)
Next z
Next y
For y = 1 To xsayfa1
For z = 1 To 3
al(y, z) = Sheets("sayfa1").Cells(y + 1, z)
Next z
Var = 0
For t = 1 To xsayfa2
If al(y, 2) & al(y, 3) = kont(t, 1) & kont(t, 2) Then
Sheets("sayfa2").Cells(t + 1, 3) = al(y, 1)
Var = 1
End If
Next t
If Var = 0 Then
c = c + 1
Sheets("sayfa2").Cells(c, 1) = al(y, 2)
Sheets("sayfa2").Cells(c, 2) = al(y, 3)
Sheets("sayfa2").Cells(c, 3) = al(y, 1)
End If
Next y
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 1 To Cells(65536, 4).End(xlUp).Row
If WorksheetFunction.CountIf(Range("D1:D" & a), Cells(a, 4).Value) = 1 Then
c = c + 1
Sheets("MALT").Cells(c, 17) = Cells(a, 4).Value
End If
Next a
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
Sub hepsi()
Liste1
Liste2
Liste3
End Sub
Sub Liste1()
Sheets("FORMUL").Select
Range("A1").Select
Selection.AutoFilter
'-----------3. S�TUN 1 NOLU L�STE
Selection.AutoFilter Field:=3, Criteria1:="X"
Range("A2:B6000").Select
Selection.Copy
Sheets("LISTE1").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("FORMUL").Select
Range("A1").Select
Selection.AutoFilter
End Sub
Sub Liste2()
Sheets("FORMUL").Select
Range("A1").Select
Selection.AutoFilter
'-----------4. S�TUN 1 NOLU L�STE
Selection.AutoFilter Field:=4, Criteria1:="X"
Range("A2:B6000").Select
Selection.Copy
Sheets("LISTE2").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("FORMUL").Select
Range("A1").Select
Selection.AutoFilter
End Sub
Sub Liste3()
Sheets("FORMUL").Select
Range("A1").Select
Selection.AutoFilter
'-----------3. S�TUN 1 NOLU L�STE
Selection.AutoFilter Field:=5, Criteria1:="X"
Range("A2:B6000").Select
Selection.Copy
Sheets("LISTE3").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("FORMUL").Select
Range("A1").Select
Selection.AutoFilter
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Application.Calculation = xlAutomatic
Worksheets("Sheet1").OnCalculate = "CheckCells"
End Sub
Sub CheckCells()
Set RangeToFormat = Sheets("Sheet1").Range("CellsToCheck")
For Each cell In RangeToFormat
With cell
' Bo� h�creler renksiz
If IsEmpty(cell) Then
.Interior.ColorIndex = xlNone
' Say� girilen h�cre renkleri
ElseIf IsNumeric(cell.Value) Then
Select Case cell.Value
Case Is < 0
.Interior.Color = vbGreen
Case 0
.Interior.Color = vbYellow
Case Is > 0
.Interior.Color = vbMagenta
End Select
' Hatal� h�creler
ElseIf IsError(cell.Value) Then 'Hatal� h�cre rengi
.Interior.Color = vbRed
' Di�er h�creler (text)
Else
.Interior.ColorIndex = xlNone
End If
End With
Next cell
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub SayfaAc()
Workbooks("KRED�LER-L�STE.xls").Activate
Sheets("KRED�LER").Select
UserForm1.Show 0
End Sub
----------kod bitir------
----------kod basla------
Private Sub cmdarastir2_Click()
Dim satir As Integer
Dim nesne As Control
Sheets("KRED�LER").Select
If Not IsEmpty(myarray) Then Erase myarray
For Each nesne In Controls
If TypeName(nesne) = "TextBox" Then
If nesne.Value <> "" Then GoTo atla
End If
Next nesne
MsgBox "�nce arama kriterini girmelisiniz.", vbInformation, "Dikkat."
Exit Sub
atla:
Application.ScreenUpdating = False
ActiveSheet.Range("A10001:T65536").Clear
ActiveSheet.Range("a1:t1").Copy ActiveSheet.Range("A10001")
lsonuc2.Clear
With ActiveSheet
[C10002].Value = tkultarih21.Value
[D10002].Value = todtarih21.Value
End With
Range("A2").CurrentRegion.AdvancedFilter Action:=xlFilterCopy,
CriteriaRange:=Range( _
"A10001:T10002"), CopyToRange:=Range("A10005"), Unique:=False
satir = ActiveSheet.UsedRange.SpecialCells(xlLastCell).Row
lsonuc2.ColumnCount = 20
myarray = ActiveSheet.Range("A10005:T" & satir)
lsonuc2.List = myarray
ActiveSheet.Range("A10001:T65536").Clear
Application.ScreenUpdating = True
Sheets("Sayfa3").Select
Range("A1:T10000").Clear
For j = 1 To lsonuc2.ListCount
Cells(j, 1) = lsonuc2.List(j - 1, 0)
Cells(j, 2) = lsonuc2.List(j - 1, 1)
Cells(j, 3) = lsonuc2.List(j - 1, 2)
Cells(j, 4) = lsonuc2.List(j - 1, 3)
Cells(j, 5) = lsonuc2.List(j - 1, 4)
Cells(j, 6) = lsonuc2.List(j - 1, 5)
Cells(j, 7) = lsonuc2.List(j - 1, 6)
Cells(j, 8) = lsonuc2.List(j - 1, 7)
Cells(j, 9) = lsonuc2.List(j - 1, 8)
Cells(j, 10) = lsonuc2.List(j - 1, 9)
Cells(j, 11) = lsonuc2.List(j - 1, 10)
Cells(j, 12) = lsonuc2.List(j - 1, 11)
Cells(j, 13) = lsonuc2.List(j - 1, 12)
Cells(j, 14) = lsonuc2.List(j - 1, 13)
Cells(j, 15) = lsonuc2.List(j - 1, 14)
Cells(j, 16) = lsonuc2.List(j - 1, 15)
Cells(j, 17) = lsonuc2.List(j - 1, 16)
Cells(j, 18) = lsonuc2.List(j - 1, 17)
Cells(j, 19) = lsonuc2.List(j - 1, 18)
Cells(j, 20) = lsonuc2.List(j - 1, 19)
Next
'MsgBox "Bilgiler Forma Aktar�ld�.Formu G�rmek �stiyormusunuz?", vbOKCancel,
"FORM TAMAMLANDI..."
'If vbOKCancel = vbOK Then
'Sheets("Sayfa2").Select
'[A1].Select
'ElseIf vbOKCancel = vbCancel Then
'End If
Range("Sayfa4!J2").Formula = "=Sum(Sayfa3!J1:J10000)"
Range("Sayfa4!J2") = Format(Range("Sayfa4!J2"), "#,##0.00")
tanapara2.Value = Sheets("Sayfa4").Range("J2")
Range("Sayfa4!I2").Formula = "=Sum(Sayfa3!I1:h10000)"
Range("Sayfa4!I2") = Format(Range("Sayfa4!I2"), "#,##0.00")
ttaksittut2.Value = Sheets("Sayfa4").Range("I2")
Sheets("KRED�LER").Select
End Sub
Private Sub cmdkaydet2_Click()
ActiveCell(1, 5).Value = tpozisyon2.Value
MsgBox "De�i�iklik tamamlanm�t�r. Hadi hay�rl� i�ler", , "KAYIT"
End Sub
Private Sub cmdtemizle2_Click()
tkultarih21 = ""
tkultarih22 = ""
todtarih21 = ""
todtarih22 = ""
tpozisyon2 = ""
tanapara2 = ""
ttaksittut2 = ""
lsonuc2.Clear
End Sub
Private Sub cmdyazdir2_Click()
Sheets("Sayfa3").Select
UserForm1.Hide
ActiveWindow.SelectedSheets.PrintPreview
Sheets("KRED�LER").Select
UserForm1.Show 0
End Sub
Private Sub cmdkapat2_Click()
Unload UserForm1
[A1].Select
End Sub
Private Sub lsonuc2_Click()
Dim bak As Range
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A10000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(lsonuc2.Value, vbUpperCase) Then
bak.Select
tpozisyon2.Value = ActiveCell.Offset(0, 4).Value
Exit Sub
End If
Next bak
MsgBox "Arad���n�z VER� bulunamad�"
End Sub
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub SayfaAc()
Workbooks("KRED�LER-L�STE.xls").Activate
Sheets("KRED�LER").Select
UserForm1.Show 0
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show 0
End Sub
----------kod bitir------
----------kod basla------
Private Sub cmdarastir2_Click()
Range("ax2:bq65536").ClearContents
lsonuc2.ColumnCount = 20
lsonuc2.ColumnHeads = True
lsonuc2.ColumnWidths =
"30;55;60;65;40;30;80;60;65;60;60;60;60;70;60;60;60;25;60;60"
say = WorksheetFunction.CountA(Sheets("KRED�LER").[c2:c65536]) + 1
c = 0
For a = 2 To say
kul = Sheets("KRED�LER").Cells(a, 3).Value
ode = Sheets("KRED�LER").Cells(a, 4).Value
If kul >= CDate(tkultarih21.Value) And kul <= CDate(tkultarih22.Value) And ode >=
CDate(todtarih21.Value) And ode <= CDate(todtarih22.Value) Then
c = c + 1
For b = 1 To 20
Sheets("KRED�LER").Cells(c + 1, b + 49) = Sheets("KRED�LER").Cells(a, b).Value
Next b
End If
Next a
adres = "KRED�LER!ax2:bq" & c + 1
lsonuc2.RowSource = adres
End Sub
Private Sub cmdkaydet2_Click()
ActiveCell(1, 5).Value = tpozisyon2.Value
MsgBox "De�i�iklik tamamlanm�t�r. Hadi hay�rl� i�ler", , "KAYIT"
End Sub
Private Sub cmdtemizle2_Click()
tkultarih21 = ""
tkultarih22 = ""
todtarih21 = ""
todtarih22 = ""
tpozisyon2 = ""
tanapara2 = ""
ttaksittut2 = ""
lsonuc2.Clear
End Sub
Private Sub cmdyazdir2_Click()
Sheets("Sayfa3").Select
UserForm1.Hide
ActiveWindow.SelectedSheets.PrintPreview
Sheets("KRED�LER").Select
UserForm1.Show 0
End Sub
Private Sub cmdkapat2_Click()
Unload UserForm1
[A1].Select
End Sub
Private Sub lsonuc2_Click()
Dim bak As Range
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A10000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(lsonuc2.Value, vbUpperCase) Then
bak.Select
tpozisyon2.Value = ActiveCell.Offset(0, 4).Value
Exit Sub
End If
Next bak
MsgBox "Arad���n�z VER� bulunamad�"
End Sub
Private Sub tkultarih21_Exit(ByVal Cancel As MSForms.ReturnBoolean)
tkultarih21 = Format(tkultarih21, "dd.mm.yyyy")
End Sub
Private Sub tkultarih22_Exit(ByVal Cancel As MSForms.ReturnBoolean)
tkultarih22 = Format(tkultarih22, "dd.mm.yyyy")
End Sub
Private Sub todtarih21_Exit(ByVal Cancel As MSForms.ReturnBoolean)
todtarih21 = Format(todtarih21, "dd.mm.yyyy")
End Sub
Private Sub todtarih22_Exit(ByVal Cancel As MSForms.ReturnBoolean)
todtarih22 = Format(todtarih22, "dd.mm.yyyy")
End Sub
----------kod bitir------
----------kod basla------
'Option Explicit
Public kayitno As String
Public toplam As Double
Dim xxx As Boolean
Public GCBGOSTER As Boolean
Private Sub ListBox2_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) 'ENTERLA
If KeyAscii = 13 Then Unload KrediEkle: KrediEkle.Show
End Sub
Private Sub Normal_Mod_Click() 'S�ZMEDEN �IK-KAYIT NO TUTARAK ?????????
If Me.ListBox1.ListIndex > -1 Then kayitno = Me.ListBox1.Value
'????????????????????????????**
ComboBox1.Value = "": ComboBox2.Value = "": ComboBox3.Value = ""
Sheets("data").Select
userAyar
End Sub
Private Sub YeniKrediEkle_Click() 'Tabloda bo� sat�r se�erek kontrol� KrediEkle
userformuna ge�irir
Normal_Mod_Click
'ListBox1.Selected(Sheets("data").Cells(65536, 1).End(xlUp).Row - 1) = True
KrediEkle.Show
End Sub
Private Sub CommandButton5_Click() 'KAYDET VE �IK
Application.ScreenUpdating = False: ActiveWorkbook.Save: ActiveWorkbook.Close
End Sub
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) 'KRED�
KAYDINDA DE����KL�K ���N ��FT TIKLA
Unload KrediEkle: KrediEkle.Show
End Sub
Private Sub CommandButton4_Click() 'EXCEL'E G�T VE USERFORMU KAPAT
Application.Visible = True: Unload Me
End Sub
Private Sub ListBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) 'ENTERLA
DETAYA G�R
If KeyAscii = 13 Then Unload KrediEkle: KrediEkle.Show
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
'USERFORMDAK� �ARPI ��ARET�N� ��LEVS�Z YAP
If CloseMode <> 1 Then Cancel = True
End Sub
Private Sub UserForm_Initialize()
Sheets("data").Select
'USERFORMU TAM EKRAN YAP
With Application
.WindowState = xlMaximized
Zoom = Int(.Width / Me.Width * 100)
Width = .Width
Height = .Height
End With
'SON USERFORMU TAM EKRAN YAP
userAyar
combodoldur
End Sub
Sub userAyar()
Dim Kacsatir As Integer
Kacsatir = Sheets("data").Cells(65536, 1).End(xlUp).Row + 1
ListBox1.ColumnCount = 11
ListBox1.RowSource = "data!A2:K" & Kacsatir
ListBox1.ColumnWidths = "26,55;55;60;59;65;59;59;59;65;100"
ListBox1.ColumnHeads = True
Me.ListBox1.Selected(Sheets("data").Cells(65536, 1).End(xlUp).Row - 1) = True
GCBGOSTER = True
End Sub
Sub combodoldur()
ComboBox1.RowSource = "bilgi!F�RMA"
ComboBox2.RowSource = "bilgi!BANKA"
ComboBox3.RowSource = "bilgi!DURUM"
End Sub
Private Sub ListBox1_Click() 'Listbox1(b�y�k)'de se�ti�imiz sat�ra g�re Listbox2'yi
doldurur
Listbox2.Clear
If GCBGOSTER = False Then Exit Sub
Dim sat, k, m As Integer
Dim gcbler(20, 3)
Dim ara
Dim d
Dim nere
Label3.BackColor = vbGreen
TextBox1.BackColor = vbWhite
k = 12
m = 0
toplam = 0
ara = ListBox1.List(ListBox1.ListIndex, 0)
If WorksheetFunction.CountIf(ActiveSheet.Columns(1), ara) > 0 Then
With ActiveSheet.Columns(1)
sat = .Find(What:=ara, LookAt:=xlWhole).Row
End With
End If
If IsEmpty(sat) Then
TextBox1.Value = ""
TextBox2.Value = ""
GoTo SON
End If
For k = 3 To 13
Worksheets("DOKUM").Cells(i, k) = Worksheets("data").Cells(j, k - 2)
Worksheets("DOKUM").Cells(i, k).Font.Bold = True
Worksheets("DOKUM").Cells(i, k).Interior.ColorIndex = 15
Worksheets("DOKUM").Cells(i, k).Borders.LineStyle = xlContinuous
Next k
Do While Worksheets("data").Cells(j, m) <> ""
Worksheets("DOKUM").Cells(i + 1, 13) = Worksheets("data").Cells(j, m)
Worksheets("DOKUM").Cells(i + 1, 12) = Worksheets("data").Cells(j, m + 1)
Worksheets("DOKUM").Cells(i + 1, 8) = Worksheets("data").Cells(j, m + 2)
i = i + 1
m = m + 3
Loop
i = i + 2
j = j + 1
m = 15
700
Loop
Worksheets("DOKUM").Select
Columns("C:C").ColumnWidth = 10
Columns("D:D").ColumnWidth = 12
Columns("E:E").ColumnWidth = 15
Columns("F:F").ColumnWidth = 12
Columns("G:H").ColumnWidth = 15
Columns("I:L").ColumnWidth = 10
Columns("I:L").NumberFormat = "d-mm-yy"
Columns("G:H").NumberFormat = "#,##0.00"
500
Sheets("suz").Activate
If Sheets("suz").Cells(65536, 1).End(xlUp).Row > 2 Then GCBGOSTER = True 'S�z
sayfas�nda veri yoksa GCBGOSTER� a�mas�n
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Public toplam As Double
Dim xxx As Boolean
Private Sub CommandButton1_Click() 'Anamenuye d�n
Unload Me: End Sub
Private Sub CommandButton6_Click() 'YAZICI
Me.PrintForm: End Sub
Private Sub t1_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'tarih ��k�
If IsDate(t1.Value) Then
t1.Value = Format(t1.Value, "dd.mm.yyyy")
ElseIf t1.Value = "" Then Exit Sub
Else: xxx = MsgBox("Ge�erli bir tarih giriniz", vbCritical, "danersin"): Cancel =
True
End If: End Sub
Private Sub f1_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'miktardan ��k�
If f1.Value <> "" And IsNumeric(f1.Value) = False Then
Cancel = True: End If
f1.Value = Format(f1.Value, "##,##.00")
End Sub
Private Sub tTaah_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'TAAHH�T M�KTARINDAN
If IsNumeric(tTaah.Value) Then
tTaah.Value = Format(tTaah.Value, "##,###.00")
ElseIf tTaah.Value = "" Then Exit Sub
Else: xxx = MsgBox("Ge�erli bir taahh�t miktar� gir", vbCritical, "danersin"):
tTaah.Value = ""
End If: End Sub
Private Sub tKulTar_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'KULLANIM
TAR�H�NDEN �IKI�
If IsDate(tKulTar.Value) Then
tKulTar.Value = Format(tKulTar.Value, "dd.mm.yyyy")
ElseIf tKulTar.Value = "" Then Exit Sub
Else: xxx = MsgBox("Ge�erli bir tarih giriniz", vbCritical, "danersin"): Cancel =
True
End If: End Sub
Private Sub tKapTar_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'KAPAMA TAR�H�NDEN
�IKI�
If IsDate(tKapTar.Value) Then
tKapTar.Value = Format(tKapTar.Value, "dd.mm.yyyy")
ElseIf tKapTar.Value = "" Then Exit Sub
Else: xxx = MsgBox("Ge�erli bir tarih giriniz", vbCritical, "danersin"): Cancel =
True
End If: End Sub
Private Sub tTahVad_Exit(ByVal Cancel As MSForms.ReturnBoolean) 'TAAHH�T TAR�H�NDEN
�IKI�
If tTahVad.Value = "" Then tTahVad.Value = tKapTar.Value
tTahVad.Value = Format(tTahVad.Value, "dd.mm.yyyy")
End Sub
Private Sub tTutar_Exit(ByVal Cancel As MSForms.ReturnBoolean)
tTutar.Value = Format(tTutar.Value, "##,###.00")
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer) '�ARPI
��ARET�N� ��LEVS�Z YAP
If CloseMode <> 1 Then Cancel = True
End Sub
Private Sub ListBox2_Click() 'G�B L�STBOXINDA SE��LEN� TEXTBOXLARA AL
If Listbox2.List(Listbox2.ListIndex) = "" Then
CommandButton4.Visible = False: CommandButton5.Visible = False:
CommandButton3.Visible = True
Else: CommandButton4.Visible = True: CommandButton5.Visible = True:
CommandButton3.Visible = False
End If
g1.Value = Listbox2.Value
t1.Value = Format(Listbox2.List(Listbox2.ListIndex, 1), "dd.mmm.yyyy")
f1.Value = Format(Listbox2.List(Listbox2.ListIndex, 2), "##,##.00")
End Sub
Private Sub UserForm_Initialize()
cFirma.RowSource = "bilgi!F�RMA": cBanka.RowSource = "bilgi!BANKA":
cDurum.RowSource = "bilgi!DURUM"
tKno.Value = Sheets("data").Range("A:A").Find(What:=Anamenu.ListBox1.Value,
LookAt:=xlWhole) '�y�k tabloda bo� bir sat�r t�klanarak gelindi ise datan�n son
sat�r�na
If tKno.Value = "" Then
tKno.Value = Application.WorksheetFunction.Max(Sheets("data").Columns(1).Value) + 1
'tKno.Value = Sheets("data").Cells(65536, 1).End(xlUp).Row
End If
cFirma.Value = Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 1)
tRef.Value = Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 2)
cBanka.Value = Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 3)
tTutar.Value = Format(Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 4),
"##,##.00")
tTaah.Value = Format(Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 5),
"##,##.00")
tKulTar.Value = Format(Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 6),
"dd.mm.yyyy")
tKapTar.Value = Format(Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 7),
"dd.mm.yyyy")
tTahVad.Value = Format(Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 8),
"dd.mm.yyyy")
cDurum.Value = Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 9)
tNot.Value = Anamenu.ListBox1.List(Anamenu.ListBox1.ListIndex, 10)
'TABLOYU OLU�TUR
Dim k, m As Integer
Dim nere As Object, sat As Integer
Dim gcbler(19, 3)
Dim toplam As Double
Label3.BackColor = vbGreen
TextBox1.BackColor = vbWhite
TextBox1.ForeColor = vbGreen
k = 12
m = 0
toplam = 0
'data sayfas�nda ilgili sat�r�n ilk s�tunu bo� ise G�B giri� kontrollerini gizle ve
sub� bitir
----------kod bitir------
----------kod basla------
Option Explicit
Sub auto_open()
'Application.ScreenUpdating = False
Anamenu.Show
End Sub
Sub DokumdenDon()
Application.ScreenUpdating = False: Call auto_open
End Sub
Sub DatadanDon()
Application.ScreenUpdating = False: Call auto_open
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
kay�t = WorksheetFunction.CountA(Sayfa1.[b2:b65536]) + 2
aranan = [d1].Value
c = 0
For sat = 2 To kay�t
If aranan = Sayfa1.Cells(sat, 2).Value Then
c = c + 1
Cells(c + 2, 2) = c
Cells(c + 2, 7) = Sayfa1.Cells(sat, 5).Value
Cells(c + 2, 5) = Sayfa1.Cells(sat, 14).Value
Cells(c + 2, 4) = Sayfa1.Cells(sat, 29).Value & "-" & Sayfa1.Cells(sat, 30).Value
Cells(c + 2, 8) = Sayfa1.Cells(sat, 47).Value
Cells(c + 2, 10) = Sayfa1.Cells(sat, 48).Value
End If
Next sat
End Sub
----------kod bitir------
----------kod basla------
Sub a�()
UserForm4.Show
End Sub
----------kod bitir------
----------kod basla------
Sub Makro5()
'
' Makro5 Makro
' Makro uuuu taraf�ndan 19.03.2005 tarihinde kaydedildi.
'
'
Selection.AutoFilter Field:=4, Criteria1:="Bekir"
Range("D8").Select
Selection.AutoFilter Field:=all
Range("E10").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Click()
Rows(1).AutoFilter Field:=1, Criteria1:=ComboBox1.Value
End Sub
Private Sub ComboBox2_Click()
Rows(1).AutoFilter Field:=2, Criteria1:=ComboBox2.Value
End Sub
Private Sub ComboBox3_Click()
Rows(1).AutoFilter Field:=3, Criteria1:=ComboBox3.Value
End Sub
Private Sub ComboBox4_Click()
Rows(1).AutoFilter Field:=4, Criteria1:=ComboBox4.Value
End Sub
Private Sub ComboBox5_Click()
Rows(1).AutoFilter Field:=5, Criteria1:=ComboBox5.Value
End Sub
Private Sub ComboBox6_Click()
Rows(1).AutoFilter Field:=6, Criteria1:=ComboBox6.Value
End Sub
Private Sub ComboBox7_Click()
Rows(1).AutoFilter Field:=7, Criteria1:=ComboBox7.Value
End Sub
Private Sub ComboBox8_Click()
Rows(1).AutoFilter Field:=8, Criteria1:=ComboBox8.Value
End Sub
Private Sub ComboBox9_Click()
Rows(1).AutoFilter Field:=9, Criteria1:=ComboBox9.Value
End Sub
Private Sub ComboBox10_Click()
Rows(1).AutoFilter Field:=10, Criteria1:=ComboBox10.Value
End Sub
Private Sub CommandButton1_Click()
toplam = WorksheetFunction.Subtotal(3, [a1:a65536])
If toplam = 1 Then
MsgBox ("BU KR�TERLERE UYGUN VER� BULUNAMADI")
Exit Sub
End If
[BE1:BM65536].ClearContents
Range("A1:J0" & toplam + 3).Copy
[BE1].PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
[a1].Select
adres = "Sayfa1!BE2:BM" & toplam
ListBox1.ColumnCount = 10
ListBox1.ColumnHeads = True
ListBox1.ColumnWidths = "65;65;48;48;48;55;65;65;35;35"
ListBox1.RowSource = adres
End Sub
Private Sub CommandButton2_Click()
Rows(1).AutoFilter
For ss = 1 To 10
Controls("combobox" & ss).Value = ""
Next ss
ListBox1.RowSource = ""
Rows(1).AutoFilter
End Sub
Private Sub UserForm_Initialize()
Rows(1).AutoFilter
a = WorksheetFunction.CountA(Sheets("Sayfa1").Range("A:A"))
For i = 1 To 53
For aa = 2 To a
Controls("Combobox" & i).AddItem Sheets("Sayfa1").Cells(aa, i).Value
Next aa
Next i
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Rows(1).AutoFilter
End Sub
----------kod bitir------
----------kod basla------
Sub a�()
UserForm4.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 10 To 1 Step -1
deg = Controls("Combobox" & a).Value
If deg <> "" Then
For sat = 1 To WorksheetFunction.CountA(Columns(a))
If a = 1 Then deg = deg * 1
If Cells(sat, a).Value = deg Then
ba�l�k = Controls("label" & a).Caption
ad = "ad�-soyad�: " & Cells(sat, 3).Value & " " & Cells(sat, 2).Value
babaad� = "baba ad�: " & Cells(sat, 4).Value
mesaj = ba�l�k & vbCrLf & ad & vbCrLf & babaad� & vbCrLf & " " & vbCrLf & mesaj
End If
Next sat
End If
Next a
MsgBox (mesaj)
End Sub
Private Sub UserForm_Initialize()
a = WorksheetFunction.CountA(Sheets("Sayfa1").Range("A:A"))
For i = 1 To 53
For aa = 1 To a
Controls("Combobox" & i).AddItem Sheets("Sayfa1").Cells(aa, i).Value
Next aa
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub ddd()
'
' ddd Makro
' Makro Serdar USLULAR taraf�ndan 09.07.2001 tarihinde kaydedildi.
'
'
Columns("D:D").Select
Range("D7").Activate
Selection.Replace What:=",", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
Range("D41").Select
ActiveCell.FormulaR1C1 = "=+R[-29]C/R[-32]C"
Columns("D:D").Select
Range("D7").Activate
Selection.NumberFormat = "#,##0.00"
Range("D41").Select
Selection.NumberFormat = "#,##0.0000"
End Sub
----------kod bitir------
----------kod basla------
Sub yenile()
'
' yenile Macro
' Macro recorded 22.10.2001 by suslular
'
'
Sheets("�mk").Select
Range("A7:A8").Select
Range("A8").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("d�").Select
Range("A1:A2").Select
Range("A1").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("merkez").Select
Range("A1:A2").Select
Range("A1").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("repo").Select
Range("A4:A5").Select
Range("A4").Activate
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("ex�m").Select
Range("e1:e1").Select
Range("e1").Activate
Selection.QueryTable.Refresh
BackgroundQuery:=False
Sheets("kurweb").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro6()
'
' Makro6 Makro
' Makro Serdar USLULAR taraf�ndan 17.09.2001 tarihinde kaydedildi.
'
'
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.QueryTable.Refresh BackgroundQuery:=False
Sheets("ex�m").Select
Selection.QueryTable.Refresh BackgroundQuery:=False
Selection.QueryTable.Refresh BackgroundQuery:=False
Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime")
Sheets("merkez").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Serdar USLULAR taraf�ndan 18.09.2001 tarihinde kaydedildi.
'
'
MsgBox "merhaba SAKLAMAK �STERM�S�N�Z", vbOKCancel
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub Matrah()
Sheets("Sayfa1").Select
Range("a1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Value = ActiveCell.Value + Sheets("Sayfa1").Range("a1").Value
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
'
' Makro2 Makro
' Makro �nder ABA� taraf�ndan 27.04.2004 tarihinde kaydedildi.
'
'
Range("C7:C12,C18:C90").Select
Range("C18").Activate
Selection.ClearContents
Selection.ClearContents
ActiveWindow.ScrollRow = 1
Range("C7").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
'
' Makro2 Makro
' Makro �nder ABA� taraf�ndan 27.04.2004 tarihinde kaydedildi.
'
'
Range("C7:C12,C18:C90").Select
Range("C18").Activate
Selection.ClearContents
Selection.ClearContents
ActiveWindow.ScrollRow = 1
Range("C7").Select
End Sub
----------kod bitir------
----------kod basla------
Sub sirano()
met = Mid([a1].Value, 1, 58)
For b = 2 To 100
Cells(b, 1).Hyperlinks.Add Anchor:=Cells(b, 1), Address:=met & b & ".zip"
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
For i = 1 To Cells(65536, 2).End(xlUp).Row
If WorksheetFunction.CountIf(Range("B1:B" & i), Cells(i, 2).Value) = 1 Then
ListBox1.AddItem (Sayfa1.Range("b" & i).Value)
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Sub deneme()
'
'
' yard�mlar�n�z i�in te�ekk�rler
'
End Sub
----------kod bitir------
----------kod basla------
Sub mesaj()
MsgBox ("benimi �a��rd�n�z")
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ListBox1_Click()
On Error Resume Next
sat = Sheets("sayfa1").Range("A:A").Find(ListBox1.Value).Row
Range("B" & sat, "F" & sat).Copy
Range("H1").PasteSpecial , , , True
[j1].Select
Application.CutCopyMode = False
ListBox2.RowSource = "sayfa1!H1:H5"
End Sub
Private Sub UserForm_Initialize()
ListBox1.RowSource = "sayfa1!A1:A20"
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Enter()
Label1 = 1
End Sub
Private Sub CommandButton1_Click()
UserForm2.Show
End Sub
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "sayfa1!A1:A10"
ComboBox2.RowSource = "sayfa1!B1:B10"
End Sub
Private Sub ComboBox2_Enter()
Label1 = 2
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
If UserForm1.Label1 = 1 Then ListBox1.RowSource = "sayfa1!A1:A10"
If UserForm1.Label1 = 2 Then ListBox1.RowSource = "sayfa1!B1:B10"
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ListBox1_Click()
On Error Resume Next
sat = Sheets("sayfa1").Range("A:A").Find(ListBox1.Value).Row
b = "sayfa1!B" & sat & ":F" & sat
ListBox2.RowSource = b
ListBox2.ColumnWidths = "20;20;20;20;20"
End Sub
Private Sub UserForm_Initialize()
ListBox1.RowSource = "sayfa1!A1:A20"
End Sub
----------kod bitir------
----------kod basla------
Sub a()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "sayfa1!A1:A10" 'combobox1'e sayfa1 deki A1:A10 aral���ndaki
de�erleri atar
ListBox1.RowSource = "sayfa1!A2:B10" 'listbox1'e sayfa1 deki A2:B10 aral���ndaki
de�erleri atar
ListBox1.ColumnHeads = True 'listboxta s�tun ba�l�klar�n� g�r�n�r hale getirir
burada ba�l�k A1:B1 aral���d�r.
ListBox1.ColumnCount = 2 's�tun say�s�-ka� veri varsa o kadar s�tun a��lmal�d�r
ListBox1.ColumnWidths = "40;40" 'a��lan s�tunlar�n geni�likleri.
End Sub
----------kod bitir------
----------kod basla------
Sub sayfasec()
sayfasecform.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Sheets(ListBox1.List(ListBox1.ListIndex)).Select
End
End Sub
Private Sub UserForm_Activate()
kacsayfa = Sheets.Count
For x = 1 To kacsayfa
ListBox1.AddItem Sheets.Item(x).Name
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
On Error Resume Next
ListBox1.Clear
ListBox1.RowSource = ""
Dim myArray3()
Dim say As Integer
say = WorksheetFunction.CountA(Range("a1:a5000"))
ReDim myArray3(say, 6)
ListBox1.ColumnCount = 6
ListBox1.ColumnWidths = "30 pt;120pt;50 pt;50 pt;50 pt;50 pt"
Dim i As Range, ay As String
Dim a, B, satir As Integer
ay = ComboBox1.Text
For Each i In Sheets("Sayfa1").Range("c2:c5000")
If LCase(i.Value) = LCase(ay) Then
satir = i.Row
For B = 0 To 6
myArray3(a, B) = Worksheets("Sayfa1").Cells(satir, B + 1)
Next
a = a + 1
End If
Next
cc = WorksheetFunction.CountIf(Sheets("sayfa1").Range("C2:C65000"),
ComboBox1.Value)
ListBox1.Height = 12.75 * cc
ListBox1.List = myArray3
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For i = 1 To Cells(65536, 2).End(xlUp).Row
If Cells(i, 3) = CInt(TextBox1.Value) Then
c = c + 1
Cells(c, 4) = Cells(i, 2).Value
End If
Next
For k = 1 To Cells(65536, 4).End(xlUp).Row
If WorksheetFunction.CountIf(Range("D1:D" & k), Cells(k, 4).Value) = 1 Then
UserForm1.ListBox1.AddItem (Sayfa1.Range("d" & k).Value)
End If
Next
Columns(4).ClearContents
End Sub
Private Sub TextBox1_Enter()
ListBox1.Clear
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
For i = 1 To Cells(65536, 2).End(xlUp).Row
If WorksheetFunction.CountIf(Range("B1:B" & i), Cells(i, 2).Value) = 1 Then
ListBox1.AddItem (Sayfa1.Range("b" & i).Value)
End If
Next
End Sub
----------kod bitir------
----------kod basla------
'
Range("G6:Z7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
Range("B15:C20").Select
Selection.ClearContents
Range("D15:L29").Select
Selection.ClearContents
Range("M15:V29").Select
Selection.ClearContents
Range("W16:Z29").Select
Selection.ClearContents
Sheets("�kinci").Select
Range("G6:X7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=12
Range("B16:Z29").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-3
Application.CommandBars("Stop Recording").Visible = False
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub menu()
Application.Run "liste1toplaliste2.xls!tarih_tek_bul"
Application.Run "liste1toplaliste2.xls!cinsi_tek_bul"
End Sub
Sub tarih_tek_bul()
Dim AllCells As Range, Cell As Range
Dim NoDupes As New Collection
Dim i As Integer, j As Integer
Dim Swap1, Swap2, Item
Next Item
End Sub
Sub cinsi_tek_bul()
Dim AllCells As Range, Cell As Range
Dim NoDupes As New Collection
Dim i As Integer, j As Integer
Dim Swap1, Swap2, Item
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro aserxp taraf�ndan 26.04.2005 tarihinde kaydedildi.
'
'
Application.Run "liste1toplaliste2.xls!tarih_tek_bul"
End Sub
----------kod bitir------
----------kod basla------
Private Sub MultiPage1_Change()
End Sub
End Sub
ListBox2.ColumnHeads = True
ListBox2.ColumnCount = 6
End Sub
----------kod bitir------
----------kod basla------
Sub listeyakala()
For i = 1 To 20
dosya = "c:\teka1\vvv\" + Cells(i, 1).Value
Workbooks.Open dosya
Application.DisplayAlerts = False
Workbooks(Dir(dosya)).Close
Application.DisplayAlerts = True
'MsgBox dosya + " bitti"
Windows(1).Activate
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim gunleri(36)
bolum = Cells(1, 7)
hoca = Cells(3, 7)
hgun = Application.WorksheetFunction.Weekday(Cells(1, 25))
Range("dersler").ClearContents
Range("gunler").ClearContents
i = 2
k = 15
Do While Cells(i, 32) <> ""
If Cells(i, 32) = hoca And Trim(Cells(i, 39)) = Trim(bolum) Then
Cells(k, 2) = Cells(i, 31)
Cells(k, 4) = Cells(i, 33)
Cells(k, 13) = Cells(i, 34)
Cells(k, 15) = Cells(i, 35)
Cells(k, 17) = Cells(i, 36)
Cells(k, 19) = Cells(i, 37)
Cells(k, 21) = Cells(i, 38)
Cells(k, 23) = Cells(i, 39)
k = k + 1
End If
i = i + 1
Loop
Cells(1, 1) = gun
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim gunleri(36)
bolum = Cells(1, 7)
hoca = Cells(3, 7)
hgun = Application.WorksheetFunction.Weekday(Cells(1, 25))
Range("dersler").ClearContents
Range("gunler").ClearContents
i = 2
k = 15
Do While Cells(i, 32) <> ""
If Cells(i, 32) = hoca And Trim(Cells(i, 39)) = Trim(bolum) Then
Cells(k, 2) = Cells(i, 31)
Cells(k, 4) = Cells(i, 33)
Cells(k, 13) = Cells(i, 34)
Cells(k, 15) = Cells(i, 35)
Cells(k, 17) = Cells(i, 36)
Cells(k, 19) = Cells(i, 37)
Cells(k, 21) = Cells(i, 38)
Cells(k, 23) = Cells(i, 39)
k = k + 1
End If
i = i + 1
Loop
Cells(1, 1) = gun
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim gunleri(36)
bolum = Cells(1, 7)
hoca = Cells(3, 7)
hgun = Application.WorksheetFunction.Weekday(Cells(1, 25))
Range("dersler").ClearContents
Range("gunler").ClearContents
i = 2
k = 15
Do While Cells(i, 32) <> ""
If Cells(i, 32) = hoca And Trim(Cells(i, 39)) = Trim(bolum) Then
Cells(k, 2) = Cells(i, 31)
Cells(k, 4) = Cells(i, 33)
Cells(k, 13) = Cells(i, 34)
Cells(k, 15) = Cells(i, 35)
Cells(k, 17) = Cells(i, 36)
Cells(k, 19) = Cells(i, 37)
Cells(k, 21) = Cells(i, 38)
Cells(k, 23) = Cells(i, 39)
k = k + 1
End If
i = i + 1
Loop
Cells(1, 1) = gun
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim gunleri(36)
'bolum = Cells(1, 7)
hoca = Cells(3, 7)
hgun = Application.WorksheetFunction.Weekday(Cells(1, 25))
Range("dersler").ClearContents
Range("gunler").ClearContents
i = 2
k = 15
Do While Cells(i, 32) <> ""
If Cells(i, 32) = hoca Then
Cells(k, 2) = Cells(i, 31)
Cells(k, 4) = Cells(i, 33)
Cells(k, 13) = Cells(i, 34)
Cells(k, 15) = Cells(i, 35)
Cells(k, 17) = Cells(i, 36)
Cells(k, 19) = Cells(i, 37)
Cells(k, 21) = Cells(i, 38)
Cells(k, 23) = Cells(i, 39)
k = k + 1
End If
i = i + 1
Loop
Cells(1, 1) = gun
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim gunleri(36)
'bolum = Cells(1, 7)
hoca = Cells(3, 7)
hgun = Application.WorksheetFunction.Weekday(Cells(1, 25))
Range("dersler").ClearContents
Range("gunler").ClearContents
i = 2
k = 15
Do While Cells(i, 32) <> ""
If Cells(i, 32) = hoca Then
Cells(k, 2) = Cells(i, 31)
Cells(k, 4) = Cells(i, 33)
Cells(k, 13) = Cells(i, 34)
Cells(k, 15) = Cells(i, 35)
Cells(k, 17) = Cells(i, 36)
Cells(k, 19) = Cells(i, 37)
Cells(k, 21) = Cells(i, 38)
Cells(k, 23) = Cells(i, 39)
k = k + 1
End If
i = i + 1
Loop
Cells(1, 1) = gun
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim gunleri(36)
'bolum = Cells(1, 7)
hoca = Cells(3, 7)
hgun = Application.WorksheetFunction.Weekday(Cells(1, 25))
Range("dersler").ClearContents
Range("gunler").ClearContents
i = 2
k = 15
Do While Cells(i, 32) <> ""
If Cells(i, 32) = hoca Then
Cells(k, 2) = Cells(i, 31)
Cells(k, 4) = Cells(i, 33)
Cells(k, 13) = Cells(i, 34)
Cells(k, 15) = Cells(i, 35)
Cells(k, 17) = Cells(i, 36)
Cells(k, 19) = Cells(i, 37)
Cells(k, 21) = Cells(i, 38)
Cells(k, 23) = Cells(i, 39)
k = k + 1
End If
i = i + 1
Loop
Cells(1, 1) = gun
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Dim gunleri(36)
bolum = Cells(1, 7)
hoca = Cells(3, 7)
hgun = Application.WorksheetFunction.Weekday(Cells(1, 25))
Range("dersler").ClearContents
Range("gunler").ClearContents
i = 2
k = 15
Do While Sheets("Data").Cells(i, 4) <> ""
If Sheets("Data").Cells(i, 4) = hoca Then
Cells(k, 2) = Sheets("Data").Cells(i, 3)
Cells(k, 4) = Sheets("Data").Cells(i, 5)
Cells(k, 13) = Sheets("Data").Cells(i, 6)
Cells(k, 15) = Sheets("Data").Cells(i, 7)
Cells(k, 17) = Sheets("Data").Cells(i, 8)
Cells(k, 19) = Sheets("Data").Cells(i, 9)
Cells(k, 21) = Sheets("Data").Cells(i, 10)
Cells(k, 23) = Sheets("Data").Cells(i, 11)
End If
'b�l�mdeki ders saatlerini toplar SON
k = k + 1
End If
i = i + 1
Loop
Cells(1, 1) = gun
End Sub
----------kod bitir------
----------kod basla------
Sub listed�zelt()
Columns("B").ClearContents
a = WorksheetFunction.CountA(Sheets("sayfa1").Range("A1:A65536"))
[b1] = "DEF MAC K1"
d = 0
For b = 1 To a
c = WorksheetFunction.CountA(Sheets("sayfa1").Range("B1:B65536"))
Cells(c + 1, 2) = ":K " & Right(Cells(b, 1), 7)
If c = 100 Then
d = 1
Cells(c + 1 + d, 2) = "EM"
Cells(c + 2 + d, 2) = "DEF MAC K2"
End If
Next b
Cells(c + 1, 2) = "EM"
End Sub
----------kod bitir------
----------kod basla------
Private Sub MultiPage1_Change()
End Sub
End Sub
ListBox2.ColumnHeads = True
ListBox2.ColumnCount = 6
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
For a = 1 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("A1:A" & a), Cells(a, 1).Value) = 1 Then
c = c + 1
Sheets("sayfa2").Cells(c, 1) = Cells(a, 1).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Windows taraf�ndan 28.10.2004 tarihinde kaydedildi.
'
'
Range("G6:Z7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
Range("B15:C20").Select
Selection.ClearContents
Range("D15:L29").Select
Selection.ClearContents
Range("M15:V29").Select
Selection.ClearContents
Range("W16:Z29").Select
Selection.ClearContents
Sheets("�kinci").Select
Range("G6:X7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=12
Range("B16:Z29").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-3
Application.CommandBars("Stop Recording").Visible = False
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Windows taraf�ndan 28.10.2004 tarihinde kaydedildi.
'
'
Range("G6:Z7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
Range("B15:C20").Select
Selection.ClearContents
Range("D15:L29").Select
Selection.ClearContents
Range("M15:V29").Select
Selection.ClearContents
Range("W16:Z29").Select
Selection.ClearContents
Sheets("�kinci").Select
Range("G6:X7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=12
Range("B16:Z29").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-3
Application.CommandBars("Stop Recording").Visible = False
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Windows taraf�ndan 28.10.2004 tarihinde kaydedildi.
'
'
Range("G6:Z7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
Range("B15:C20").Select
Selection.ClearContents
Range("D15:L29").Select
Selection.ClearContents
Range("M15:V29").Select
Selection.ClearContents
Range("W16:Z29").Select
Selection.ClearContents
Sheets("�kinci").Select
Range("G6:X7").Select
Selection.ClearContents
Range("G9:X10").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=12
Range("B16:Z29").Select
Selection.ClearContents
ActiveWindow.SmallScroll Down:=-3
Application.CommandBars("Stop Recording").Visible = False
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub veriaktar()
b = Sheets("Matrah").Range("D1:U1").Find([f32].Value).Column 'ay�n hangi s�tunda
oldu�unu bulur
Sheets("Matrah").Range("C33:C49").Copy 'sar� renkli b�lgeyi kopyalar
Cells(12, b).PasteSpecial Paste:=xlValues 'aya ait s�tuna sadece de�erleri
yap�t�r�r.
Application.CutCopyMode = False
Cells(12, b).Select
End Sub
----------kod bitir------
----------kod basla------
Sub Formul_makrocev�r()
On Error GoTo hata
MsgBox Application.ConvertFormula( _
Formula:=ActiveCell.Formula, _
fromReferenceStyle:=xlR1C1, _
toReferenceStyle:=xlA1), vbInformation, "Normal Ba�vuru"
MsgBox Application.ConvertFormula( _
Formula:=ActiveCell.Formula, _
fromReferenceStyle:=xlA1, _
toReferenceStyle:=xlR1C1), vbInformation, "Makro Stili"
Exit Sub
hata:
MsgBox ("Form�l yok !!!"), vbCritical, "Ba�vurulan h�crede"
End Sub
----------kod bitir------
----------kod basla------
Sub kurus()
C = 1
Do While Not IsEmpty(Cells(C, 1))
C = C + 1
Loop
Cells(C, 1) = 100
Cells(C, 1).Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlDivide
Cells(C, 1).ClearContents
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
'say�n leventm daha �nce yazm� oldu�u kodlar� sizin dosyan�za uyarlad�m s�ralama ve
toplam ilave ettim.
Set S1 = Sheets("sheet1")
Set s3 = Sheets("sheet3")
s3.[a2:b65536].ClearContents
s3.[a1] = "Hesap No"
s3.[b1] = "Tutar"
s3.Cells(s3son + 1, 1) = "toplam"
s3.Cells(s3son + 1, 2) = WorksheetFunction.Sum(s3.Range("b2:b" & s3son))
End Sub
----------kod bitir------
----------kod basla------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 14.09.2004 by tucum
'
'
Range("A1:D100").Select
ActiveWindow.SmallScroll Down:=-10
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Sub Soyad()
'
' Soyad Macro
' Macro recorded 14.09.2004 by tucum
'
'
Range("A1:D100").Select
ActiveWindow.SmallScroll Down:=-6
Range("A1:D40").Select
Range("B1").Activate
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Sub yas()
'
' yas Macro
' Macro recorded 14.09.2004 by tucum
'
'
Range("A1:D100").Select
Range("C1").Activate
Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
Sub ikamet()
'
' ikamet Macro
' Macro recorded 14.09.2004 by tucum
'
'
Range("A1:E100").Select
ActiveWindow.SmallScroll Down:=-4
Range("A1:E37").Select
Range("D1").Activate
Selection.Sort Key1:=Range("D1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
----------kod bitir------
----------kod basla------
Sub deneme1()
Dim ilksatir, sonsatir, kontrol, ilksatir1, sonsatir2, ikincisayfa, ilksat, sira,
adi, soyadi, maasi
adi = 3
soyadi = 4
maasi = 5
ilksatir1 = 10
sonsatir2 = 200
ilksat = 10
ikincisayfa = 40
ilksatir = 10
sonsatir = 130
kontrol = 1
sira = 0
Sheets("sayfa1").Cells(ilksatir, 2) = sira
sira = sira + 1
Sheets("sayfa1").Cells(ilksatir, 3) = Sheets("sayfa2").Cells(satir, adi)
Sheets("sayfa1").Cells(ilksatir, 4) = Sheets("sayfa2").Cells(satir, soyadi)
Sheets("sayfa1").Cells(ilksatir, 6) = Sheets("sayfa2").Cells(satir, maasi)
Next satir
son:
End Sub
----------kod bitir------
----------kod basla------
End If
ActiveCell.Offset(0, 1).Value = TextBox2.Value
ActiveCell.Offset(0, 2).Value = kod.Value
ActiveCell.Offset(0, 3).Value = cbAd.Value
ActiveCell.Offset(0, 4).Value = ComboBox2.Value
ActiveCell.Offset(0, 5).Value = TextBox5.Value
ActiveCell.Offset(0, 6).Value = TextBox6.Value
ActiveCell.Offset(0, 7).Value = 1 * (TextBox7.Value)
ActiveCell.Offset(0, 8).Value = 1 * (TextBox12.Value)
ActiveCell.Offset(0, 9).Value = 1 * (TextBox15.Value)
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
End Sub
End Sub
End Sub
End Sub
TextBox2 = Range("MALT!L3").Value
TextBox14 = Range("Z1").Value
End Sub
----------kod bitir------
----------kod basla------
Dim MyForm As Variant
Option Base 1
'
Sub OrganizeComboBox()
Dim noData, i, j, k, m As Integer
Dim MyComboArray()
Dim MyRevizedComboArray()
Dim MyData As Range
Dim SortedColl As New Collection
Dim Swap1, Swap2 As Variant
'
For Each MyControl In UserForms(MyForm).Controls
'
i = 0
j = 0
k = 0
'
If TypeName(MyControl) = "ComboBox" Then
noData = MyControl.ListCount
ReDim MyComboArray(noData)
For Each MyData In Range(MyControl.RowSource)
i = i + 1
MyComboArray(i) = MyData
Next
For i = 1 To UBound(MyComboArray)
For j = i + 1 To UBound(MyComboArray) - 1
If MyComboArray(i) = MyComboArray(j) Then
MyComboArray(i) = ""
End If
Next
Next
'
MyControl.RowSource = ""
'
For i = 1 To UBound(MyComboArray)
If MyComboArray(i) <> "" Then
k = k + 1
ReDim Preserve MyRevizedComboArray(k)
MyRevizedComboArray(k) = MyComboArray(i)
End If
Next
'
i = 0
j = 0
For i = 1 To UBound(MyRevizedComboArray)
SortedColl.Add MyRevizedComboArray(i)
Next
'
'On Error Resume Next
'For i = 1 To UBound(MyRevizedComboArray)
'MyRevizedComboArray(i) = WorksheetFunction.Small(MyRevizedComboArray, i)
'Next
'
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If SortedColl(i) > SortedColl(j) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
On Error Resume Next
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If CDate(SortedColl(i)) > CDate(SortedColl(j)) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
For i = 1 To SortedColl.Count
MyControl.AddItem SortedColl(i)
Next
'
For i = SortedColl.Count To 1 Step -1
SortedColl.Remove i
Next
'
End If
Erase MyComboArray
Erase MyRevizedComboArray
'
Next
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("MALT").Select
malt.Show
End Sub
----------kod bitir------
----------kod basla------
Sub frmac()
malt.Show
End Sub
----------kod bitir------
----------kod basla------
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
TextBox1.Value = ""
TextBox2.Value = ""
MsgBox ("Bilgiler kay�t edildi.")
Sheets("MALT").Select
Unload Me
urunkayit.Show
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
Private Sub CommandButton3_Click()
Sheets("rapor").Select
Range("A3:J55000").ClearContents
Sheets("MALT").Select
Range("D2").AutoFilter Field:=4, Criteria1:=ComboBox2.Value
a = WorksheetFunction.CountA(Sheets("MALT").Range("A3:A65000"))
Sheets("MALT").Range("A3:J" & a + 2).Copy
Sheets("rapor").Range("A3").PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Selection.AutoFilter
b = WorksheetFunction.CountA(Sheets("rapor").Range("A3:A65000"))
For c = 3 To b + 2
Cells(c, 1) = c - 2
Next c
Range("A1").Select
vlistele.Hide
Worksheets("rapor").PrintPreview
Worksheets("rapor").PageSetup.PrintArea = ""
vlistele.Show
End Sub
End Sub
End Sub
End If
ActiveCell.Offset(0, 1).Value = TextBox2.Value
ActiveCell.Offset(0, 2).Value = kod.Value
ActiveCell.Offset(0, 3).Value = cbAd.Value
ActiveCell.Offset(0, 4).Value = ComboBox2.Value
ActiveCell.Offset(0, 5).Value = TextBox5.Value
ActiveCell.Offset(0, 6).Value = TextBox6.Value
ActiveCell.Offset(0, 7).Value = 1 * (TextBox7.Value)
ActiveCell.Offset(0, 8).Value = 1 * (TextBox12.Value)
ActiveCell.Offset(0, 9).Value = 1 * (TextBox15.Value)
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
End Sub
End Sub
End Sub
Private Sub UserForm_Activate()
TextBox9 = Range("K2").Value
End Sub
TextBox2 = Range("MALT!L3").Value
TextBox14 = Range("Z1").Value
End Sub
----------kod bitir------
----------kod basla------
Dim MyForm As Variant
Option Base 1
'
Sub OrganizeComboBox()
Dim noData, i, j, k, m As Integer
Dim MyComboArray()
Dim MyRevizedComboArray()
Dim MyData As Range
Dim SortedColl As New Collection
Dim Swap1, Swap2 As Variant
'
For Each MyControl In UserForms(MyForm).Controls
'
i = 0
j = 0
k = 0
'
If TypeName(MyControl) = "ComboBox" Then
noData = MyControl.ListCount
ReDim MyComboArray(noData)
For Each MyData In Range(MyControl.RowSource)
i = i + 1
MyComboArray(i) = MyData
Next
For i = 1 To UBound(MyComboArray)
For j = i + 1 To UBound(MyComboArray) - 1
If MyComboArray(i) = MyComboArray(j) Then
MyComboArray(i) = ""
End If
Next
Next
'
MyControl.RowSource = ""
'
For i = 1 To UBound(MyComboArray)
If MyComboArray(i) <> "" Then
k = k + 1
ReDim Preserve MyRevizedComboArray(k)
MyRevizedComboArray(k) = MyComboArray(i)
End If
Next
'
i = 0
j = 0
For i = 1 To UBound(MyRevizedComboArray)
SortedColl.Add MyRevizedComboArray(i)
Next
'
'On Error Resume Next
'For i = 1 To UBound(MyRevizedComboArray)
'MyRevizedComboArray(i) = WorksheetFunction.Small(MyRevizedComboArray, i)
'Next
'
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If SortedColl(i) > SortedColl(j) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
On Error Resume Next
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If CDate(SortedColl(i)) > CDate(SortedColl(j)) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
For i = 1 To SortedColl.Count
MyControl.AddItem SortedColl(i)
Next
'
For i = SortedColl.Count To 1 Step -1
SortedColl.Remove i
Next
'
End If
Erase MyComboArray
Erase MyRevizedComboArray
'
Next
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("MALT").Select
malt.Show
End Sub
----------kod bitir------
----------kod basla------
Sub frmac()
malt.Show
End Sub
----------kod bitir------
----------kod basla------
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
TextBox1.Value = ""
TextBox2.Value = ""
MsgBox ("Bilgiler kay�t edildi.")
Sheets("MALT").Select
Unload Me
urunkayit.Show
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
End Sub
End If
ActiveCell.Offset(0, 1).Value = TextBox2.Value
ActiveCell.Offset(0, 2).Value = kod.Value
ActiveCell.Offset(0, 3).Value = cbAd.Value
ActiveCell.Offset(0, 4).Value = ComboBox2.Value
ActiveCell.Offset(0, 5).Value = TextBox5.Value
ActiveCell.Offset(0, 6).Value = TextBox6.Value
ActiveCell.Offset(0, 7).Value = 1 * (TextBox7.Value)
ActiveCell.Offset(0, 8).Value = 1 * (TextBox12.Value)
ActiveCell.Offset(0, 9).Value = 1 * (TextBox15.Value)
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
End Sub
End Sub
TextBox2 = Range("MALT!L3").Value
TextBox14 = Range("Z1").Value
End Sub
----------kod bitir------
----------kod basla------
Dim MyForm As Variant
Option Base 1
'
Sub OrganizeComboBox()
Dim noData, i, j, k, m As Integer
Dim MyComboArray()
Dim MyRevizedComboArray()
Dim MyData As Range
Dim SortedColl As New Collection
Dim Swap1, Swap2 As Variant
'
For Each MyControl In UserForms(MyForm).Controls
'
i = 0
j = 0
k = 0
'
If TypeName(MyControl) = "ComboBox" Then
noData = MyControl.ListCount
ReDim MyComboArray(noData)
For Each MyData In Range(MyControl.RowSource)
i = i + 1
MyComboArray(i) = MyData
Next
For i = 1 To UBound(MyComboArray)
For j = i + 1 To UBound(MyComboArray) - 1
If MyComboArray(i) = MyComboArray(j) Then
MyComboArray(i) = ""
End If
Next
Next
'
MyControl.RowSource = ""
'
For i = 1 To UBound(MyComboArray)
If MyComboArray(i) <> "" Then
k = k + 1
ReDim Preserve MyRevizedComboArray(k)
MyRevizedComboArray(k) = MyComboArray(i)
End If
Next
'
i = 0
j = 0
For i = 1 To UBound(MyRevizedComboArray)
SortedColl.Add MyRevizedComboArray(i)
Next
'
'On Error Resume Next
'For i = 1 To UBound(MyRevizedComboArray)
'MyRevizedComboArray(i) = WorksheetFunction.Small(MyRevizedComboArray, i)
'Next
'
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If SortedColl(i) > SortedColl(j) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
On Error Resume Next
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If CDate(SortedColl(i)) > CDate(SortedColl(j)) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
For i = 1 To SortedColl.Count
MyControl.AddItem SortedColl(i)
Next
'
For i = SortedColl.Count To 1 Step -1
SortedColl.Remove i
Next
'
End If
Erase MyComboArray
Erase MyRevizedComboArray
'
Next
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("MALT").Select
malt.Show
End Sub
----------kod bitir------
----------kod basla------
Sub frmac()
malt.Show
End Sub
----------kod bitir------
----------kod basla------
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
TextBox1.Value = ""
TextBox2.Value = ""
MsgBox ("Bilgiler kay�t edildi.")
Sheets("MALT").Select
Unload Me
urunkayit.Show
Application.ScreenUpdating = True
End Sub
End Sub
End Sub
Private Sub CommandButton3_Click()
Sheets("rapor").Select
Range("A3:J55000").ClearContents
Sheets("MALT").Select
Range("D2").AutoFilter Field:=4, Criteria1:=ComboBox2.Value
a = WorksheetFunction.CountA(Sheets("MALT").Range("A3:A65000"))
Sheets("MALT").Range("A3:J" & a + 2).Copy
Sheets("rapor").Range("A3").PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Selection.AutoFilter
b = WorksheetFunction.CountA(Sheets("rapor").Range("A3:A65000"))
For c = 3 To b + 2
Cells(c, 1) = c - 2
Next c
Range("A1").Select
vlistele.Hide
Worksheets("rapor").PrintPreview
Worksheets("rapor").PageSetup.PrintArea = ""
vlistele.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("Catma Gorsel Kontrol").PrintOut Copies:=1, Collate:=True
End Sub
Private Sub CommandButton10_Click()
Sheets("Kontrol Listesi").Select
Sheets("Kontrol Listesi").Cells(4, 14) = 0
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
End
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Private Sub CommandButton16_Click()
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
For k = 9 To 1001
If Sheets("Kontrol Listesi").Cells(4, 14) = Sheets("Kontrol Listesi").Cells((k
- 1), 1) Then
'Proje No'su girme
Sheets("Catma Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
Sheets("Boyutsal Kontrol").Cells(10, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 2)
Sheets("Kaynak Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Else
End If
Next k
Sheets("Kontrol Listesi").Cells(4, 14) = 0
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim tarih As Date
Private Sub CommandButton1_Click()
On Error Resume Next
If TextBox1 = "" Then
MsgBox ("TAR�H� G�R�N�Z")
Exit Sub
End If
Sheets("Boya Kontrol").Select
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
c = 0
sat = 0
Sheets("Boya Kontrol").[k1] = Now
Sheets("Boya Kontrol").[k2] = 1
For a = 8 To Sheets("Kontrol Listesi").Cells(65536, 2).End(xlUp).Row + 8
tarih = TextBox1.Value
If Sheets("Kontrol Listesi").Cells(a, 9).Value = tarih Then
c = c + 1
Sheets("Boya Kontrol").Cells(c + 7, 1) = Sheets("Kontrol Listesi").Cells(a + sat,
2).Value
Sheets("Boya Kontrol").Cells(c + 7, 2) = Sheets("Kontrol Listesi").Cells(a + sat,
3).Value
Sheets("Boya Kontrol").Cells(c + 7, 3) = Sheets("Kontrol Listesi").Cells(a + sat,
4).Value
If c / 14 = Int(c / 14) Then
c = 0
soru = MsgBox("SAYFA DOLDU,EVET DERSEN�Z YAZDIRDIKTAN SONRA DEVAM ED�LECEKT�R",
vbYesNo, "YAZDIRILMADAN DEVAM ED�LECEKT�R")
If soru = vbYes Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End If
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
Sheets("Boya Kontrol").[k2] = Sheets("Boya Kontrol").[k2] + 1
End If
End If
Next a
End Sub
Private Sub CommandButton2_Click()
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "dd.mm.yyyy")
End Sub
----------kod bitir------
----------kod basla------
Sub D��me2_T�klat()
UserForm1.Show
End Sub
Sub formdoldur()
UserForm3.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("Catma Gorsel Kontrol").PrintOut Copies:=1, Collate:=True
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
For k = 9 To 1001
If Sheets("Kontrol Listesi").Cells(4, 14) = Sheets("Kontrol Listesi").Cells((k
- 1), 1) Then
'Proje No'su girme
Sheets("Catma Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
Sheets("Boyutsal Kontrol").Cells(10, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 2)
Sheets("Kaynak Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Else
End If
Next k
Sheets("Kontrol Listesi").Cells(4, 14) = 0
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim tarih As Date
Dim tarih2 As Date
Private Sub CommandButton1_Click()
On Error Resume Next
If TextBox1 = "" Then
MsgBox ("TAR�H� G�R�N�Z")
Exit Sub
End If
Sheets("Boya Kontrol").Select
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
c = 0
sat = 0
Sheets("Boya Kontrol").[k1] = Now
Sheets("Boya Kontrol").[k2] = 1
For a = 8 To Sheets("Kontrol Listesi").Cells(65536, 2).End(xlUp).Row + 8
tarih = TextBox1.Value
If Sheets("Kontrol Listesi").Cells(a, 9).Value = tarih Then
c = c + 1
Sheets("Boya Kontrol").Cells(c + 7, 1) = Sheets("Kontrol Listesi").Cells(a + sat,
2).Value
Sheets("Boya Kontrol").Cells(c + 7, 2) = Sheets("Kontrol Listesi").Cells(a + sat,
3).Value
Sheets("Boya Kontrol").Cells(c + 7, 3) = Sheets("Kontrol Listesi").Cells(a + sat,
4).Value
If c / 14 = Int(c / 14) Then
c = 0
'soru = MsgBox("SAYFA DOLDU,EVET DERSEN�Z YAZDIRDIKTAN SONRA DEVAM ED�LECEKT�R",
vbYesNo, "YAZDIRILMADAN DEVAM ED�LECEKT�R")
'If soru = vbYes Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1
'End If
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
Sheets("Boya Kontrol").[k2] = Sheets("Boya Kontrol").[k2] + 1
End If
End If
Next a
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub
Private Sub CommandButton2_Click()
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub
----------kod bitir------
----------kod basla------
Sub D��me2_T�klat()
UserForm1.Show
End Sub
Sub formdoldur()
UserForm3.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("Catma Gorsel Kontrol").PrintOut Copies:=1, Collate:=True
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
For k = 9 To 1001
If Sheets("Kontrol Listesi").Cells(4, 14) = Sheets("Kontrol Listesi").Cells((k
- 1), 1) Then
'Proje No'su girme
Sheets("Catma Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
Sheets("Boyutsal Kontrol").Cells(10, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 2)
Sheets("Kaynak Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Else
End If
Next k
Sheets("Kontrol Listesi").Cells(4, 14) = 0
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim tarih As Date
Dim tarih2 As Date
Private Sub CommandButton1_Click()
On Error Resume Next
If TextBox1 = "" Then
MsgBox ("TAR�H� G�R�N�Z")
Exit Sub
End If
Sheets("Boya Kontrol").Select
Sheets("Boya Kontrol").[o1] = TextBox1.Value
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
c = 0
sat = 0
Sheets("Boya Kontrol").[k1] = Now
Sheets("Boya Kontrol").[k2] = 1
For a = 8 To Sheets("Kontrol Listesi").Cells(65536, 2).End(xlUp).Row + 8
tarih = TextBox1.Value
If Sheets("Kontrol Listesi").Cells(a, 9).Value = tarih Then
c = c + 1
Sheets("Boya Kontrol").Cells(c + 7, 1) = Sheets("Kontrol Listesi").Cells(a + sat,
2).Value
Sheets("Boya Kontrol").Cells(c + 7, 2) = Sheets("Kontrol Listesi").Cells(a + sat,
3).Value
Sheets("Boya Kontrol").Cells(c + 7, 3) = Sheets("Kontrol Listesi").Cells(a + sat,
4).Value
If c / 14 = Int(c / 14) Then
c = 0
soru = MsgBox("SAYFA DOLDU,EVET DERSEN�Z YAZDIRDIKTAN SONRA DEVAM ED�LECEKT�R",
vbYesNo, "YAZDIRILMADAN DEVAM ED�LECEKT�R")
If soru = vbYes Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End If
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
Sheets("Boya Kontrol").[k2] = Sheets("Boya Kontrol").[k2] + 1
End If
End If
Next a
End Sub
Private Sub CommandButton2_Click()
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub
----------kod bitir------
----------kod basla------
Sub D��me2_T�klat()
UserForm1.Show
End Sub
Sub formdoldur()
UserForm3.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("Catma Gorsel Kontrol").PrintOut Copies:=1, Collate:=True
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
Dim a, b, c, d, k
If Sheets("Kontrol Listesi").Cells(5, 14) <= 0 Or Sheets("Kontrol
Listesi").Cells(6, 14) <= 0 Then
GoTo hata
Else
End If
a = Sheets("Kontrol Listesi").Cells(5, 14)
b = Sheets("Kontrol Listesi").Cells(6, 14)
If b - a > 500 Then
'MsgBox "��kt�da yo�unlu�a yol a�mamak ve olas� sistem yava�l���n� �nlemek i�in
l�tfen bir seferde en �ok 5 Sayfal�k ��kt� verin... Zaten daha fazlas�na program
izin vermiyor g�rd���n�z gibi..."
MsgBox "�yi, ��kt� bir tek Talite Tontrola �al�acak sanki. Karde�im yok �yle en
fazla 5 sayfan�n b�t�n formlar�n� yollayabilirsin bir seferde. Teknik ofis ��kt�
almas�n m�?"
GoTo bitti:
Else
End If
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Next k
Sheets("Kontrol Listesi").Cells(5, 14) = 0
Sheets("Kontrol Listesi").Cells(6, 14) = 0
GoTo son
hata:
MsgBox "Ya sayfa numaralar�n� girmedin veya birisi eksik, ya bir �nceki sayfa
numaralar� hala duruyor, de�i�tirmedin. Yani muhakkak bir enayilik var. Tekrar
deneyin... "
GoTo bitti:
son:
mesaj1 = "Toplam"
mesaj3 = "Sayfa ��kt�ya G�nderildi"
mesaj2 = (b - a + 1)
MsgBox (mesaj1) & " " & (mesaj2) & " " & (mesaj3)
bitti:
End Sub
For k = 9 To 1001
If Sheets("Kontrol Listesi").Cells(4, 14) = Sheets("Kontrol Listesi").Cells((k
- 1), 1) Then
'Proje No'su girme
Sheets("Catma Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
Sheets("Boyutsal Kontrol").Cells(10, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 2)
Sheets("Kaynak Gorsel Kontrol").Cells(10, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 2)
'Marka ad� girme
Sheets("Catma Gorsel Kontrol").Cells(11, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 3)
Sheets("Boyutsal Kontrol").Cells(11, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 3)
Sheets("Kaynak Gorsel Kontrol").Cells(11, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 3)
'Adet girme
Sheets("Catma Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Sheets("Boyutsal Kontrol").Cells(12, 3) = Sheets("Kontrol Listesi").Cells((k -
1), 4)
Sheets("Kaynak Gorsel Kontrol").Cells(12, 3) = Sheets("Kontrol
Listesi").Cells((k - 1), 4)
Else
End If
Next k
Sheets("Kontrol Listesi").Cells(4, 14) = 0
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim tarih As Date
Dim tarih2 As Date
Private Sub CommandButton1_Click()
On Error Resume Next
If TextBox1 = "" Then
MsgBox ("TAR�H� G�R�N�Z")
Exit Sub
End If
Sheets("Boya Kontrol").Select
Sheets("Boya Kontrol").[o1] = TextBox1.Value
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
c = 0
sat = 0
Sheets("Boya Kontrol").[k1] = Now
Sheets("Boya Kontrol").[k2] = 1
For a = 8 To Sheets("Kontrol Listesi").Cells(65536, 2).End(xlUp).Row + 8
tarih = TextBox1.Value
If Sheets("Kontrol Listesi").Cells(a, 9).Value = tarih Then
c = c + 1
Sheets("Boya Kontrol").Cells(c + 7, 1) = Sheets("Kontrol Listesi").Cells(a + sat,
2).Value
Sheets("Boya Kontrol").Cells(c + 7, 2) = Sheets("Kontrol Listesi").Cells(a + sat,
3).Value
Sheets("Boya Kontrol").Cells(c + 7, 3) = Sheets("Kontrol Listesi").Cells(a + sat,
4).Value
If c / 14 = Int(c / 14) Then
c = 0
soru = MsgBox("SAYFA DOLDU,EVET DERSEN�Z YAZDIRDIKTAN SONRA DEVAM ED�LECEKT�R",
vbYesNo, "YAZDIRILMADAN DEVAM ED�LECEKT�R")
If soru = vbYes Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End If
Sheets("Boya Kontrol").Range("A8:C21").ClearContents
Sheets("Boya Kontrol").[k2] = Sheets("Boya Kontrol").[k2] + 1
End If
End If
Next a
End Sub
Private Sub CommandButton2_Click()
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub
Sub menuekle()
''''''''''''''''''''''''''''''''''''''''''''''''''''
' program bilgilerinin bulundu�u sayfay� sabitleme
Set Menu = ThisWorkbook.Sheets("Menu")
''''''''''''''''''''''''''''''''''''''''''''''''''''
' Men�n�n Ara� �ubugunda Hangi konumda bulunaca�� yerin sat�r numaras�
Row = 2
NextLevel = .Cells(Row + 1, 1)
End With
Sub silMenu()
Dim Menu1 As Worksheet
Dim Row As Integer
Dim Caption As String
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Alt_altaMen�_Hazirla
'A��l�ta Men�y� ekler
Set x = Application.CommandBars("Worksheet Menu
Bar").Controls.Add(msoControlButton)
With x
.Style = msoButtonIconAndCaption
.Caption = "Men� Haz�rlama"
.OnAction = "Deneme1"
End With
End Sub
Sub Deneme1()
'Buraya Yazmak/Yap�lmas�n� �stedi�iniz Kodlar� yap�t�r�n.
MsgBox "Men� Deneme"
End Sub
Sub auto_close()
'��k�ta Eklenen Men�y� siler.
Application.CommandBars("Worksheet Menu Bar").Reset
End Sub
----------kod bitir------
----------kod basla------
Sub Alt_altaMen�_Hazirla()
'Men� A��p Ba�l���n� Haz�rlar
Set x = Application.CommandBars(1).Controls.Add(msoControlPopup, 1, , , True)
x.Caption = "Ana Men�"
'1 Alt Men� Haz�rlar
Set a = x.Controls.Add(msoControlButton, , , , True)
a.Style = msoButtonIconAndCaption
a.Caption = "1.Alt Men�"
a.OnAction = "Makro1"
----------kod bitir------
----------kod basla------
End Sub
End Sub
ComboBox1.RowSource = "sayfa2!A2:A65000"
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
Private Sub UserForm_Initialize()
a = Sheets("Sayfa1").Range("A1:A65000")
ListBox1.ColumnCount = 3
ListBox1.ColumnWidths = "80,90,80"
ListBox1.ColumnHeads = True
ListBox2.ColumnCount = 2
ListBox2.ColumnWidths = "60,50"
ListBox2.ColumnHeads = True
ComboBox1.RowSource = "sayfa2!A2:A65000"
End Sub
----------kod bitir------
----------kod basla------
Function yaz$(sayi)
Dim b$(9)
Dim Y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
Y$(0) = ""
Y$(1) = "ON"
Y$(2) = "Y�RM�"
Y$(3) = "OTUZ"
Y$(4) = "KIRK"
Y$(5) = "ELL�"
Y$(6) = "ALTMI�"
Y$(7) = "YETM��"
Y$(8) = "SEKSEN"
Y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = "" Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For X = 1 To Len(a$)
If (Asc(Mid$(a$, X, 1)) > Asc("9")) Or (Asc(Mid$(a$, X, 1)) < Asc("0")) Then GoTo
hata
Next X
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For X = 1 To 15
v(X) = Val(Mid$(a$, X, 1))
Next X
a$ = ""
For X = 0 To 4
c(1) = v((X * 3) + 1)
c(2) = v((X * 3) + 2)
c(3) = v((X * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�Z"
Else
e$ = b$(c(1)) + "Y�Z"
End If
e$ = e$ + Y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(X)
If (X = 3) And (e$ = "B�RB�N") Then e$ = "B�N"
s$ = s$ + e$
Next X
If s$ = "" Then s$ = "SIFIR"
If pozitif = 0 Then s$ = "" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox18.Text = ""
TextBox19.Text = ""
TextBox20.Text = ""
TextBox21.Text = ""
TextBox24.Text = ""
TextBox23.Text = ""
TextBox5.Text = ""
TextBox17.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
ComboBox1.Value = ""
End Sub
End Sub
End Sub
End Sub
End Sub
'�RSAL�YE KISMI
ListBox4.ColumnHeads = True
ListBox4.ColumnCount = 5
ListBox4.ColumnWidths = "60,70,210,90,105"
ComboBox4.RowSource = "firmabilgileri!A2:A300"
ComboBox5.RowSource = "firmabilgileri!Z2:Z7"
ComboBox6.RowSource = "firmabilgileri!K2:K7"
'FATURA KISMI
ListBox1.ColumnHeads = True
ListBox1.ColumnCount = 9
ListBox1.ColumnWidths = "60,55,40,200,80,35,90,35,95"
ListBox5.ColumnHeads = True
ListBox5.ColumnCount = 9
ListBox5.ColumnWidths = "60,55,40,200,80,35,90,35,95"
For a = 2 To Sheets("irs").Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Sheets("irs").Range("A2:A" & a),
Sheets("irs").Cells(a, 1).Value) = 1 Then
userform1.ComboBox7.AddItem Sheets("irs").Cells(a, 3).Value
End If
Next
End Sub
'fatura k�sm�
Private Sub ComboBox7_Click()
ListBox5.Clear
ara = ComboBox7.Value
Set alan = Sheets("firmabilgileri").Range("a1:f300")
End Sub
----------kod bitir------
----------kod basla------
Sub ToplaKutu()
ActiveSheet.Shapes("Metin Kutusu 3").Select
a = Selection.Characters.Text * 1
ActiveSheet.Shapes("Metin Kutusu 4").Select
b = Selection.Characters.Text * 1
ActiveSheet.Shapes("Metin Kutusu 5").Select
Selection.Characters.Text = a + b
Range("A8").Select
End Sub
----------kod bitir------
----------kod basla------
Sub deneme()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
kay�t = WorksheetFunction.CountA(DATA.[A2:O65536]) + 2
aranan = [h1].Value
c = 0
For sat = 2 To kay�t
If aranan = DATA.Cells(sat, 2).Value Then
c = c + 1
Cells(c + 2, 2) = c
Cells(c + 2, 7) = DATA.Cells(sat, 5).Value
Cells(c + 2, 5) = DATA.Cells(sat, 14).Value
Cells(c + 2, 4) = DATA.Cells(sat, 29).Value & "-" & Sayfa1.Cells(sat, 30).Value
Cells(c + 2, 8) = DATA.Cells(sat, 47).Value
Cells(c + 2, 10) = DATA.Cells(sat, 48).Value
End If
Next sat
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
'CEKLER BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage3_Click(ByVal Index As Long)
Dim say As Integer
Sheets("cekler").Select
txtceksira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "cekler!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbcekmusteriad.RowSource = "cekler!B2:B" & say
End If
txtceksirano.Value = say
cbcekmusteriad.SetFocus
End Sub
Workbooks("MTP12.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cektemizle_Click
cbcekmusteriad.RowSource = "cekler!B2:B" & say + 1
txtceksirano.Value =
WorksheetFunction.Count(Sheets("cekler").Range("A1:A65000")) + 1
End Sub
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage1_Click(ByVal Index As Long)
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
End Sub
End If
Workbooks("MTP12.XLS").Save
MsgBox "Veriniz de�i�tirildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kay�t numaras� bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP12.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
'USERFORM AKT�FKENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
End Sub
'USERFORM Y�KLEN�YORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub UserForm_Initialize()
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
cbad.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Sub a()
mtp.Show
End Sub
----------kod bitir------
----------kod basla------
'CEKLER BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage3_Click(ByVal Index As Long)
Dim say As Integer
Sheets("cekler").Select
txtceksira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "cekler!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbcekmusteriad.RowSource = "cekler!B2:B" & say
End If
txtceksirano.Value = say
cbcekmusteriad.SetFocus
End Sub
End Sub
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage1_Click(ByVal Index As Long)
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
End Sub
End If
Workbooks("MTP13.XLS").Save
MsgBox "Veriniz de�i�tirildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kay�t numaras� bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP13.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
'USERFORM AKT�FKENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
End Sub
'USERFORM Y�KLEN�YORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub UserForm_Initialize()
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
cbcekmusteriad.RowSource = "cekler!B2:B" & say
'cbad.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Sub a()
mtp.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub cbcekmusteriad_Change()
Dim satir As Integer
satir = cbcekmusteriad.ListIndex + 2
txtceksirano.Value = Cells(satir, 1).Value
'cbcekmusteriad.Value = Cells(satir, 3).Value
txtceksoyad.Value = Cells(satir, 3).Value
txtcekcep.Value = Cells(satir, 5).Value
txtcekno.Value = Cells(satir, 6).Value
txtcekmiktar.Value = Cells(satir, 7).Value
cbaciklama.Value = Cells(satir, 4).Value
End Sub
'CEKLER BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage3_Click(ByVal Index As Long)
Dim say As Integer
Sheets("cekler").Select
txtceksira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "cekler!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbcekmusteriad.RowSource = "cekler!B2:B" & say
End If
txtceksirano.Value = say
cbcekmusteriad.SetFocus
End Sub
End Sub
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage1_Click(ByVal Index As Long)
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
End Sub
End If
Workbooks("MTP13.XLS").Save
MsgBox "Veriniz de�i�tirildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kay�t numaras� bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP13.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
'USERFORM AKT�FKENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
End Sub
'USERFORM Y�KLEN�YORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub UserForm_Initialize()
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
cbcekmusteriad.RowSource = "cekler!B2:B" & say
'cbad.SetFocus
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
'CEKLER BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage3_Click(ByVal Index As Long)
Dim say As Integer
Sheets("cekler").Select
txtceksira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "cekler!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbcekmusteriad.RowSource = "cekler!B2:B" & say
End If
txtceksirano.Value = say
cbcekmusteriad.SetFocus
End Sub
Workbooks("MTP12.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cektemizle_Click
cbcekmusteriad.RowSource = "cekler!B2:B" & say + 1
txtceksirano.Value =
WorksheetFunction.Count(Sheets("cekler").Range("A1:A65000")) + 1
End Sub
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage1_Click(ByVal Index As Long)
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
End Sub
End If
Workbooks("MTP12.XLS").Save
MsgBox "Veriniz de�i�tirildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kay�t numaras� bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP12.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
'USERFORM AKT�FKENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
End Sub
'USERFORM Y�KLEN�YORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub UserForm_Initialize()
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
cbad.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Sub a()
mtp.Show
End Sub
----------kod bitir------
----------kod basla------
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub MultiPage1_Click(ByVal Index As Long)
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
End Sub
End If
Workbooks("MTP13.XLS").Save
MsgBox "Veriniz de�i�tirildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kay�t numaras� bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP13.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
'USERFORM AKT�FKENNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
End Sub
'USERFORM Y�KLEN�YORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub UserForm_Initialize()
Dim say As Integer
Sheets("Veri").Select
txtsira.Locked = True
If Range("B2") = "" Then
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say + 1
Else
say = WorksheetFunction.CountA(Range("B1:B65000"))
cbad.RowSource = "Veri!B2:B" & say
End If
txtsira.Value = say
cbcekmusteriad.RowSource = "Veri!B2:B" & say
'cbad.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Sub a()
MultiPage1.Show
End Sub
----------kod bitir------
----------kod basla------
'F�RMA BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRR
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub cmdhesapla_Click()
On Error Resume Next
p = Round(txtodeme1, 2)
p = WorksheetFunction.Substitute(p, ",", ".")
r = Round(txtodeme2, 2)
r = WorksheetFunction.Substitute(r, ",", ".")
s = Round(txtodeme3, 2)
s = WorksheetFunction.Substitute(s, ",", ".")
t = Round(txtodeme4, 2)
t = WorksheetFunction.Substitute(t, ",", ".")
y = Round(txttutar, 2)
y = WorksheetFunction.Substitute(y, ",", ".")
z = (Val(y) - ((Val(p) + Val(r)) + Val(s) + Val(t)))
z = WorksheetFunction.Substitute(z, ".", ",")
txtkalanborc = z
End Sub
End Sub
Workbooks("MTP14.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
Private Sub txtfiyat_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtfiyat.Value = Format(txtfiyat.Value, "#,##0.00 YTL")
End Sub
Private Sub txttarih_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txttarih = Mid(txttarih, 1, 2) & " " & Mid(txttarih, 3, 2) & " " & Right(txttarih,
4)
End Sub
Private Sub cmdsil_Click()
Dim say As Integer
Dim i As Integer
Dim bos As Range
For Each bos In Range("B2:B" & WorksheetFunction.CountA(Range("B2:B65000")))
If cbad.Value = "" Or bos = "" Or ActiveCell = "" Then
MsgBox "�nce arad���n�z veriyi BUL ile bulmal�s�n�z"
Exit Sub
End If
Next bos
Range(ActiveCell.Offset(0, -1).Address(False, False) & ":" &
ActiveCell.Offset(0, 50).Address(False, False)).Delete Shift:=xlUp
say = WorksheetFunction.CountA(Range("A2:A65000"))
For i = 1 To say
Cells(i + 1, 1) = i
Next i
Workbooks("MTP14.XLS").Save
MsgBox "Veriniz Silindi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdkapat_Click()
Unload MultiPage1
Application.Quit
End Sub
'USERFORMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
End Sub
Private Sub UserForm_Initialize()
----------kod bitir------
----------kod basla------
Sub a()
MultiPage1.Show
End Sub
----------kod bitir------
----------kod basla------
'F�RMA BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRR
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub cmdhesapla_Click()
On Error Resume Next
p = Round(txtodeme1, 2)
p = WorksheetFunction.Substitute(p, ",", ".")
r = Round(txtodeme2, 2)
r = WorksheetFunction.Substitute(r, ",", ".")
s = Round(txtodeme3, 2)
s = WorksheetFunction.Substitute(s, ",", ".")
t = Round(txtodeme4, 2)
t = WorksheetFunction.Substitute(t, ",", ".")
y = Round(txttutar, 2)
y = WorksheetFunction.Substitute(y, ",", ".")
z = (Val(y) - ((Val(p) + Val(r)) + Val(s) + Val(t)))
z = WorksheetFunction.Substitute(z, ".", ",")
txtkalanborc = z
End Sub
Private Sub txtev_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtev = Format(txtev, "###"".""##"".""##")
End Sub
Private Sub txtkalanborc_Change()
txtkalanborc.Value = Format(txtkalanborc.Value, "#,##0.00 YTL")
End Sub
Private Sub txtmaltarihi_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtmaltarihi = Mid(txtmaltarihi, 1, 2) & " " & Mid(txtmaltarihi, 3, 2) & " " &
Right(txtmaltarihi, 4)
End Sub
Private Sub txttarih1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txttarih1 = Mid(txttarih1, 1, 2) & " " & Mid(txttarih1, 3, 2) & " " &
Right(txttarih1, 4)
End Sub
Private Sub txttarih2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txttarih2 = Mid(txttarih2, 1, 2) & " " & Mid(txttarih2, 3, 2) & " " &
Right(txttarih2, 4)
End Sub
Private Sub txttarih3_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txttarih3 = Mid(txttarih3, 1, 2) & " " & Mid(txttarih3, 3, 2) & " " &
Right(txttarih3, 4)
End Sub
Private Sub txttarih4_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txttarih4 = Mid(txttarih4, 1, 2) & " " & Mid(txttarih4, 3, 2) & " " &
Right(txttarih4, 4)
End Sub
Private Sub txtcep_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtcep = Format(txtcep, "(###)"".""###"".""##"".""##")
End Sub
Private Sub degistir_Click()
Dim bos As Range
For Each bos In Range("B2:B" & WorksheetFunction.CountA(Range("B2:B65000")))
If cbad.Value = "" Or bos = "" Or ActiveCell = "" Then
MsgBox "�nce arad���n�z veriyi BUL ile bulmal�s�n�z"
Exit Sub
End If
Next bos
If txtsira = "" Or cbad = "" Then
MsgBox "Ad� Soyad� listesinden bir Ki�i se�melisiniz"
Else
ActiveCell = cbad
ActiveCell.Offset(0, 1) = txtsoyad
ActiveCell.Offset(0, 2) = txtadres
ActiveCell.Offset(0, 3) = txtcep
ActiveCell.Offset(0, 4) = txtev
ActiveCell.Offset(0, 5) = cbmal
ActiveCell.Offset(0, 6) = txttutar
ActiveCell.Offset(0, 7) = txtmaltarihi
ActiveCell.Offset(0, 8) = txtfisno
ActiveCell.Offset(0, 9) = txtodeme1
ActiveCell.Offset(0, 10) = txttarih1
ActiveCell.Offset(0, 11) = txtodeme2
ActiveCell.Offset(0, 12) = txttarih2
ActiveCell.Offset(0, 13) = txtodeme3
ActiveCell.Offset(0, 14) = txttarih3
ActiveCell.Offset(0, 15) = txtodeme4
ActiveCell.Offset(0, 16) = txttarih4
End If
Workbooks("MTP14.XLS").Save
MsgBox "Veriniz de�i�tirildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub kaydet_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = cbad.Value Then
MsgBox "Bu Kay�t numaras� bulundu."
Exit Sub
End If
If cbad.Value = "" Then
MsgBox "Bir isim girmelisiniz."
Exit Sub
End If
Next bak
say = WorksheetFunction.CountA(Range("B1:B65000"))
txtsira.Value = say
Cells(say + 1, 1).Value = txtsira.Value
Cells(say + 1, 2).Value = cbad.Value
Cells(say + 1, 3).Value = txtsoyad.Value
Cells(say + 1, 4).Value = txtadres.Value
Cells(say + 1, 5).Value = txtcep.Value
Cells(say + 1, 6).Value = txtev.Value
Cells(say + 1, 7).Value = cbmal.Value
Cells(say + 1, 8).Value = txttutar.Value
Cells(say + 1, 9).Value = txtmaltarihi.Value
Cells(say + 1, 10).Value = txtfisno.Value
Cells(say + 1, 11).Value = txtodeme1.Value
Cells(say + 1, 12).Value = txttarih1.Value
Cells(say + 1, 13).Value = txtodeme2.Value
Cells(say + 1, 14).Value = txttarih2.Value
Cells(say + 1, 15).Value = txtodeme3.Value
Cells(say + 1, 16).Value = txttarih3.Value
Cells(say + 1, 17).Value = txtodeme4.Value
Cells(say + 1, 18).Value = txttarih4.Value
Workbooks("MTP14.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
Private Sub txtfiyat_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtfiyat.Value = Format(txtfiyat.Value, "#,##0.00 YTL")
End Sub
Private Sub txttarih_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txttarih = Mid(txttarih, 1, 2) & " " & Mid(txttarih, 3, 2) & " " & Right(txttarih,
4)
End Sub
Private Sub cmdsil_Click()
Dim say As Integer
Dim i As Integer
Dim bos As Range
For Each bos In Range("B2:B" & WorksheetFunction.CountA(Range("B2:B65000")))
If cbad.Value = "" Or bos = "" Or ActiveCell = "" Then
MsgBox "�nce arad���n�z veriyi BUL ile bulmal�s�n�z"
Exit Sub
End If
Next bos
Range(ActiveCell.Offset(0, -1).Address(False, False) & ":" &
ActiveCell.Offset(0, 50).Address(False, False)).Delete Shift:=xlUp
say = WorksheetFunction.CountA(Range("A2:A65000"))
For i = 1 To say
Cells(i + 1, 1) = i
Next i
Workbooks("MTP14.XLS").Save
MsgBox "Veriniz Silindi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdkapat_Click()
Unload MultiPage1
Application.Quit
End Sub
'USERFORMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
End Sub
Private Sub UserForm_Initialize()
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("MEN�").Select
End Sub
Sub Yuru_Be_Yazi()
Dim sp As String
Dim sTxt As String
Dim x As Integer, y As Integer
Dim Start, delay
sTxt = "K�PR�BA�I MALM�D�RL��� AL� KEMAL MEDAN"
For y = 1 To 15
For x = 1 To 30
Start = Timer
delay = Start + 0.15
Do While Timer < delay
Range("B20").Value = Space(x) & sTxt
DoEvents
Loop
DoEvents
Start = Timer
delay = Start + 0.15
Next x: Next y
Range("B20").Value = ""
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub Makro1()
'
' Makro1 Makro
' Makro MEOP taraf�ndan 11.02.2005 tarihinde kaydedildi.
'
'
Sheets("hesaplama").Select
Application.Run "Yuru_Be_Yazi"
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sub Tarih()
'
' Tarih Makro
' Makro AKSOY taraf�ndan 07.04.2005 tarihinde kaydedildi.
'
' Klavye K�sayolu: Ctrl+�stKrkt+T
'
Selection.Sort Key1:=Range("C5"), Order1:=xlAscending, Key2:=Range("B5") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
End Sub
----------kod bitir------
----------kod basla------
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " " & PBirim & " " & _
IIf(Val(Kurus) <> 0, Cevir(Kurus) & " " & KBirim & " ", "")
End Function
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("ANA SAYFA").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Sabit bilgiler").Select
End Sub
Sub Makro2()
'
' Makro2 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Personel Bilgileri").Select
End Sub
Sub Makro3()
'
' Makro3 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Bordro").Select
End Sub
Sub Makro4()
'
' Makro3 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Pers.Bil.").Select
End Sub
Sub Makro5()
'
' Makro5 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Banka Lis.").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro6()
'
' Makro6 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Maa� Nakiti").Select
End Sub
Sub Makro7()
'
' Makro7 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("�zel Gid.�nd.").Select
End Sub
Sub Makro8()
'
' Makro8 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
Sheets("Sen.Tev.Lis.").Select
End Sub
Sub Makro9()
'
' Makro9 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Ana Sayfa").Select
End Sub
Sub Makro10()
'
' Makro10 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Aral�k").Select
End Sub
Sub Makro11()
'
' Makro11 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Ocak").Select
End Sub
Sub Makro12()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Sayfa8").Select
End Sub
Sub Makro13()
'
' Makro13 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Sayfa51").Select
End Sub
Sub Makro14()
'
' Makro14 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Sayfa9").Select
End Sub
Sub Makro15()
'
' Makro15 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Sayfa10").Select
End Sub
Sub Makro16()
'
' Makro16 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Sayfa11").Select
End Sub
Sub Makro55()
'
' Makro6 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("Gelir Matrahlar�").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro17()
'
' Makro17 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Sayfa12").Select
End Sub
Sub Makro18()
'
' Makro18 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=2
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Sayfa13").Select
End Sub
Sub Makro19()
'
' Makro19 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=3
Sheets("Sayfa14").Select
End Sub
Sub Makro20()
'
' Makro20 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Sayfa15").Select
End Sub
Sub Makro21()
'
' Makro21 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Sayfa16").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro22()
'
' Makro22 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=12
Sheets("Sayfa17").Select
End Sub
Sub Makro23()
'
' Makro23 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=12
Sheets("Sayfa18").Select
End Sub
Sub Makro24()
'
' Makro24 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=14
Sheets("Sayfa19").Select
End Sub
Sub Makro25()
'
' Makro25 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=14
Sheets("Sayfa20").Select
End Sub
Sub Makro26()
'
' Makro26 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=14
Sheets("Sayfa21").Select
End Sub
Sub Makro27()
'
' Makro27 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=16
Sheets("Sayfa22").Select
End Sub
Sub Makro28()
'
' Makro28 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=11
ActiveWindow.ScrollWorkbookTabs Sheets:=5
Sheets("Sayfa23").Select
End Sub
Sub Makro29()
'
' Makro29 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=15
Sheets("Sayfa24").Select
End Sub
Sub Makro30()
'
' Makro30 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=17
Sheets("Sayfa25").Select
End Sub
Sub Makro31()
'
' Makro31 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=19
Sheets("Sayfa26").Select
End Sub
Sub Makro32()
'
' Makro32 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=18
Sheets("Sayfa27").Select
End Sub
Sub Makro33()
'
' Makro33 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=21
Sheets("Sayfa28").Select
End Sub
Sub Makro34()
'
' Makro34 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=23
Sheets("Sayfa29").Select
End Sub
Sub Makro35()
'
' Makro35 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=25
Sheets("Sayfa30").Select
End Sub
Sub Makro36()
'
' Makro36 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=26
Sheets("Sayfa31").Select
End Sub
Sub Makro37()
'
' Makro37 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=26
Sheets("Sayfa32").Select
End Sub
Sub Makro38()
'
' Makro38 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=27
Sheets("Sayfa33").Select
End Sub
Sub Makro39()
'
' Makro39 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=28
Sheets("Sayfa34").Select
End Sub
Sub Makro40()
'
' Makro40 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Sheets:=35
Sheets("Sayfa35").Select
End Sub
Sub Makro41()
'
' Makro41 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
ActiveWindow.ScrollWorkbookTabs Sheets:=-5
Sheets("Sayfa36").Select
End Sub
Sub Makro42()
'
' Makro42 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
ActiveWindow.ScrollWorkbookTabs Sheets:=-2
ActiveWindow.ScrollWorkbookTabs Sheets:=-1
Sheets("Sayfa37").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro43()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("S�ral�").Select
End Sub
Sub Makro44()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("sen").Select
End Sub
Sub Makro45()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("ilksan").Select
End Sub
Sub Makro46()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("sayfa1").Select
End Sub
Sub Makro47()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("sayfa2").Select
End Sub
Sub Makro48()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("sayfa3").Select
End Sub
Sub Makro49()
'
' Makro12 Makro
' Makro Turgut toku taraf�ndan 22.12.2001 tarihinde kaydedildi.
'
'
Sheets("sayfa4").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
End Sub
----------kod bitir------
----------kod basla------
Sub dene()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
ListBox1.ColumnWidths = "25,25,60,30,30"
ListBox5.ColumnWidths = "25,25,60,30,30"
ListBox1.RowSource = "Sayfa1!a1:e10"
End Sub
----------kod bitir------
----------kod basla------
Sub B�LG�LER()
'
' B�LG�LER Makro
' Makro Hkoca taraf�ndan 04.03.2005 tarihinde kaydedildi.
'
'
Range("A1").Select
ActiveCell.FormulaR1C1 = "ADI SOYADI:"
Range("A2").Select
ActiveCell.FormulaR1C1 = "TUTAR"
Range("A4").Select
ActiveCell.FormulaR1C1 = "OCAK"
Range("A5").Select
ActiveCell.FormulaR1C1 = "�UBAT"
Range("A6").Select
ActiveCell.FormulaR1C1 = "MART"
Range("A7").Select
ActiveCell.FormulaR1C1 = "N�SAN"
Range("A8").Select
ActiveCell.FormulaR1C1 = "MAYIS"
Range("A9").Select
ActiveCell.FormulaR1C1 = "HAZ�RAN"
Range("A10").Select
ActiveCell.FormulaR1C1 = "TEMMUZ"
Range("A11").Select
ActiveCell.FormulaR1C1 = "A�USTOS"
Range("A12").Select
ActiveCell.FormulaR1C1 = "EYL�L"
Range("A13").Select
ActiveCell.FormulaR1C1 = "EK�M"
Range("A14").Select
ActiveCell.FormulaR1C1 = "KASIM"
Range("A15").Select
ActiveCell.FormulaR1C1 = "ARALIK"
Range("B2").Select
ActiveCell.FormulaR1C1 = "AYLIK:"
Range("B3").Select
ActiveCell.FormulaR1C1 = "TAR�H"
Range("C3").Select
ActiveCell.FormulaR1C1 = "TUTAR"
Range("D2").Select
ActiveCell.FormulaR1C1 = "BAK�YE"
Range("D3").Select
Columns("A:A").ColumnWidth = 12.29
Columns("B:B").ColumnWidth = 18.86
Columns("C:C").ColumnWidth = 20
Columns("D:D").ColumnWidth = 21.71
Columns("C:D").Select
Selection.NumberFormat = "#,##0.00"
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Sheets("Menu").Select
Application.DisplayFullScreen = True
Application.DisplayFormulaBar = False
Application.DisplayFormulaBar = False
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
Range("F10").Select
End Sub
Sub Auto_Close()
Sheets("Menu").Select
Application.DisplayFullScreen = False
Application.DisplayFormulaBar = True
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
End Sub
Sub KayitGncl()
Load UserForm4
UserForm4.Show
End Sub
Sub FirmaTur()
Load UserForm5
UserForm5.Show
End Sub
Sub ShsUnvan()
Load UserForm8
UserForm8.Show
End Sub
Sub ShsBolum()
Load UserForm11
UserForm11.Show
End Sub
Sub Sehirler()
Load UserForm14
UserForm14.Show
End Sub
Sub Bolgeler()
Load UserForm17
UserForm17.Show
End Sub
Sub Raporlama()
Load UserForm20
UserForm20.Show
End Sub
Sub ProgramHk()
Load UserForm1
UserForm1.Show
End Sub
Sub MenuGit()
Sheets("Rapor").Select
ActiveSheet.Unprotect
Cells.Select
With Selection.Interior
.ColorIndex = 54
.Pattern = xlSolid
End With
Range("A1").Select
Application.DisplayFormulaBar = False
Application.DisplayFullScreen = True
With ActiveWindow
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
End With
Range("A1").Select
ActiveSheet.Protect
Sheets("Menu").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm10
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'------------- Kay�d�n Kontrol� ---------------------------------
Unvan$ = TextBox2.Text
Devam2:
'------------- Kay�t ------------------------------------------------
Kaysay = Val(TextBox1.Text)
Range("W1").Select
ActiveCell.Offset(Kaysay, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = Unvan$ ' �ah�s B�l�m�
'------------- User Form Liste De�erinin D�zeltilmesi ------------
UserForm11.ListBox1.AddItem Unvan$
Unload UserForm12
Son:
ActiveSheet.Protect
End Sub
Private Sub UserForm_Initialize()
Sheets("Menu").Select
ActiveSheet.Unprotect
Range("V1").Select
Selection.Copy
Range("V2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect
Sayma = Val(ActiveCell.FormulaR1C1)
TextBox1.Text = Sayma + 1
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm13
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'------------- Kay�d�n Kontrol� ---------------------------------
Unvan$ = TextBox2.Text
Devam2:
'------------- Kay�t ------------------------------------------------
Kaysay = Val(TextBox1.Text)
Range("Y1").Select
ActiveCell.Offset(Kaysay, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = Unvan$ ' �ehir
'------------- User Form Liste De�erinin D�zeltilmesi ------------
UserForm14.ListBox1.AddItem Unvan$
Unload UserForm15
Son:
ActiveSheet.Protect
End Sub
Private Sub UserForm_Initialize()
Sheets("Menu").Select
ActiveSheet.Unprotect
Range("X1").Select
Selection.Copy
Range("X2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect
Sayma = Val(ActiveCell.FormulaR1C1)
TextBox1.Text = Sayma + 1
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm16
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'------------- Kay�d�n Kontrol� ---------------------------------
Unvan$ = TextBox2.Text
Devam2:
'------------- Kay�t ------------------------------------------------
Kaysay = Val(TextBox1.Text)
Range("AA1").Select
ActiveCell.Offset(Kaysay, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = Unvan$ ' B�lge
'------------- User Form Liste De�erinin D�zeltilmesi ------------
UserForm17.ListBox1.AddItem Unvan$
Unload UserForm18
Son:
ActiveSheet.Protect
End Sub
Private Sub UserForm_Initialize()
Sheets("Menu").Select
ActiveSheet.Unprotect
Range("Z1").Select
Selection.Copy
Range("Z2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect
Sayma = Val(ActiveCell.FormulaR1C1)
TextBox1.Text = Sayma + 1
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm19
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'------------- Kay�d�n Kontrol� ---------------------------------
Unvan$ = TextBox2.Text
Devam2:
'------------- Kay�t ------------------------------------------------
Kaysay = Val(TextBox1.Text)
Range("AD1").Select
ActiveCell.Offset(Kaysay, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = Unvan$ ' Firma �nvan�
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = ComboBox1.ListIndex ' Firma T�r�
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox3.Text ' �ah�s Ad�
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox4.Text ' �ah�s Soyad�
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = ComboBox2.ListIndex ' �ah�s �nvan�
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = ComboBox3.ListIndex ' �ah�s B�l�m�
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox5.Text ' Adres1
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox6.Text ' Adres2
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox7.Text ' Adres3
ActiveCell.Offset(0, 1).Range("A1").Select '
ActiveCell.FormulaR1C1 = ComboBox4.ListIndex ' �ehir
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = ComboBox5.ListIndex ' B�lge
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox8.Text ' Telefon1
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox9.Text ' Telefon2
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox10.Text ' Fax
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox11.Text ' G�r�1
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = TextBox12.Text ' G�r�2
'------------- User Form Liste De�erinin D�zeltilmesi ------------
UserForm4.ListBox1.AddItem Unvan$
Unload UserForm2
Son:
ActiveSheet.Protect
End Sub
Private Sub UserForm_Initialize()
Sheets("Menu").Select
ActiveSheet.Unprotect
'---- Firma T�r�n�n Tesbiti ---------------------------------------
Range("R1").Select
Selection.Copy
Range("R2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
FirmaTr = Val(ActiveCell.FormulaR1C1)
Range("S1").Select
For I = 1 To FirmaTr
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox1.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox1.ListIndex = 0
'---- Yeni Kay�t Numaras�n�n Tesbiti ----------------------------
Range("AC1").Select
Selection.Copy
Range("AC2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
KayNo = Val(ActiveCell.FormulaR1C1) + 1
TextBox1.Text = KayNo
'---- �nvan�n Tesbiti -------------------------------------------
Range("T1").Select
Selection.Copy
Range("T2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Unvan = Val(ActiveCell.FormulaR1C1)
Range("U1").Select
For I = 1 To Unvan
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox2.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox2.ListIndex = 0
'---- B�l�m�n Tesbiti -------------------------------------------
Range("V1").Select
Selection.Copy
Range("V2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Bolum = Val(ActiveCell.FormulaR1C1)
Range("W1").Select
For I = 1 To Bolum
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox3.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox3.ListIndex = 0
'---- �ehirlerin Tesbiti ----------------------------------------
Range("X1").Select
Selection.Copy
Range("X2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sehir = Val(ActiveCell.FormulaR1C1)
Range("Y1").Select
For I = 1 To Sehir
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox4.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox4.ListIndex = 0
'---- B�lgelerin Tesbiti ----------------------------------------
Range("Z1").Select
Selection.Copy
Range("Z2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Bolge = Val(ActiveCell.FormulaR1C1)
Range("AA1").Select
For I = 1 To Bolge
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox5.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox5.ListIndex = 0
ActiveSheet.Protect
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
If ComboBox2.ListIndex < ComboBox1.ListIndex Then ComboBox2.ListIndex =
ComboBox1.ListIndex
End Sub
Private Sub ComboBox2_Change()
If ComboBox2.ListIndex < ComboBox1.ListIndex Then ComboBox2.ListIndex =
ComboBox1.ListIndex
End Sub
Private Sub ComboBox3_Change()
If ComboBox4.ListIndex < ComboBox3.ListIndex Then ComboBox4.ListIndex =
ComboBox3.ListIndex
End Sub
Private Sub ComboBox4_Change()
If ComboBox4.ListIndex < ComboBox3.ListIndex Then ComboBox4.ListIndex =
ComboBox3.ListIndex
End Sub
Private Sub ComboBox5_Change()
If ComboBox6.ListIndex < ComboBox5.ListIndex Then ComboBox6.ListIndex =
ComboBox5.ListIndex
End Sub
Private Sub ComboBox6_Change()
If ComboBox6.ListIndex < ComboBox5.ListIndex Then ComboBox6.ListIndex =
ComboBox5.ListIndex
End Sub
Private Sub ComboBox7_Change()
If ComboBox8.ListIndex < ComboBox7.ListIndex Then ComboBox8.ListIndex =
ComboBox7.ListIndex
End Sub
Private Sub ComboBox8_Change()
If ComboBox8.ListIndex < ComboBox7.ListIndex Then ComboBox8.ListIndex =
ComboBox7.ListIndex
End Sub
Private Sub ComboBox9_Change()
If ComboBox10.ListIndex < ComboBox9.ListIndex Then ComboBox10.ListIndex =
ComboBox9.ListIndex
End Sub
Private Sub ComboBox10_Change()
If ComboBox10.ListIndex < ComboBox9.ListIndex Then ComboBox10.ListIndex =
ComboBox9.ListIndex
End Sub
Private Sub ComboBox11_Change()
If ComboBox12.ListIndex < ComboBox11.ListIndex Then ComboBox12.ListIndex =
ComboBox11.ListIndex
End Sub
Private Sub ComboBox12_Change()
If ComboBox12.ListIndex < ComboBox11.ListIndex Then ComboBox12.ListIndex =
ComboBox11.ListIndex
End Sub
Private Sub CommandButton1_Click()
Unload UserForm20
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'---- Yazd�rma Kontrol Kutular�n�n De�erleri --------------------
Range("AT2").Select
If CheckBox1.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox2.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox3.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox4.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox5.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox6.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox7.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox8.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox9.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox10.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
ActiveCell.Offset(1, 0).Range("A1").Select
If CheckBox11.Value = True Then ActiveCell.FormulaR1C1 = 1 Else
ActiveCell.FormulaR1C1 = 0
'---- Kay�t say�s�n�n tesbiti -----------------------------------
Range("AC1").Select
Selection.Copy
Range("AC2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
KayNo = Val(ActiveCell.FormulaR1C1)
ActiveSheet.Protect
'---- Ekrana Rapor D�k�m� ---------------------------------------
Sheets("Rapor").Select
ActiveSheet.Unprotect
'---- Eski rapor verilerinin silinmesi -------------------------
Range("A3:L65000").Select
Selection.ClearContents
Range("A3").Select
Sheets("Menu").Select
Range("AD1").Select
Sayma = 0
For I = 1 To KayNo
Sheets("Menu").Select
ActiveCell.Offset(1, 0).Range("A1").Select
'---- Filtreler -------------------------------------------------
' Kay�t No
If I < ComboBox1.ListIndex + 1 Then GoTo Atlama
If I > ComboBox2.ListIndex + 1 Then GoTo Atlama
' Firma T�r�
ActiveCell.Offset(0, 1).Range("A1").Select
FltFTur = Val(ActiveCell.FormulaR1C1)
ActiveCell.Offset(0, -1).Range("A1").Select
If FltFTur < ComboBox3.ListIndex Then GoTo Atlama
If FltFTur > ComboBox4.ListIndex Then GoTo Atlama
' �lgilinin �nvan�
ActiveCell.Offset(0, 4).Range("A1").Select
FltUnv = Val(ActiveCell.FormulaR1C1)
ActiveCell.Offset(0, -4).Range("A1").Select
If FltUnv < ComboBox5.ListIndex Then GoTo Atlama
If FltUnv > ComboBox6.ListIndex Then GoTo Atlama
' �lgilinin B�l�m�
ActiveCell.Offset(0, 5).Range("A1").Select
FltBlm = Val(ActiveCell.FormulaR1C1)
ActiveCell.Offset(0, -5).Range("A1").Select
If FltBlm < ComboBox7.ListIndex Then GoTo Atlama
If FltBlm > ComboBox8.ListIndex Then GoTo Atlama
' �ehir
ActiveCell.Offset(0, 9).Range("A1").Select
FltSeh = Val(ActiveCell.FormulaR1C1)
ActiveCell.Offset(0, -9).Range("A1").Select
If FltSeh < ComboBox9.ListIndex Then GoTo Atlama
If FltSeh > ComboBox10.ListIndex Then GoTo Atlama
' B�lge
ActiveCell.Offset(0, 10).Range("A1").Select
FltBlg = Val(ActiveCell.FormulaR1C1)
ActiveCell.Offset(0, -10).Range("A1").Select
If FltBlg < ComboBox11.ListIndex Then GoTo Atlama
If FltBlg > ComboBox12.ListIndex Then GoTo Atlama
'---- Veri alma ve yap�t�rma -----------------------------------
Sheets("Rapor").Select
'S�ra No
Sayma = Sayma + 1
ActiveCell.FormulaR1C1 = Sayma
ActiveCell.Offset(0, 1).Range("A1").Select
'Firma �nvan�
Sheets("Menu").Select
Selection.Copy
Sheets("Rapor").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveCell.Offset(0, 1).Range("A1").Select
'Firma T�r�
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
FrmTur = Val(ActiveCell.FormulaR1C1)
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = ComboBox3.List(FrmTur)
ActiveCell.Offset(0, 1).Range("A1").Select
'Ad� ve Soyad�
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Adsoy$ = ActiveCell.FormulaR1C1
ActiveCell.Offset(0, 1).Range("A1").Select
Adsoy$ = Adsoy$ & " " & ActiveCell.FormulaR1C1
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = Adsoy$
ActiveCell.Offset(0, 1).Range("A1").Select
'�nvan�
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Unvan = Val(ActiveCell.FormulaR1C1)
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = ComboBox5.List(Unvan)
ActiveCell.Offset(0, 1).Range("A1").Select
'B�l�m�
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Bolum = Val(ActiveCell.FormulaR1C1)
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = ComboBox7.List(Bolum)
ActiveCell.Offset(0, 1).Range("A1").Select
'Adresi
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Adres$ = ActiveCell.FormulaR1C1
ActiveCell.Offset(0, 1).Range("A1").Select
Adres$ = Adres$ & " " & ActiveCell.FormulaR1C1
ActiveCell.Offset(0, 1).Range("A1").Select
Adres$ = Adres$ & " " & ActiveCell.FormulaR1C1
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = Adres$
ActiveCell.Offset(0, 1).Range("A1").Select
'�ehir
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Sehir = Val(ActiveCell.FormulaR1C1)
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = ComboBox9.List(Sehir)
ActiveCell.Offset(0, 1).Range("A1").Select
'B�lge
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Bolge = Val(ActiveCell.FormulaR1C1)
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = ComboBox11.List(Bolge)
ActiveCell.Offset(0, 1).Range("A1").Select
'Telefon
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Tlfn$ = ActiveCell.FormulaR1C1
ActiveCell.Offset(0, 1).Range("A1").Select
Tlfn$ = Tlfn$ & "_" & ActiveCell.FormulaR1C1
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = Tlfn$
ActiveCell.Offset(0, 1).Range("A1").Select
'Fax
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Fax$ = ActiveCell.FormulaR1C1
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = Fax$
ActiveCell.Offset(0, 1).Range("A1").Select
'G�r�ler
Sheets("Menu").Select
ActiveCell.Offset(0, 1).Range("A1").Select
Gorus$ = ActiveCell.FormulaR1C1
ActiveCell.Offset(0, 1).Range("A1").Select
Gorus$ = Gorus$ & " " & ActiveCell.FormulaR1C1
ActiveCell.Offset(0, -15).Range("A1").Select 'Kay�tlar�n ba��na firmaya d�n�
Sheets("Rapor").Select
ActiveCell.FormulaR1C1 = Gorus$
ActiveCell.Offset(1, -11).Range("A1").Select
Atlama:
Next I
'---- Rapor Sayfas�n�n rengini ve bi�imini ayarlama -------------
Sheets("Rapor").Select
Cells.Select
Selection.Interior.ColorIndex = xlNone
Range("B3").Select
Application.DisplayFullScreen = False
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
End With
Application.DisplayFormulaBar = True
'---- S�ralama --------------------------------------------------
Range("A3:L65536").Select
If OptionButton1.Value = False Then GoTo Anhtr2
Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
GoTo AnhtrSn
Anhtr2:
If OptionButton2.Value = False Then GoTo Anhtr3
Selection.Sort Key1:=Range("C3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
GoTo AnhtrSn
Anhtr3:
If OptionButton3.Value = False Then GoTo Anhtr4
Selection.Sort Key1:=Range("E3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
GoTo AnhtrSn
Anhtr4:
If OptionButton4.Value = False Then GoTo Anhtr5
Selection.Sort Key1:=Range("F3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
GoTo AnhtrSn
Anhtr5:
If OptionButton5.Value = False Then GoTo Anhtr6
Selection.Sort Key1:=Range("H3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
GoTo AnhtrSn
Anhtr6:
Selection.Sort Key1:=Range("I3"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
AnhtrSn:
Range("B3").Select
ActiveSheet.Protect
Unload UserForm20
End Sub
Private Sub UserForm_Initialize()
Sheets("Menu").Select
'---- Yazd�rma Kontrol Kutular�n�n De�erleri --------------------
Range("AT2").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox1.Value = True Else
CheckBox1.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox2.Value = True Else
CheckBox2.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox3.Value = True Else
CheckBox3.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox4.Value = True Else
CheckBox4.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox5.Value = True Else
CheckBox5.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox6.Value = True Else
CheckBox6.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox7.Value = True Else
CheckBox7.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox8.Value = True Else
CheckBox8.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox9.Value = True Else
CheckBox9.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox10.Value = True Else
CheckBox10.Value = False
ActiveCell.Offset(1, 0).Range("A1").Select
If Val(ActiveCell.FormulaR1C1) = 1 Then CheckBox11.Value = True Else
CheckBox11.Value = False
'---- S�ralama Se�im D��melerinden Kay�t Numaras�n�n Se�ilmesi --
OptionButton1.Value = True
'---- Kay�t Numaras�n�n Tesbiti ---------------------------------
ActiveSheet.Unprotect
Range("AC1").Select
Selection.Copy
Range("AC2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
KayNo = Val(ActiveCell.FormulaR1C1)
For I = 1 To KayNo
ComboBox1.AddItem I
ComboBox2.AddItem I
Next I
ComboBox1.ListIndex = 0
ComboBox2.ListIndex = KayNo - 1
'---- Firma T�r�n�n Tesbiti -------------------------------------
Range("R1").Select
Selection.Copy
Range("R2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
FirmaTr = Val(ActiveCell.FormulaR1C1)
Range("S1").Select
For I = 1 To FirmaTr
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox3.AddItem ActiveCell.FormulaR1C1
ComboBox4.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox3.ListIndex = 0
ComboBox4.ListIndex = FirmaTr - 1
'---- �lgili �nvan�n�n Tesbiti -----------------------------------
Range("T1").Select
Selection.Copy
Range("T2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Unvan = Val(ActiveCell.FormulaR1C1)
Range("U1").Select
For I = 1 To Unvan
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox5.AddItem ActiveCell.FormulaR1C1
ComboBox6.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox5.ListIndex = 0
ComboBox6.ListIndex = Unvan - 1
'---- B�l�m�n Tesbiti -------------------------------------------
Range("V1").Select
Selection.Copy
Range("V2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Bolum = Val(ActiveCell.FormulaR1C1)
Range("W1").Select
For I = 1 To Bolum
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox7.AddItem ActiveCell.FormulaR1C1
ComboBox8.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox7.ListIndex = 0
ComboBox8.ListIndex = Bolum - 1
'---- �ehirlerin Tesbiti ----------------------------------------
Range("X1").Select
Selection.Copy
Range("X2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Sehir = Val(ActiveCell.FormulaR1C1)
Range("Y1").Select
For I = 1 To Sehir
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox9.AddItem ActiveCell.FormulaR1C1
ComboBox10.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox9.ListIndex = 0
ComboBox10.ListIndex = Sehir - 1
'---- B�lgelerin Tesbiti ----------------------------------------
Range("Z1").Select
Selection.Copy
Range("Z2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Bolge = Val(ActiveCell.FormulaR1C1)
Range("AA1").Select
For I = 1 To Bolge
ActiveCell.Offset(1, 0).Range("A1").Select
ComboBox11.AddItem ActiveCell.FormulaR1C1
ComboBox12.AddItem ActiveCell.FormulaR1C1
Next I
ComboBox11.ListIndex = 0
ComboBox12.ListIndex = Bolge - 1
ActiveSheet.Protect
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm3
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'------------- �nvan�n Kontrol� ---------------------------------
Unvan$ = TextBox2.Text
ActiveSheet.Protect
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm4
End Sub
Private Sub CommandButton2_Click()
Load UserForm3
UserForm3.Show
End Sub
Private Sub CommandButton3_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
Range("AC1").Select
Selection.Copy
Range("AC2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
KayNo = Val(ActiveCell.FormulaR1C1)
If KayNo > 1 Then GoTo Atlama
Dim Msg2, Style2, Title2, Response2
Msg2 = "Tek kalan kayd� silemezsiniz, ancak de�i�tirebilrsiniz."
Style2 = vbCritical
Title2 = " Sadece Bir Kay�t Mevcut !"
Response2 = MsgBox(Msg2, Style2, Title2)
GoTo Son
Atlama:
Dim Msg, Style, Title, Response, MyString
Msg = "Se�ti�iniz kay�t silinecektir ?"
Style = vbYesNo + vbQuestion + vbDefaultButton
Title = " Kay�t Silme Uyar�s� !"
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
MyString = "Yes"
'-------------- Silme i�lemi -------------------------------------
Range("AD2").Select
ActiveCell.Offset(ListBox1.ListIndex, 0).Range("A1").Select
ActiveCell.Range("A1:P1").Select 'Bulunulan sat�r verilerinin se�ilmesi
Selection.Delete Shift:=xlUp
ActiveCell.Select
'-------------- Tabloya �lk Kayd�n Konulmas� --------------------
Range("AF2").Select
Adsoyad$ = ActiveCell.FormulaR1C1
Range("AG2").Select
Adsoyad$ = Adsoyad$ & " " & ActiveCell.FormulaR1C1
TextBox2.Text = Adsoyad$
Range("AE2").Select
Tursayi = Val(ActiveCell.FormulaR1C1)
Range("AM2").Select
SehirSayi = Val(ActiveCell.FormulaR1C1)
Range("S1").Select
ActiveCell.Offset(Tursayi + 1, 0).Range("A1").Select
TextBox3.Text = ActiveCell.FormulaR1C1
Range("Y1").Select
ActiveCell.Offset(SehirSayi + 1, 0).Range("A1").Select
TextBox4.Text = ActiveCell.FormulaR1C1
ListBox1.RemoveItem (ListBox1.ListIndex)
ListBox1.ListIndex = 0
TextBox1.Text = ListBox1.ListIndex + 1
Else
MyString = "No"
End If
Son:
ActiveSheet.Protect
End Sub
Private Sub CommandButton4_Click()
Load UserForm2
UserForm2.Show
End Sub
End Sub
Devam2:
'------------- Kay�t ------------------------------------------------
Kaysay = Val(TextBox1.Text)
Range("S1").Select
ActiveCell.Offset(Kaysay, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = Unvan$ ' Firma T�r�
'------------- User Form Liste De�erinin D�zeltilmesi ------------
UserForm5.ListBox1.AddItem Unvan$
Unload UserForm6
Son:
ActiveSheet.Protect
End Sub
Private Sub UserForm_Initialize()
Sheets("Menu").Select
ActiveSheet.Unprotect
Range("R1").Select
Selection.Copy
Range("R2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect
Sayma = Val(ActiveCell.FormulaR1C1)
TextBox1.Text = Sayma + 1
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm7
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'------------- Kay�d�n Kontrol� ---------------------------------
Unvan$ = TextBox2.Text
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm9
End Sub
Private Sub CommandButton2_Click()
Sheets("Menu").Select
ActiveSheet.Unprotect
'------------- Kay�d�n Kontrol� ---------------------------------
Unvan$ = TextBox2.Text
Devam2:
'------------- Kay�t ------------------------------------------------
Kaysay = Val(TextBox1.Text)
Range("U1").Select
ActiveCell.Offset(Kaysay, 0).Range("A1").Select
ActiveCell.FormulaR1C1 = Unvan$ ' Firma T�r�
'------------- User Form Liste De�erinin D�zeltilmesi ------------
UserForm8.ListBox1.AddItem Unvan$
Unload UserForm9
Son:
ActiveSheet.Protect
End Sub
Private Sub UserForm_Initialize()
Sheets("Menu").Select
ActiveSheet.Unprotect
Range("T1").Select
Selection.Copy
Range("T2").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveSheet.Protect
Sayma = Val(ActiveCell.FormulaR1C1)
TextBox1.Text = Sayma + 1
End Sub
----------kod bitir------
----------kod basla------
Function a(sat�r, sutun)
a = Cells(sat�r, sutun).Value
End Function
Sub sayac()
j = 0
a5 = 0
[dn41] = 0
[dh41] = 0
ResumeSub:
Start = Timer * [bm41]
Do
DoEvents
finish = Timer * [bm41]
[ct41] = Format((finish - Start - j), "00")
If ((Cells(15, [db41]) = 1 Or Cells(11, [db41]) = 1 Or Cells(7, [db41]) = 1))
And [a5] = [cb41] Then Exit Sub
If [dn41] = 1 Then Exit Sub
Loop While ((finish - Start) - j) <= 118
a5 = a5 + 1
j = [db41] - 1
[dh41] = a5
GoTo ResumeSub:
End Sub
Sub durdur()
[dn41] = 1
End Sub
Sub auto_open()
Call sayac
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub KacarTane()
'----------------------------------------------------------------------------------
-----
' Procedure : KacarTane
' DateTime : 31.03.2005 21:46
' Author : danersin
' Purpose : www.excel.web.tr
'----------------------------------------------------------------------------------
-----
'
Dim i, j, k As Integer
Dim buldumu As Boolean
Dim yeni As Variant
Worksheets("b").Range("a2:az5000").ClearContents
For j = 2 To 9
For i = 2 To Cells(65536, j).End(xlUp).Row
yeni = Trim(Cells(i, j))
If yeni = "" Then GoTo 10
buldumu = False
For k = 1 To Worksheets("b").Cells(65536, j * 2).End(xlUp).Row + 1
If Trim(Worksheets("b").Cells(k, j * 2)) = yeni Then
Worksheets("b").Cells(k, j * 2 + 1) = Worksheets("b").Cells(k, j * 2 + 1) + 1
buldumu = True
Exit For
End If
Next k
If buldumu = False Then
Worksheets("b").Cells(Worksheets("b").Cells(65536, j * 2).End(xlUp).Row + 1, j _
* 2) = yeni
Worksheets("b").Cells(Worksheets("b").Cells(65536, j * 2).End(xlUp).Row, j * 2 _
+ 1) = Worksheets("b").Cells(Worksheets("b").Cells(65536, j * 2).End(xlUp).Row
_
+ 1, j * 2 + 1) + 1
End If
10
Next i
Next j
End Sub
----------kod bitir------
----------kod basla------
Sub tekrarsil()
Application.ScreenUpdating = False
a = WorksheetFunction.CountA(Columns(3))
[h2] = "=A2&B2&C2&D2&E2&F2&G2"
[h2].Copy
Range("H2:H" & a).PasteSpecial
c = 0
For bak = a To 2 Step -1
say = WorksheetFunction.CountIf(Range("H2:H" & a - 1), Cells(bak, 8))
If say > 1 Then
c = c + 1
Rows(Cells(bak, 8).Row).Delete
End If
Next bak
msg = "TOPLAM: " & c & " ADET M�KERRER KAYIT S�L�ND�"
If c = 0 Then
MsgBox ("M�KERRER KAYIT BULUNAMADI")
GoTo son
End If
MsgBox (msg)
son:
[H2:H65536].ClearContents
[H1].Select
End Sub
----------kod bitir------
----------kod basla------
Const CSIDL_PERSONAL = &H5
Const MyExt = "*.*"
Const IncludeSubFolder = False
----------kod bitir------
----------kod basla------
'***********************************************************************
'* My Documents - Belgelerim sistem klasorunu ve alt klasorleri *
'* ile dosyalarini harf sirasine gore menuler halinde listeleyen, *
'* ve menulerden secilen dosyalari acan yeni bir menu olusturulmasi *
'* ile ilgili bir calismadir. *
'* Aralik 2004 *
'* Raider � *
'* Buras� Excel vadisi .... *
'***********************************************************************
'
Const CSIDL_PERSONAL = &H5
Const MyExt = "*.*"
Const IncludeSubFolder = False
----------kod bitir------
----------kod basla------
Option Explicit
Sub repeatBotRows()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.Calculation = xlCalculationManual
n = 2
m = 0
Do
Range(Rows(firstPgBk * n - botCount - m), Rows(firstPgBk * n - m -
1)).Select
Selection.EntireRow.Insert Shift:=xlDown
botRows.Copy Range("A" & firstPgBk * n - botCount - m)
n = n + 1
m = m + 1
Loop Until n > totPages
Application.Calculation = xlCalculationAutomatic
' ActiveSheet.PrintOut
' ActiveSheet.Delete
ActiveSheet.Buttons.Delete
Application.DisplayAlerts = True
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal
hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal
hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
'
Const WS_SYSMENU = &H80000
Const GWL_STYLE = (-16)
'
Do
Set C = .FindNext(C)
adres = C.Address
adres = Right(adres, Len(adres) - 1)
ky = InStr(1, adres, "$", 1)
AD1 = Right(adres, Len(adres) - ky)
Worksheets("Ara").Cells(6 + SAY, 1).Value = SAY + 1
Worksheets("Ara").Cells(6 + SAY, 2).Value = C
Worksheets("Ara").Cells(6 + SAY, 5).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 2).Value)
Worksheets("Ara").Cells(6 + SAY, 6).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 3).Value)
Worksheets("Ara").Cells(6 + SAY, 7).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 22).Value)
Worksheets("Ara").Cells(6 + SAY, 8).Value =
Trim(Worksheets("Fihrist").Cells(AD1, 24).Value)
SAY = SAY + 1
Loop While Not C Is Nothing And C.Address <> firstAddress
End If
Worksheets("Ara").Cells(4, 8).Value = SAY
End With
Range("E2").Select 'aran�lacak kriterin yaz�ld��� yer
End Sub
----------kod bitir------
----------kod basla------
Sub renklendir()
For i = 3 To 52
If Cells(i, 20) = 0 Then
Cells(i, 20).Font.ColorIndex = 3
ElseIf Cells(i, 20) = 4 Then
Cells(i, 20).Font.ColorIndex = 5
ElseIf Cells(i, 20) = 3 Then
Cells(i, 20).Font.ColorIndex = 7
ElseIf Cells(i, 20) = 2 Then
Cells(i, 20).Font.ColorIndex = 10
ElseIf Cells(i, 20) = 1 Then
Cells(i, 20).Font.ColorIndex = 54
Else
Cells(i, 20).Font.ColorIndex = 0
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Dim GradeValue As Integer
Function point(Credit As Integer, Grade As String)
Dim ReturnValue
GradeValue = 1000
If Grade = "AA" Then GradeValue = 4
If Grade = "BA" Then GradeValue = 3.5
If Grade = "BB" Then GradeValue = 3
If Grade = "CB" Then GradeValue = 2.5
If Grade = "CC" Then GradeValue = 2
If Grade = "DC" Then GradeValue = 1.5
If Grade = "DD" Then GradeValue = 1
If Grade = "FD" Then GradeValue = 0.5
If Grade = "FF" Then GradeValue = 0
ReturnValue = Credit * GradeValue
If ReturnValue > 1000 Then
point = "Yanl� Grade"
Else
point = ReturnValue
End If
End Function
----------kod bitir------
----------kod basla------
Sub tarihler()
Range("A5:K65532").ClearContents
kayit = WorksheetFunction.CountA(Sheets("01").Range("A5:A65532"))
bastar = [a2].Value
bittar = [b2].Value
c = 0
For tarih = 5 To kayit + 5
tarihara = Sheets("01").Cells(tarih, 1).Value
If tarihara >= bastar And tarihara <= bittar Then
c = c + 1
For sut = 1 To 11
Cells(c + 4, sut) = Sheets("01").Cells(tarih, sut).Value
Next sut
End If
Next tarih
End Sub
----------kod bitir------
----------kod basla------
Sub nOBET()
Application.ScreenUpdating = False
Dim nob(5, 20) 'g�n�, s�ra
Range("nobets").ClearContents
Sheets("d").Range("araciz").ClearContents
For i = 1 To 5
For j = 1 To 4
If i = 1 Then
Range("BosGun").Select
Selection.Sort Key1:=Range("C10"), Order1:=xlDescending, Key2:=Range( _
"K10"), Order2:=xlDescending, Key3:=Range("J10"), Order3:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
End If
If i = 2 Then
Range("BosGun").Select
Selection.Sort Key1:=Range("d10"), Order1:=xlDescending, Key2:=Range( _
"K10"), Order2:=xlDescending, Key3:=Range("J10"), Order3:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
End If
If i = 3 Then
Range("BosGun").Select
Selection.Sort Key1:=Range("e10"), Order1:=xlDescending, Key2:=Range( _
"K10"), Order2:=xlDescending, Key3:=Range("J10"), Order3:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
End If
If i = 4 Then
Range("BosGun").Select
Selection.Sort Key1:=Range("f10"), Order1:=xlDescending, Key2:=Range( _
"K10"), Order2:=xlDescending, Key3:=Range("J10"), Order3:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
End If
If i = 5 Then
Range("BosGun").Select
Selection.Sort Key1:=Range("g10"), Order1:=xlDescending, Key2:=Range( _
"K10"), Order2:=xlDescending, Key3:=Range("J10"), Order3:=xlDescending, _
Header:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation:= _
xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
End If
If j = 1 Or j = 2 Or j = 6 Or j = 7 Or j = 11 Or j = 12 Or j = 16 Or j = 17 Then
Cells(Cells(9, 2).End(xlDown).Row, 10) = Cells(Cells(9, 2).End(xlDown).Row, 10) + 1
Cells(Cells(9, 2).End(xlDown).Row - 1, 10) = Cells(Cells(9, 2).End(xlDown).Row - 1,
10) + 1
Cells(Cells(9, 2).End(xlDown).Row - 2, 10) = Cells(Cells(9, 2).End(xlDown).Row - 2,
10) + 1
Cells(Cells(9, 2).End(xlDown).Row - 3, 10) = Cells(Cells(9, 2).End(xlDown).Row - 3,
10) + 1
Cells(Cells(9, 2).End(xlDown).Row - 4, 10) = Cells(Cells(9, 2).End(xlDown).Row - 4,
10) + 1
End If
Next j
Next i
For i = 1 To 5
For j = 1 To 4
Sheets("d").Cells(j * 5 - 4, i) = nob(i, j * 5 - 4)
Sheets("d").Cells(j * 5 - 3, i) = nob(i, j * 5 - 3)
Sheets("d").Cells(j * 5 - 2, i) = nob(i, j * 5 - 2)
Sheets("d").Cells(j * 5 - 1, i) = nob(i, j * 5 - 1)
Sheets("d").Cells(j * 5 - 0, i) = nob(i, j * 5 - 0)
Next j
Next i
Cells(1, 1).Select
Sheets("n�bet").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
sonsat = Sheets("BL").Cells(65536, 3).End(xlUp).Row
Sheets("BL").Cells(sonsat + 6) = TextBox1.Value = 1
Sheets("BL").Cells(sonsat + 5) = TextBox2.Value = 1
' D��ER TEXTBOXLARI BU MANTIKLA DEVAM ETT�RMEL�S�N�Z
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
sonsat = Sheets("BL").Cells(65536, 5).End(xlUp).Row + 1
Sheets("BL").Cells(sonsat, 5) = TextBox1.Value
Sheets("BL").Cells(sonsat, 6) = TextBox2.Value
' D��ER TEXTBOXLARI BU MANTIKLA DEVAM ETT�RMEL�S�N�Z
End Sub
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox3.Value = Val((TextBox1.Value) * 8) / 108
TextBox2.Value = Val(TextBox1.Value)
TextBox1.Value = Val(TextBox2.Value) - Val(TextBox3.Value)
End Sub
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox3.Value = Val((TextBox1.Value) * 8) / 108
TextBox2.Value = Val(TextBox1.Value)
TextBox1.Value = Val(TextBox2.Value) - Val(TextBox3.Value)
End Sub
----------kod bitir------
----------kod basla------
Sub a()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
satir = WorksheetFunction.CountA(Sheets("B").Range("A1:A65536")) + 1 'B sayfas�nda,
a kolonundaki son dolu h�creden sonraki satir
'If ComboBox1 = "" Then GoTo son:
'son: MsgBox ("Alan Bo� B�rak�lmamal�d�r"), ComboBox1.Value = ""
'TextBox1.Value = ""
'TextBox2.Value = ""
'ComboBox2.Value = ""
'bole bir�eyler yapt�m oda olmad� yard�m�n�z bekliyorum
Sheets("B").Cells(satir, 1) = ComboBox1.Value
Sheets("B").Cells(satir, 2) = TextBox1.Value
Sheets("B").Cells(satir, 3) = ComboBox2.Value
Sheets("B").Cells(satir, 4) = TextBox2.Value
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
End Sub
----------kod bitir------
----------kod basla------
Sub Filtrele()
'
' Filtrele Makro
' Makro isa karakus taraf�ndan 20.04.2005 tarihinde kaydedildi.
'
' Keyboard Shortcut: Ctrl+Shift+Z
'
Range("A2:B2").Select
Selection.AutoFilter
Range("A2").Select
Selection.AutoFilter Field:=1, Criteria1:=[D2]
End Sub
----------kod bitir------
----------kod basla------
Sub DENEME()
'
' DENEME Makro
' Makro isa karakus taraf�ndan 20.04.2005 tarihinde kaydedildi.
'
' Klavye K�sayolu: Ctrl+�stKrkt+M
'
Selection.Font.ColorIndex = 3
Selection.Font.Bold = True
With Selection.Font
.Name = "Arial"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 3
End With
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End Sub
----------kod bitir------
----------kod basla------
Sub aa()
For i = 9 To 18
Cells(i, 9).Value = Cells(i, 9).Value * 1.25
Next
End Sub
----------kod bitir------
----------kod basla------
Sub De�erDe�i�tirici7_De�i�tir()
End Sub
----------kod bitir------
----------kod basla------
Sub De�erDe�i�tirici7_De�i�tir()
End Sub
----------kod bitir------
----------kod basla------
Sub De�erDe�i�tirici7_De�i�tir()
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
With Worksheets("Sheet1")
.Protect Password:="a", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub Calendar1_Click()
TextBox1.Value = Calendar1.Value
Calendar1.Visible = False
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub ozetal()
Set S1 = Sheets("QUGUIL.RPR")
Set s2 = Sheets("Sayfa1")
xs1 = WorksheetFunction.CountA(S1.Range("a2:a65536"))
ReDim al(xs1, 4)
For y = 1 To xs1
For z = 1 To 4
al(y, z) = S1.Cells(y + 1, z)
Next z
Next y
For y = 1 To xs1
For z = y + 1 To xs1
If al(y, 1) = al(z, 1) Then
al(y, 3) = al(y, 3) + al(z, 3)
al(z, 1) = 0: al(z, 2) = 0: al(z, 3) = 0: al(z, 4) = 0
End If
Next z, y
s2.Range("a2:d65536").ClearContents
c = 0
For x = 1 To xs1
If al(x, 1) <> 0 Then
c = c + 1
For t = 1 To 3
s2.Cells(c + 1, t) = al(x, t)
Next t
End If
Next x
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0 'Turn off previous use
If Cells(1, 1) = "." Then Exit Sub
Target.EntireRow.Interior.ColorIndex = 28
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = 0 'Turn off previous use
If Cells(1, 1) = "." Then Exit Sub
Target.EntireRow.Interior.ColorIndex = 28
End Sub
----------kod bitir------
----------kod basla------
Sub odemelerilistele()
'
' Makro1 Makro
' Makro Asri taraf�ndan 26.04.2005 tarihinde kaydedildi.
'
'
'Rapor al�nacak ay�n bilgisi al�n�yor
Sheets("Rapor").Select
secilenay = Cells(1, 4).Value
'Listelemeye ba�lanacak sat�r numaras� al�n�yor
say = 3
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub aylik()
'
' aylik Macro
' Macro recorded 13.02.2005 by Ahmet SAAT�IO�LU
'
'
ChDir "C:\Documents and Settings\ahmed\Desktop\ayl�k"
Workbooks.OpenText Filename:= _
"C:\Documents and Settings\ahmed\Desktop\ayl�k\AKOCK002.TXT", Origin:=857,
_
StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 1), Array(8,
_
1), Array(35, 1), Array(52, 1), Array(83, 1), Array(99, 1), Array(125, 1),
Array(156, 1), _
Array(187, 1), Array(195, 1), Array(221, 1), Array(233, 1)),
DecimalSeparator:=".", _
ThousandsSeparator:=",", TrailingMinusNumbers:=True
Rows("1:4").Select
Selection.Delete Shift:=xlUp
Rows("2:2").Select
Selection.Delete Shift:=xlUp
End Sub
Sub acikhesap()
'
' acikhesap Macro
' Macro recorded 13.02.2005 by Ahmet SAAT�IO�LU
'
'
ChDir "C:\"
Workbooks.Open Filename:="C:\11022005 a�yk hesaplar.xls", Origin:= _
xlWindows
Sheets("11022005 a��k hesaplar").Select
Range("B19").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""sat"",MID(RC[1],7,30),R[-1]C)"
Selection.AutoFill Destination:=Range("B19:B13000"), Type:=xlFillDefault
Range("B19:B13000").Select
Application.CutCopyMode = False
' Selection.AutoFill Destination:=Range("B23:B12279"), Type:=xlFillDefault
Columns("B:B").Select
Range("B12255").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B12264").Select
Application.CutCopyMode = False
' Range("B23").Select
'ActiveCell.FormulaR1C1 = "SATI� SORUMLUSU"
Rows("1:1").Select
' Selection.AutoFilter
Sheets("11022005 a��k hesaplar").Select
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Range("B1").Select
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'11022005 a��k hesaplar'!R1C1:R2500C10").CreatePivotTable
TableDestination:= _
"", TableName:="�zet Tablo 2", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
With ActiveSheet.PivotTables("�zet Tablo 2").PivotFields("sorumlu")
.Orientation = xlRowField
.Position = 1
End With
ActiveSheet.PivotTables("�zet Tablo 2").AddDataField ActiveSheet.PivotTables( _
"�zet Tablo 2").PivotFields("tutar"), "Say tutar", xlCount
Range("A3").Select
ActiveSheet.PivotTables("�zet Tablo 2").PivotFields("Say tutar").Function = _
xlSum
Columns("B:B").ColumnWidth = 7.14
Columns("B:B").Select
Selection.NumberFormat = "#,##0.00"
Range("D9").Select
ActiveWindow.SmallScroll Down:=-21
Dim i As Integer
Dim z As Integer
Dim s, gec As String
Dim s1 As String
Dim y As Integer
i = 0
For Each hucre In Range("A1:A863")
i = i + 1
s = Cells(i, 1).Value
For z = 1 To Len(s)
End If
Next z
Next hucre
End Sub
Sub tem()
Dim icerik As String
icerik = Columns("C:C").Select
If InStr(icerik, "toplam") Then
Selection.Offset("icerik") = A
Selection.Offset("icerik").EntireRow.Delete
End If
End Sub
Sub temiz()
Dim A
For i = 1 To 2000
A = Selection.Offset(2 + i, 2).Value
If Selection.Offset(2 + i, 2).Value = 23 Then
Selection.Offset("a").EntireRow.Delete
Exit For
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Sub Dikd�rtgen1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
sat = Sheets("sayfa1").Columns(3).Find(ComboBox1.Value).Row
Sheets("sayfa1").Rows(sat).Delete
End Sub
----------kod bitir------
----------kod basla------
Dim dev(17000, 3), cari(17000, 3), sfson, sf
Sub kontrol()
Set sf = Sheets("sayfa1")
Set sf2 = Sheets("sayfa2")
devson = WorksheetFunction.CountA(sf.Range("a2:a65536"))
carison = WorksheetFunction.CountA(sf.Range("d2:d65536"))
sf2.[a2:I65536].ClearContents
For x = 1 To devson
For y = 1 To 3
dev(x, y) = Cells(x + 1, y)
Next y, x
For x = 1 To carison
For y = 1 To 3
cari(x, y) = Cells(x + 1, y + 3)
Next y, x
c = 1
For x = 1 To devson
For y = 1 To carison
If dev(x, 2) = cari(y, 2) Then
If dev(x, 3) <> cari(y, 3) Then
c = c + 1
For m = 1 To 3
sf2.Cells(c, m) = dev(x, m)
sf2.Cells(c, m + 3) = cari(y, m)
Next m
End If
End If
Next y, x
End Sub
----------kod bitir------
----------kod basla------
Sub DialogSheets_G�ster()
DialogSheets("�leti�im Kutusu1").Show
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
If vbYes = MsgBox("S�ralanacak Alan� Se�tiyseniz ok", vbYesNo) Then
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
If vbYes = MsgBox("S�ralanacak Alan� Se�tiyseniz ok", vbYesNo) Then
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
If vbYes = MsgBox("S�ralanacak Alan� Se�tiyseniz ok", vbYesNo) Then
Selection.Sort Key1:=Range("B2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
If vbYes = MsgBox("S�ralanacak Alan� Se�tiyseniz ok", vbYesNo) Then
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 2 To 6
If Sheets("sayfa2").Cells(a, 2) = "" Then
Sheets("sayfa2").Cells(a, 2) = Sheets("sayfa1").Cells(1, 3).Value
Sheets("sayfa2").Cells(a, 3) = Sheets("sayfa1").Cells(2, 3).Value
Sheets("sayfa2").Cells(a, 4) = Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a, 5) = Sheets("sayfa1").Cells(2, 3).Value +
Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a + 8, 2) = Sheets("sayfa1").Cells(4, 3).Value
Sheets("sayfa2").Cells(a + 8, 3) = Sheets("sayfa1").Cells(5, 3).Value
Sheets("sayfa2").Cells(a + 8, 4) = Sheets("sayfa1").Cells(6, 3).Value
Sheets("sayfa2").Cells(a + 8, 5) = Sheets("sayfa1").Cells(7, 3).Value
Sheets("sayfa2").Cells(a + 8, 6) = Sheets("sayfa1").Cells(5, 3).Value +
Sheets("sayfa1").Cells(6, 3).Value + Sheets("sayfa1").Cells(7, 3).Value +
(Sheets("sayfa1").Cells(2, 3).Value + Sheets("sayfa1").Cells(3, 3).Value) *
Sheets("sayfa1").Cells(4, 3).Value
GoTo 10
End If
Next a
Sheets("Sayfa2").Copy Before:=Sheets(2)
Sheets("Sayfa2").Select
Range("B2:E6").Select
Selection.ClearContents
Range("B10:F14").Select
Selection.ClearContents
Sheets("Sayfa2").Move Before:=Sheets(2)
Sheets("Sayfa1").Select
10 Label8 = "SAYFA2'YE KAYDED�LD�"
'10 Range("C1:C7").ClearContents
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub hesapla()
For i = 3 To WorksheetFunction.CountA(Range("a1:a65000"))
Cells(i, 4) = Cells(i, 2) * Range("b1")
Next i
End Sub
----------kod bitir------
----------kod basla------
Exit For
Next
End Sub
Private Sub CommandButton2_Click() 'combobox'ta se�ili olanan verileri g�ncelleme
yapar
If ComboBox1.Value = "" Then
MsgBox "Yeniden d�zenlenecek tarihi se�in"
Exit Sub
End If
For i = 12 To 65536
Dim a As Integer
a = Columns(3).Find(TextBox4.Value).Row
Cells(a, 4) = TextBox5.Text
Cells(a, 5) = TextBox6.Text
Cells(a, "f") = TextBox7.Text
Cells(a, "g") = TextBox8.Text
Cells(a, "h") = TextBox9.Text
Cells(a, "�") = TextBox10.Text
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
MsgBox "B�LG�LER G�NCELLEND�."
Exit For
Next
End Sub
Private Sub Kapat_Click()
Unload Me
End Sub
Private Sub CommandButton1_Click() 'combobox'ta se�ili olanan verileri siler
If ComboBox1.Value = "" Then
MsgBox "Yeniden d�zenlenecek tarihi se�in"
Exit Sub
End If
Dim t As Range
For Each t In Range("c12:c100")
If t = TextBox4 Then
t.Offset(0, 0) = TextBox5
t.Offset(0, 1) = TextBox6
t.Offset(0, 2) = TextBox7
t.Offset(0, 3) = TextBox8
t.Offset(0, 4) = TextBox9
t.Offset(0, 5) = TextBox10
[d12:l100].Sort Key1:=[d12]
MsgBox "B�LG�LER G�NCELLEND�."
End If
Next
End Sub
End Sub
End Sub
Private Sub CommandButton2_Click()
a1 = ComboBox1.Value * 1 + 11
Cells(a1, 4) = TextBox5.Value
Cells(a1, 5) = TextBox6.Value
Cells(a1, 6) = TextBox7.Value
Cells(a1, 7) = TextBox8.Value
Cells(a1, 8) = TextBox9.Value
Cells(a1, 9) = TextBox10.Value
End Sub
Private Sub TextBox5_Change()
TextBox5 = Format(TextBox5, "dd.mmmm.yy")
End Sub
'
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1278]C4"
Range("C1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1287]C2"
Range("D1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1281]C2"
Range("E1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1285]C2"
Range("F1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1286]C2"
Range("G1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1239]C4"
Range("H1292").Select
ActiveWindow.SmallScroll ToRight:=5
Range("K1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1280]C4"
Range("L1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1277]C10"
Range("M1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1274]C12"
Range("N1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1243]C12"
Range("P1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1245]C1"
Range("P1293").Select
ActiveWindow.SmallScroll ToRight:=4
Range("Q1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1274]C8+'Sheet1 (2)'!R[-1273]C8"
Range("R1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1272]C8+'Sheet1 (2)'!R[-1271]C8"
Range("S1292").Select
ActiveCell.FormulaR1C1 = "=RC[-2]+RC[-1]"
Range("S1293").Select
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Rows("1292:1292").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B1292").Select
End Sub
----------kod bitir------
----------kod basla------
Function Yaziyla$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v(15)
Dim c(3)
b$(0) = ""
b$(1) = "Bir "
b$(2) = "�ki "
b$(3) = "�� "
b$(4) = "D�rt "
b$(5) = "Be� "
b$(6) = "Alt� "
b$(7) = "Yedi "
b$(8) = "Sekiz "
b$(9) = "Dokuz "
y$(0) = ""
y$(1) = "On "
y$(2) = "Yirmi "
y$(3) = "Otuz "
y$(4) = "K�rk "
y$(5) = "Elli "
y$(6) = "Altm� "
y$(7) = "Yetmi� "
y$(8) = "Seksen "
y$(9) = "Doksan "
a$ = Str(sayi)
If Left$(a$, 1) = " " Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) < Asc("0")) Then GoTo
hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
s$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�z"
Else
e$ = b$(c(1)) + "Y�z "
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "BirBin") Then e$ = "Bin "
s$ = s$ + e$
Next x
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro DUMLUPINAR �N�VERS�TES� taraf�ndan 13.09.2002 tarihinde kaydedildi.
'
'
End Sub
----------kod bitir------
----------kod basla------
Sub Form_ac()
UserForm1.Show 0
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function GetSystemMetrics32 Lib "User32" Alias "GetSystemMetrics" _
(ByVal nIndex As Long) As Long
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("giris").Range("f12").Value = TexBox1
Sheets("giris").Range("f13").Value = TexBox2
Sheets("giris").Range("f14").Value = TexBox3
Sheets("K-ST").Range("B12").Value = TexBox4
Sheets("K-ST").Range("A12").Value = TexBox5
Sheets("K-ST").Range("B13").Value = TexBox6
Sheets("K-ST").Range("A13").Value = TexBox7
Sheets("K-ST").Range("B14").Value = TexBox8
Sheets("K-ST").Range("A14").Value = TexBox9
Sheets("K-ST").Range("B15").Value = TexBox10
Sheets("K-ST").Range("A15").Value = TexBox11
Sheets("K-ST").Range("B16").Value = TexBox12
Sheets("K-ST").Range("A16").Value = TexBox13
Unload Me
Application.Visible = True
Sheets("giris").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 2 To 6
If Sheets("sayfa2").Cells(a, 2) = "" Then
Sheets("sayfa2").Cells(a, 2) = Sheets("sayfa1").Cells(1, 3).Value
Sheets("sayfa2").Cells(a, 3) = Sheets("sayfa1").Cells(2, 3).Value
Sheets("sayfa2").Cells(a, 4) = Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a, 5) = Sheets("sayfa1").Cells(2, 3).Value +
Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a + 8, 2) = Sheets("sayfa1").Cells(4, 3).Value
Sheets("sayfa2").Cells(a + 8, 3) = Sheets("sayfa1").Cells(5, 3).Value
Sheets("sayfa2").Cells(a + 8, 4) = Sheets("sayfa1").Cells(6, 3).Value
Sheets("sayfa2").Cells(a + 8, 5) = Sheets("sayfa1").Cells(7, 3).Value
Sheets("sayfa2").Cells(a + 8, 6) = Sheets("sayfa1").Cells(5, 3).Value +
Sheets("sayfa1").Cells(6, 3).Value + Sheets("sayfa1").Cells(7, 3).Value +
(Sheets("sayfa1").Cells(2, 3).Value + Sheets("sayfa1").Cells(3, 3).Value) *
Sheets("sayfa1").Cells(4, 3).Value
GoTo 10
End If
Next a
Sheets("Sayfa2").Copy Before:=Sheets(2)
Sheets("Sayfa2").Select
Range("B2:E6").Select
Selection.ClearContents
Range("B10:F14").Select
Selection.ClearContents
Sheets("Sayfa2").Move Before:=Sheets(2)
Sheets("Sayfa1").Select
10 Label8 = "SAYFA2'YE KAYDED�LD�"
'10 Range("C1:C7").ClearContents
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Exit For
End If
Next i
MsgBox "Veriler kaydedildi, L�tfen kontrol edin"
End Sub
Private Sub Kapat_Click()
Unload Me
End Sub
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
For c = 2 To 9
Controls("textbox" & c) = ListBox1.List(ListBox1.ListIndex, c - 2)
Next
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 2 To 6
If Sheets("sayfa2").Cells(a, 2) = "" Then
Sheets("sayfa2").Cells(a, 2) = Sheets("sayfa1").Cells(1, 3).Value
Sheets("sayfa2").Cells(a, 3) = Sheets("sayfa1").Cells(2, 3).Value
Sheets("sayfa2").Cells(a, 4) = Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a, 5) = Sheets("sayfa1").Cells(2, 3).Value +
Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a + 8, 2) = Sheets("sayfa1").Cells(4, 3).Value
Sheets("sayfa2").Cells(a + 8, 3) = Sheets("sayfa1").Cells(5, 3).Value
Sheets("sayfa2").Cells(a + 8, 4) = Sheets("sayfa1").Cells(6, 3).Value
Sheets("sayfa2").Cells(a + 8, 5) = Sheets("sayfa1").Cells(7, 3).Value
Sheets("sayfa2").Cells(a + 8, 6) = Sheets("sayfa1").Cells(5, 3).Value +
Sheets("sayfa1").Cells(6, 3).Value + Sheets("sayfa1").Cells(7, 3).Value +
(Sheets("sayfa1").Cells(2, 3).Value + Sheets("sayfa1").Cells(3, 3).Value) *
Sheets("sayfa1").Cells(4, 3).Value
GoTo 10
End If
Next a
Sheets("Sayfa2").Copy Before:=Sheets(2)
Sheets("Sayfa2").Select
Range("B2:E6").Select
Selection.ClearContents
Range("B10:F14").Select
Selection.ClearContents
Sheets("Sayfa2").Move Before:=Sheets(2)
Sheets("Sayfa1").Select
10 Label8 = "SAYFA2'YE KAYDED�LD�"
'10 Range("C1:C7").ClearContents
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 2 To 6
If Sheets("sayfa2").Cells(a, 2) = "" Then
Sheets("sayfa2").Cells(a, 2) = Sheets("sayfa1").Cells(1, 3).Value
Sheets("sayfa2").Cells(a, 3) = Sheets("sayfa1").Cells(2, 3).Value
Sheets("sayfa2").Cells(a, 4) = Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a, 5) = Sheets("sayfa1").Cells(2, 3).Value +
Sheets("sayfa1").Cells(3, 3).Value
Sheets("sayfa2").Cells(a + 8, 2) = Sheets("sayfa1").Cells(4, 3).Value
Sheets("sayfa2").Cells(a + 8, 3) = Sheets("sayfa1").Cells(5, 3).Value
Sheets("sayfa2").Cells(a + 8, 4) = Sheets("sayfa1").Cells(6, 3).Value
Sheets("sayfa2").Cells(a + 8, 5) = Sheets("sayfa1").Cells(7, 3).Value
Sheets("sayfa2").Cells(a + 8, 6) = Sheets("sayfa1").Cells(5, 3).Value +
Sheets("sayfa1").Cells(6, 3).Value + Sheets("sayfa1").Cells(7, 3).Value +
(Sheets("sayfa1").Cells(2, 3).Value + Sheets("sayfa1").Cells(3, 3).Value) *
Sheets("sayfa1").Cells(4, 3).Value
GoTo 10
End If
Next a
Sheets("Sayfa2").Copy Before:=Sheets(2)
Sheets("Sayfa2").Select
Range("B2:E6").Select
Selection.ClearContents
Range("B10:F14").Select
Selection.ClearContents
Sheets("Sayfa2").Move Before:=Sheets(2)
Sheets("Sayfa1").Select
10 Label8 = "SAYFA2'YE KAYDED�LD�"
'10 Range("C1:C7").ClearContents
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub sayfasec()
sayfasecform.Show
End Sub
----------kod bitir------
----------kod basla------
ListBox1.AddItem Sheets.Item(x).Name
Next
End Sub
----------kod bitir------
----------kod basla------
Sub sayfasec()
sayfasecform.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ListBox1_Click()
Eski = Range("d1")
yeni = ListBox1.List(ListBox1.ListIndex)
Range("d1") = yeni
Sheets("DUBL�R").Cells.Replace Eski, yeni, xlPart, xlByRows
End Sub
Private Sub UserForm_Activate()
kacsayfa = Sheets.Count
For x = 1 To kacsayfa
If Sheets.Item(x).Name = "DUBL�R" Then Exit For
ListBox1.AddItem Sheets.Item(x).Name
Next
End Sub
----------kod bitir------
----------kod basla------
Sub listeyeaktar()
Sheets("sheet1").Select
Set s1 = Sheets("Sheet1")
Set s2 = Sheets("Sheet2")
say = WorksheetFunction.CountA(s2.[b7:b10])
For sat = 1 To say
c = WorksheetFunction.CountA(s1.[b2:b65536])
s1.Cells(c + 2, 2) = s2.[d14].Value
s1.Cells(c + 2, 3) = s2.[b5].Value
s1.Cells(c + 2, 4) = s2.[b11].Value
s1.Cells(c + 2, 5) = s2.Cells(sat + 6, 2).Value
s1.Cells(c + 2, 6) = s2.[b6].Value
s1.Cells(c + 2, 7) = s2.[d53].Value
s1.Cells(c + 2, 11) = s2.[d12].Value
s1.Cells(c + 2, 12) = s2.[j15].Value
s1.Cells(c + 2, 13) = s2.[l18].Value
s1.Cells(c + 2, 14) = s2.[l49].Value
s1.Cells(c + 2, 16) = s2.[a47].Value
s1.Cells(c + 2, 17) = s2.Cells(sat * 5 + 13, 8).Value + s2.Cells(sat * 5 + 14,
8).Value
s1.Cells(c + 2, 18) = s2.Cells(sat * 5 + 15, 8).Value + s2.Cells(sat * 5 + 16,
8).Value
s1.Cells(c + 2, 19) = s2.Cells(sat * 5 + 13, 8).Value + s2.Cells(sat * 5 + 14,
8).Value + s2.Cells(sat * 5 + 15, 8).Value + s2.Cells(sat * 5 + 16, 8).Value
Next
End Sub
----------kod bitir------
----------kod basla------
Sub AKTARMA()
'
' AKTARMA Macro
' Macro recorded 19/04/2005 by DENIZBANK
'
'
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1278]C4"
Range("C1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1287]C2"
Range("D1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1281]C2"
Range("E1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1285]C2"
Range("F1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1286]C2"
Range("G1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1239]C4"
Range("H1292").Select
ActiveWindow.SmallScroll ToRight:=5
Range("K1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1280]C4"
Range("L1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1277]C10"
Range("M1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1274]C12"
Range("N1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1243]C12"
Range("P1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1245]C1"
Range("P1293").Select
ActiveWindow.SmallScroll ToRight:=4
Range("Q1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1274]C8+'Sheet1 (2)'!R[-1273]C8"
Range("R1292").Select
ActiveCell.FormulaR1C1 = "='Sheet1 (2)'!R[-1272]C8+'Sheet1 (2)'!R[-1271]C8"
Range("S1292").Select
ActiveCell.FormulaR1C1 = "=RC[-2]+RC[-1]"
Range("S1293").Select
ActiveWindow.ScrollColumn = 12
ActiveWindow.ScrollColumn = 11
ActiveWindow.ScrollColumn = 10
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 8
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 3
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 1
Rows("1292:1292").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B1292").Select
End Sub
----------kod bitir------
----------kod basla------
Sub sayfa2()
Range("A1").Copy
Sheets("Sayfa2").Select
Range("A1").Select
ActiveSheet.Paste
Range("A6").Select
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Sub gerid�n()
Sheets("Sayfa1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Se�enekD��mesi9_T�klat()
Range("B7").Formula = "=""EK TABLO: PROJEL� DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
Sub Se�enekD��mesi10_T�klat()
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da ""&upper(C3)&""
���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
'
' Macro2 Macro
' Macro recorded 19.06.2003 by Ayhan
'
'
Dim urun, proje, mevcut, mevcuta, mevcutb
urun = LCase(Range("C3").Value)
proje = LCase(Range("H2").Value)
mevcut = LCase(Range("G2").Value)
Range("A3:P53").Select
Selection.Copy
Range("a1").Select
If Range("b1").Value = 2 And Range("c3").Value <> "" And urun <> mevcut Then
Application.ScreenUpdating = False
Sheets("MEVMAL").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F6:N26").Select
Selection.Sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
ElseIf Range("b1").Value = 1 And Range("c3").Value <> "" And urun <> proje Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F29:N49").Select
Selection.Sort Key1:=Range("F29"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
End If
Sheets("MGIRISI").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown21_Change()
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
'Columns("C:C").Select
Cells.Find(What:=mevcut, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("A3").Select
Application.CutCopyMode = False
Sheets("PMALIYET").Select
'Columns("C:C").Select
Cells.Find(What:=proje, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Sheets("MGIRISI").Select
Range("A3").Select
Application.CutCopyMode = False
End If
Range("D1").Value = ""
End Sub
Sub UrunSil()
'
' Macro4 Macro
' Macro recorded 26.06.2003 by Ayhan
'
'
Dim urun, mevcut, proje, ilkhucre, sonhucre
urun = Range("C3")
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
Sheets("VERI_GIRISI").Select
Sheets("PMALIYET").Select
Sheets("VERI_GIRISI").Select
Range("F29:F49").Select
Sheets("MGIRISI").Select
Range("A3").Select
Else: MsgBox ("Daha �nce b�yle bir �r�n girilmedi.")
End If
Range("C1").Value = ""
End Sub
Sub TabloSil()
Application.ScreenUpdating = False
Sheets("MGIRISI").Select
Range("C3:C6,H3:H6,C30:C43,D10:H51, F10:H51, M10:N51").Select
Selection.ClearContents
Range("C1").Value = ""
Range("C1").Value = ""
Range("a3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown25_Change()
'
' aktar Macro
' Macro recorded 13.06.2003 by Ayhan
'
Dim sil
Dim i As Integer
Dim ss As Integer
Application.Run "TabloSil"
urun = Range("d1").Value
urunad = Range("c3").Value
Worksheets("DONE_GIRIS").Select
Do
i = 1
For i = 1 To 225
Worksheets("MGIRISI").Select
Range("C3").Value = urun2
Range("C1").Value = ""
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub deg�st�r()
Cells.Replace What:="$", Replacement:="L", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
End Sub
----------kod bitir------
----------kod basla------
Sub yanurun()
c = 0
For a = 3 To WorksheetFunction.CountA(Sheets("sayfa2").[b3:b65536]) + 3
If Sheets("sayfa2").Cells(a, 6) <> "" Then
c = c + 1
Cells(24 + c, 1) = Sheets("sayfa2").Cells(a, 6).Value
Cells(24 + c, 4) = Sheets("sayfa2").Cells(a, 9).Value
Cells(24 + c, 5) = Sheets("sayfa2").Cells(a, 7).Value
Cells(24 + c, 6) = Sheets("sayfa2").Cells(a, 8).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
[g6:g65536].ClearContents
c = 0
d = 0
For b = 1 To 4 Step 3
say = WorksheetFunction.CountA(Range(Cells(6, b), Cells(65536, b))) + 5
For a = 6 To say
Var = WorksheetFunction.CountIf([g6:g65536], Cells(a, b).Value)
If Var = 0 Then
c = c + 1
Cells(c + 5, 7) = Cells(a, b).Value
If b = 1 Then Cells(c + 5, 9) = Cells(a, b + 1).Value
Cells(c + 5, 8) = WorksheetFunction.SumIf([d2:d65536], Cells(c + 5, 7),
[e2:e65536])
End If
Next a
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub Se�enekD��mesi9_T�klat()
Range("B7").Formula = "=""EK TABLO: PROJEL� DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
Sub Se�enekD��mesi10_T�klat()
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da ""&upper(C3)&""
���N YAPILAN MASRAFLAR"""
Range("C1").Value = ""
Range("L4").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
'
' Macro2 Macro
' Macro recorded 19.06.2003 by Ayhan
'
'
Dim urun, proje, mevcut, mevcuta, mevcutb
urun = LCase(Range("C3").Value)
proje = LCase(Range("H2").Value)
mevcut = LCase(Range("G2").Value)
Range("A3:P53").Select
Selection.Copy
Range("a1").Select
If Range("b1").Value = 2 And Range("c3").Value <> "" And urun <> mevcut Then
Application.ScreenUpdating = False
Sheets("MEVMAL").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F4").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F6:N26").Select
Selection.Sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
ElseIf Range("b1").Value = 1 And Range("c3").Value <> "" And urun <> proje Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Range("a1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Range("a1").Select
Sheets("MGIRISI").Select
Range("C3:C6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Sheets("MGIRISI").Select
Range("H3:H6").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 4).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Sheets("MGIRISI").Select
Range("P52").Select
Selection.Copy
Sheets("VERI_GIRISI").Select
Range("F27").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 8).Range("a1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
Application.CutCopyMode = False
Range("F29:N49").Select
Selection.Sort Key1:=Range("F29"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("F5").Select
Sheets("MGIRISI").Select
'Range("B1").Value = 3
Range("C3:C6,H3:H6,D1").Value = ""
End If
Sheets("MGIRISI").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown21_Change()
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
'Columns("C:C").Select
Cells.Find(What:=mevcut, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("B7").Formula = "=""EK TABLO: MEVCUT DURUMDA 1 Da
""&upper(C3)&"" ���N YAPILAN MASRAFLAR"""
Range("A3").Select
Application.CutCopyMode = False
Sheets("PMALIYET").Select
'Columns("C:C").Select
Cells.Find(What:=proje, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.End(xlToLeft).Select
Range("A1").Select
Sheets("MGIRISI").Select
Range("A3").Select
ActiveSheet.Paste
Range("A3").Select
Sheets("MGIRISI").Select
Range("A3").Select
Application.CutCopyMode = False
End If
Range("D1").Value = ""
End Sub
Sub UrunSil()
'
' Macro4 Macro
' Macro recorded 26.06.2003 by Ayhan
'
'
Dim urun, mevcut, proje, ilkhucre, sonhucre
urun = Range("C3")
mevcut = Range("G1")
proje = Range("H1")
Sheets("MEVMAL").Select
Sheets("VERI_GIRISI").Select
Sheets("MGIRISI").Select
Range("A3").Select
ElseIf Range("b1").Value = 1 And LCase(urun) = LCase(proje) Then
Application.ScreenUpdating = False
Sheets("PMALIYET").Select
Sheets("VERI_GIRISI").Select
Range("F29:F49").Select
Sheets("MGIRISI").Select
Range("A3").Select
Else: MsgBox ("Daha �nce b�yle bir �r�n girilmedi.")
End If
Range("C1").Value = ""
End Sub
Sub TabloSil()
Application.ScreenUpdating = False
Sheets("MGIRISI").Select
Range("C3:C6,H3:H6,C30:C43,D10:H51, F10:H51, M10:N51").Select
Selection.ClearContents
Range("C1").Value = ""
Range("C1").Value = ""
Range("a3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub DropDown25_Change()
'
' aktar Macro
' Macro recorded 13.06.2003 by Ayhan
'
Dim sil
Dim i As Integer
Dim ss As Integer
Application.Run "TabloSil"
urun = Range("d1").Value
urunad = Range("c3").Value
Worksheets("DONE_GIRIS").Select
Do
i = 1
For i = 1 To 225
Worksheets("MGIRISI").Select
Range("C3").Value = urun2
Range("C1").Value = ""
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub deg�st�r()
Cells.Replace What:="$", Replacement:="L", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False
End Sub
----------kod bitir------
----------kod basla------
Sub yanurun()
c = 0
For a = 3 To WorksheetFunction.CountA(Sheets("sayfa2").[b3:b65536]) + 3
If Sheets("sayfa2").Cells(a, 6) <> "" Then
c = c + 1
Cells(24 + c, 1) = Sheets("sayfa2").Cells(a, 6).Value
Cells(24 + c, 4) = Sheets("sayfa2").Cells(a, 9).Value
Cells(24 + c, 5) = Sheets("sayfa2").Cells(a, 7).Value
Cells(24 + c, 6) = Sheets("sayfa2").Cells(a, 8).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
[g6:g65536].ClearContents
c = 0
d = 0
For b = 1 To 4 Step 3
say = WorksheetFunction.CountA(Range(Cells(6, b), Cells(65536, b))) + 5
For a = 6 To say
Var = WorksheetFunction.CountIf([g6:g65536], Cells(a, b).Value)
If Var = 0 Then
c = c + 1
Cells(c + 5, 7) = Cells(a, b).Value
If b = 1 Then Cells(c + 5, 9) = Cells(a, b + 1).Value
Cells(c + 5, 8) = WorksheetFunction.SumIf([d2:d65536], Cells(c + 5, 7),
[e2:e65536])
End If
Next a
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub Takvim()
Dim gun, Ay, Yil As Integer
Range("A:B").ClearContents
Yil = InputBox("�stedi�iniz Y�l'� Giriniz", "Y�l Giri�i", "2005", 500, 500)
Range("C1").Value = Yil
gun = 1
Ay = 1
basla:
tarih = DateSerial(Yil, Ay, gun)
Do While Year(tarih) = Yil
Cells(gun, 2) = tarih
Cells(gun, 1) = Format(tarih, "dddd")
gun = gun + 1
GoTo basla
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub Takvim()
Dim gun, Ay, Yil As Integer
Range("A2:B400").ClearContents
Yil = InputBox("�stedi�iniz Y�l'� Giriniz", "Y�l Giri�i", "2005", 500, 500)
Range("k3").Value = Yil
gun = 1
Ay = 1
basla:
tarih = DateSerial(Yil, Ay, gun)
Do While Year(tarih) = Yil
Cells(gun + 1, 2) = tarih
Cells(gun + 1, 1) = Format(tarih, "dddd")
gun = gun + 1
GoTo basla
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub ozetsay()
Set s1 = Sheets("sayfa1")
Set s2 = Sheets("sayfa2")
sons1 = WorksheetFunction.CountA(s1.Range("b2:b65536"))
's2.Range("b1:IV2").ClearContents
ReDim al(sons1, 2)
'verileri al
For x = 1 To sons1
al(x, 1) = s1.Cells(x + 1, 2)
al(x, 2) = 1
Next x
'verileri birle�tir
For x = 2 To sons1
For y = 1 To x - 1
If al(x, 1) = al(y, 1) Then
al(y, 2) = al(y, 2) + 1
al(x, 1) = ""
al(x, 2) = 0
End If
Next y, x
'verileri s�rala
For m = 1 To sons1
For n = 1 To m
If al(m, 1) < al(n, 1) Then
ara = al(m, 1)
al(m, 1) = al(n, 1)
al(n, 1) = ara
ara = al(m, 2)
al(m, 2) = al(n, 2)
al(n, 2) = ara
End If
Next n, m
'verileri yaz
For m = 1 To sons1
If al(m, 1) <> "" Then
c = c + 1
s2.Cells(1, c + 1) = al(m, 1)
s2.Cells(2, c + 1) = al(m, 2)
End If
Next m
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
Columns("I:L").ClearContents
For a = 2 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("A2:A" & a), Cells(a, 1).Value) = 1 Then
c = c + 1
Cells(c + 1, 9) = Cells(a, 1).Value
Cells(c + 1, 10) = Cells(a, 2).Value
Cells(c + 1, 11) = WorksheetFunction.SumIf([a2:a65536], Cells(a, 1).Value,
[c2:c65536])
Cells(c + 1, 12) = WorksheetFunction.SumIf([a2:a65536], Cells(a, 1).Value,
[d2:d65536])
End If
Next a
adr = "i2:l" & c + 1
Range(adr).Sort Key1:=[i2]
MsgBox "L�STE TAMAMLANDI"
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
Columns("I:L").ClearContents
For a = 2 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("A2:A" & a), Cells(a, 1).Value) = 1 Then
c = c + 1
Cells(c + 1, 9) = Cells(a, 1).Value
Cells(c + 1, 10) = Cells(a, 2).Value
Cells(c + 1, 11) = WorksheetFunction.SumIf([a2:a65536], Cells(a, 1).Value,
[c2:c65536])
Cells(c + 1, 12) = WorksheetFunction.SumIf([a2:a65536], Cells(a, 1).Value,
[d2:d65536])
End If
Next a
adr = "i2:l" & c + 1
Range(adr).Sort Key1:=[i2]
MsgBox "L�STE TAMAMLANDI"
End Sub
----------kod bitir------
----------kod basla------
Sub firma()
Sheets("firma").[a2:b65536].ClearContents
sat = WorksheetFunction.CountA([a5:a65536]) + 5
c = 0
For a = 5 To sat
adet = WorksheetFunction.CountIf(Range("C5:C" & a), Cells(a, 3).Value)
If adet = 1 Then
c = c + 1
Sheets("firma").Cells(c + 1, 1) = Cells(a, 3).Value
Sheets("firma").Cells(c + 1, 2) = WorksheetFunction.SumIf(Range("C5:C" & sat),
Cells(a, 3).Value, Range("F5:F" & sat))
End If
Next a
End Sub
Sub kategori()
Sheets("katagori").[a2:b65536].ClearContents
sat = WorksheetFunction.CountA([a5:a65536]) + 5
c = 0
For a = 5 To sat
adet = WorksheetFunction.CountIf(Range("D5:D" & a), Cells(a, 4).Value)
If adet = 1 Then
c = c + 1
Sheets("katagori").Cells(c + 1, 1) = Cells(a, 4).Value
Sheets("katagori").Cells(c + 1, 2) = WorksheetFunction.SumIf(Range("D5:D" & sat),
Cells(a, 4).Value, Range("F5:F" & sat))
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Application.CommandBars("Worksheet Menu Bar").Reset
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
For a = 2 To Sheets("HATASAYISI").Cells(65536, 1).End(xlUp).Row
If [g3].Value = Sheets("HATASAYISI").Cells(a, 1).Value Then
c = c + 1
Cells(c + 13, 1) = Sheets("HATASAYISI").Cells(a, 2).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Private Sub cmdkapat_Click()
Unload frmpers
End Sub
End Sub
End Sub
Private Sub UserForm_Click()
End Sub
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub dene()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
End Sub
----------kod bitir------
----------kod basla------
Sub rapor()
Range("A4:F65536").ClearContents
c = 0
d = 0
For a = 9 To 31 Step 2
For b = 4 To Sheets("L�STE").Cells(65536, 1).End(xlUp).Row
If Sheets("L�STE").Cells(b, a).Value = 0 Then GoTo 10
If Month(Sheets("L�STE").Cells(b, a).Value) = Month(Cells(1, 2).Value) Then
c = c + 1
Cells(c + 3, 1) = Sheets("L�STE").Cells(b, 2).Value
Cells(c + 3, 2) = Sheets("L�STE").Cells(b, a).Value
Cells(c + 3, 3) = Sheets("L�STE").Cells(b, a + 1).Value
d = Sheets("L�STE").Cells(b, a + 1).Value + d
End If
10 Next b
Next a
e = Cells(65536, 1).End(xlUp).Row
Range("A4:C" & e).Sort Key1:=Range("B4")
Cells(e + 2, 2) = "TOPLAM:"
Cells(e + 2, 3) = d
Range("B3:B" & e).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("E3" _
), Unique:=True
For aa = 4 To Cells(65536, 5).End(xlUp).Row
Cells(aa, 6) = WorksheetFunction.SumIf(Range("B4:B65536"), Cells(aa, 5),
Range("C4:C65536"))
Next aa
End Sub
----------kod bitir------
----------kod basla------
Dim tarih1 As Date
Dim tarih2 As Date
Sub rapor2()
Range("A4:F65536").ClearContents
c = 0
d = 0
For a = 9 To 31 Step 2
For b = 4 To Sheets("L�STE").Cells(65536, 1).End(xlUp).Row
If Sheets("L�STE").Cells(b, a).Value = 0 Then GoTo 10
tarih1 = Sheets("L�STE").Cells(b, a).Value
tarih2 = Cells(1, 2).Value
If tarih1 <= tarih2 Then
c = c + 1
Cells(c + 3, 1) = Sheets("L�STE").Cells(b, 2).Value
Cells(c + 3, 2) = Sheets("L�STE").Cells(b, a).Value
Cells(c + 3, 3) = Sheets("L�STE").Cells(b, a + 1).Value
d = Sheets("L�STE").Cells(b, a + 1).Value + d
End If
10 Next b
Next a
e = Cells(65536, 1).End(xlUp).Row
Range("A4:C" & e).Sort Key1:=Range("B4")
Cells(e + 2, 2) = "TOPLAM:"
Cells(e + 2, 3) = d
End Sub
----------kod bitir------
----------kod basla------
'**************************************************************
'* Bilgisayardaki o anda calisan butun programlari *
'* UserForm uzerindeki ListBox1 nesnesinde, ID' leri ile *
'* birlikte gosteren bir calismadir. *
'* *
'* ListBox uzerinde t�klayarak seceginiz bir programin *
'* calismasi derhal sonland�r�l�r. *
'* *
'* Kodlar�n calismasi icin bilgisayarda WMI yuklu olmalidir. *
*
'* Burasi Excel vadisi ..... *
'* Raider � *
'* Ocak 2005 *
'* *
'**************************************************************
'
Dim Prog As Object
Dim objWMIService As Object
Dim RunningProcesses As Object
Dim strRet As String
'
Const strComputerName As String = "."
Const strNameSpace As String = "root\cimv2"
Const strClassName As String = "win32_process "
'
Private Sub CommandButton1_Click()
Dim Prog As Object
Dim objWMIService As Object
Dim RunningProcesses As Object
Dim MyArray() As Variant
Dim i As Long
On Error Resume Next
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
Set objWMIService = GetObject("winmgmts:\\" & strComputerName & _
"\" & strNameSpace)
Set RunningProcesses = objWMIService.ExecQuery("Select * from " & strClassName)
i = 0
For Each Prog In RunningProcesses
ReDim Preserve MyArray(1, i)
MyArray(0, i) = Prog.Name
MyArray(1, i) = Prog.ProcessId
i = i + 1
Next
ListBox1.List = WorksheetFunction.Transpose(MyArray)
Erase MyArray
End Sub
'
Private Sub ListBox1_Click()
Set objWMIService = GetObject("winmgmts:\\" & strComputerName & _
"\" & strNameSpace)
Set RunningProcesses = objWMIService.ExecQuery("Select * from " & strClassName)
For Each Prog In RunningProcesses
If ListBox1.Text = Prog.Name Then Prog.terminate
Next
ListBox1.Clear
End Sub
End Sub
----------kod bitir------
----------kod basla------
Declare Function SetTimer Lib "user32" (ByVal hWnd As Long, _
ByVal nIDEvent As Long, _
ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) As Long
'
Sub StartIt()
ID = SetTimer(0, 0, 200, AddressOf RunMe)
End Sub
'
Sub StopIt()
RetVal = KillTimer(0, ID)
End Sub
'
Private Function RunMe(ByVal hWnd As Long, ByVal uMsg As Long, _
ByVal idEvent As Long, _
ByVal dwTime As Long) As Long
On Error Resume Next
With StartUp.Label1
.Caption = MyStr
.Left = .Left - 5
If .Left = 20 Then
.Caption = Empty
.Left = 150
End If
StartUp.Image1.Left = .Left + .Width / 2 - 20
StartUp.Image2.Left = StartUp.Image1.Left + 10
StartUp.Image3.Left = StartUp.Image2.Left + 10
End With
End Function
'
Sub StartUserForm()
On Error Resume Next
StartUp.Show
End Sub
----------kod bitir------
----------kod basla------
Declare Function OpenProcess Lib "kernel32" _
(ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long) As Long
Sub ShowAboutFileReturnToProg()
Dim strFile As String
Dim i As Integer
If Dir(AboutFile) = "" Or AboutFile = "" Then
MsgBox "Dosya bulunamadi!", vbCritical
Exit Sub
End If
strFile = String(MAX_FILENAME_LEN, 32)
i = FindExecutable(AboutFile, vbNullString, strFile)
If i > 32 Then
ExeFile = Left$(strFile, InStr(strFile, Chr$(0)) - 1)
Else
ExeFile = "Iliskilendirilmis bir program bulunamadi !"
Exit Sub
End If
ShellExecute 0, "Open", AboutFile, vbNullString, "C:\", 1
Call WaitForEndingProcess
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'
Private Const MyVal = &H400
'
Private Sub CheckBox1_Click()
Sheets(1).Range("X2000") = 0
End Sub
'
Private Sub CommandButton1_Click()
Unload Me
Call ShowAboutFileReturnToProg
UserForm2.Show
End Sub
'
Private Sub UserForm_Initialize()
Dim MyHandle
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
MyHandle = GetSystemMenu(hWnd, 0)
Call RemoveMenu(MyHandle, 6, MyVal)
If Sheets(1).Range("X2000") = 0 Then
Unload Me
UserForm2.Show
Exit Sub
End If
Label1.Caption = MyStr
Label1.Left = 150
Call StartIt
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Call StopIt
End Sub
----------kod bitir------
----------kod basla------
Private Sub CheckBox1_Click()
Sheets(1).Range("X2000") = 1
End Sub
----------kod bitir------
----------kod basla------
Declare Function OpenProcess Lib "kernel32" _
(ByVal dwDesiredAccess As Long, _
ByVal bInheritHandle As Long, _
ByVal dwProcessId As Long) As Long
Sub ShowAboutFileReturnToProg()
Dim strFile As String
Dim i As Integer
If Dir(AboutFile) = "" Or AboutFile = "" Then
MsgBox "Dosya bulunamadi!", vbCritical
Exit Sub
End If
strFile = String(MAX_FILENAME_LEN, 32)
i = FindExecutable(AboutFile, vbNullString, strFile)
If i > 32 Then
ExeFile = Left$(strFile, InStr(strFile, Chr$(0)) - 1)
Else
ExeFile = "Iliskilendirilmis bir program bulunamadi !"
Exit Sub
End If
ShellExecute 0, "Open", AboutFile, vbNullString, "C:\", 1
Call WaitForEndingProcess
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function GetSystemMenu Lib "user32" _
(ByVal hWnd As Long, ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" _
(ByVal hMenu As Long, ByVal nPosition As Long, _
ByVal wFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
'
Private Const MyVal = &H400
'
Private Sub CheckBox1_Click()
Sheets(1).Range("X2000") = Not CheckBox1.Value
End Sub
'
Private Sub CommandButton1_Click()
Unload Me
Call ShowAboutFileReturnToProg
UserForm2.Show
End Sub
'
Private Sub UserForm_Initialize()
Dim MyHandle
Dim hWnd As Long
hWnd = FindWindowA(vbNullString, Me.Caption)
MyHandle = GetSystemMenu(hWnd, 0)
Call RemoveMenu(MyHandle, 6, MyVal)
If Sheets(1).Range("X2000") = 0 Then
Unload Me
UserForm2.Show
Exit Sub
End If
Label1.Caption = MyStr
Label1.Left = 150
Call StartIt
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Call StopIt
End Sub
----------kod bitir------
----------kod basla------
Private Sub CheckBox1_Click()
Sheets(1).Range("X2000") = CheckBox1.Value
End Sub
'
Private Sub CommandButton1_Click()
Unload Me
End Sub
'
Private Sub UserForm_Initialize()
CheckBox1.Visible = Not Sheets(1).Range("X2000")
End Sub
----------kod bitir------
----------kod basla------
Private Declare Function CreateWindowEX Lib "user32" Alias "CreateWindowExA" (ByVal
dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal
dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal
nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As
Long, lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal
hWndNewParent As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
'
Private Type ProgBar
ScrType As Long
Width As Long
Height As Long
X As Long
Y As Long
End Type
'
Dim MyProgBar As ProgBar
Dim FrmHwnd As Long
Dim ProgBarHwnd As Long
'
Private Const TypeLed As Long = &H50000000
Private Const TypeSmooth As Long = &H50000001
Private Const psh3 As Long = &H402
Private Const MaxVal As Long = 1000
'
MyProgBar.ScrType = TypeLed
MyProgBar.Width = 220
MyProgBar.Height = 15
MyProgBar.X = 45
MyProgBar.Y = 240
ListBox1.Clear
For i = 1 To MaxVal
MyData = "Data-" & i
Label1.Caption = "Yaziliyor .... " & MyData
ListBox1.AddItem MyData
DoEvents
ProgBarVal = (i / MaxVal) * 100
SendMessage ProgBarHwnd, psh3, ProgBarVal, 0&
Next
Label1.Caption = "Tamamlandi..."
DestroyWindow ProgBarHwnd
CommandButton1.Enabled = False
CommandButton2.Enabled = True
End Sub
'
Private Sub CommandButton2_Click()
UserForm_Initialize
End Sub
'
Private Sub UserForm_Initialize()
ListBox1.Clear
Label1.Caption = "Hazir..."
CommandButton2.Enabled = False
CommandButton1.Enabled = True
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
DestroyWindow ProgBarHwnd
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim alt, ust, i, j As Double
Dim asal As Boolean
Label3 = ""
alt = Val(TextBox1.Value)
ust = Val(TextBox2.Value)
ListBox1.Clear
ProgressBar1.Min = 0
ProgressBar1.Max = ust - alt
For i = alt To ust
asal = True
ProgressBar1.Value = i - alt
For j = 2 To i - 1
If (i Mod j) = 0 Then
asal = False
Exit For
End If
Next
If asal Then ListBox1.AddItem i
Next
Label3 = ListBox1.ListCount & " adet listelendi"
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub markos()
'
' markos Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C[1]"
Range("C6").Select
End Sub
Sub markos2()
'
' markos2 Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Range("A11,D11,D7,A7,D3,E3,E2,D2").Select
Range("D2").Activate
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Range("D3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kar()
'
' kar Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("KAR").Select
End Sub
Sub GER�()
'
' GER� Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("D�V�Z").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub makbuz()
'
' makbuz Makro
' Makro BEK�R taraf�ndan 08.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa3").Select
Range("C2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub markos()
'
' markos Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C[1]"
Range("C6").Select
End Sub
Sub markos2()
'
' markos2 Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Range("A11,D11,D7,A7,D3,E3,E2,D2").Select
Range("D2").Activate
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Range("D3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kar()
'
' kar Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("KAR").Select
End Sub
Sub GER�()
'
' GER� Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("D�V�Z").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub makbuz()
'
' makbuz Makro
' Makro BEK�R taraf�ndan 08.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa3").Select
Range("C2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub markos()
'
' markos Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C[1]"
Range("C6").Select
End Sub
Sub markos2()
'
' markos2 Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Range("A11,D11,D7,A7,D3,E3,E2,D2").Select
Range("D2").Activate
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Range("D3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kar()
'
' kar Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("KAR").Select
End Sub
Sub GER�()
'
' GER� Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("D�V�Z").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub markos()
'
' markos Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C[1]"
Range("C6").Select
End Sub
Sub markos2()
'
' markos2 Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Range("A11,D11,D7,A7,D3,E3,E2,D2").Select
Range("D2").Activate
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Range("D3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kar()
'
' kar Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("KAR").Select
End Sub
Sub GER�()
'
' GER� Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("D�V�Z").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub markos()
'
' markos Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa2").Select
Range("B5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C"
Range("C5").Select
ActiveCell.FormulaR1C1 = "=Sayfa2!R[10]C[1]"
Range("C6").Select
End Sub
Sub markos2()
'
' markos2 Makro
' Makro BEK�R taraf�ndan 03.03.2005 tarihinde kaydedildi.
'
'
Range("A11,D11,D7,A7,D3,E3,E2,D2").Select
Range("D2").Activate
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Selection.ClearContents
Range("D3").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kar()
'
' kar Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("KAR").Select
End Sub
Sub GER�()
'
' GER� Makro
' Makro BEK�R taraf�ndan 05.03.2005 tarihinde kaydedildi.
'
'
Sheets("D�V�Z").Select
Range("A20").Select
End Sub
----------kod bitir------
----------kod basla------
Sub makbuz()
'
' makbuz Makro
' Makro BEK�R taraf�ndan 08.03.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa3").Select
Range("C2").Select
End Sub
----------kod bitir------
----------kod basla------
Global isim As String
----------kod bitir------
----------kod basla------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 05.04.2005 by REREZ
'
'
Range("D10").Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
Sheets("A Tipi Pul").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
satir = WorksheetFunction.CountA(Sheets("kay�t").Range("A1:A65536")) + 1 'kay�t
sayfas�nda, a kolonundaki son dolu h�creden sonraki satir
Sheets("kay�t").Cells(satir, 1) = ComboBox7.Value
Sheets("kay�t").Cells(satir, 2) = TextBox1.Value
Sheets("kay�t").Cells(satir, 3) = ComboBox8.Value
Sheets("kay�t").Cells(satir, 4) = ComboBox9.Value
Sheets("kay�t").Cells(satir, 5) = TextBox2.Value
Sheets("kay�t").Cells(satir, 6) = ComboBox10.Value
Sheets("kay�t").Cells(satir, 7) = TextBox3.Value
ComboBox7.Value = ""
TextBox1.Value = ""
ComboBox8.Value = ""
ComboBox9.Value = ""
TextBox2.Value = ""
ComboBox10.Value = ""
TextBox3.Value = ""
End Sub
Private Sub CommandButton2_Click()
Application.Visible = True
ActiveWindow.WindowState = xlMaximized
Sheets("kay�t").Select
End Sub
Private Sub CommandButton3_Click()
Application.ScreenUpdating = False
Sheets("rapor").Range("a1:g65536").ClearContents
Range("A1").Select
Selection.AutoFilter
If ComboBox1.Value <> "" Then Selection.AutoFilter Field:=1,
Criteria1:=ComboBox1.Value
If ComboBox2.Value <> "" Then Selection.AutoFilter Field:=2,
Criteria1:=ComboBox2.Value
If ComboBox3.Value <> "" Then Selection.AutoFilter Field:=3,
Criteria1:=ComboBox3.Value
If ComboBox4.Value <> "" Then Selection.AutoFilter Field:=4,
Criteria1:=ComboBox4.Value
If ComboBox5.Value <> "" Then Selection.AutoFilter Field:=5,
Criteria1:=ComboBox5.Value
If ComboBox6.Value <> "" Then Selection.AutoFilter Field:=6,
Criteria1:=ComboBox6.Value
Selection.CurrentRegion.Copy
Sheets("rapor").Range("A1").PasteSpecial
Selection.AutoFilter
End Sub
----------kod bitir------
----------kod basla------
Sub AUTO_OPEN()
Application.Visible = False
kay�t_veri.Show
End Sub
----------kod bitir------
----------kod basla------
Sub sil()
ActiveSheet.Next.Select
Range("A2").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("2:65536").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveSheet.Previous.Select
End Sub
----------kod bitir------
----------kod basla------
Sub ay()
'rapor b�l�m�ndeki eski bilgileri temizle
Worksheets("b").Range("a2:h8").ClearContents
sutun = ActiveCell.Column
If sutun = 2 Then
kisiyegore
Exit Sub
End If
Sub kisiyegore()
'hangi h�crede isek o h�credeki de�eri arananay'a atar
aranankisi = ActiveCell.Value
hedefsat = 2
For i = 2 To Cells(65536, 2).End(xlUp).Row
If Cells(i, 2) = aranankisi Then
'burada d�ng� yerine tek tek yazarak sadece istedi�iniz h�creleri
ta��tabilirsiniz
For k = 1 To 8
Worksheets("b").Cells(hedefsat, k) = Cells(i, k)
Next k
hedefsat = hedefsat + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm2.Show 0
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
End Sub
----------kod bitir------
----------kod basla------
Dim kayit As Integer
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub TextBox1_Change()
For a3 = 1 To Len(TextBox1.Value)
Cells(4, 50 + a3) = Mid(TextBox1.Value, a3, 1)
Next a3
End Sub
Private Sub TextBox2_Change()
On Error Resume Next
TextBox2 = Evaluate("=b�y�kharf(""" & TextBox2 & """)")
TextBox2 = Evaluate("=upper(""" & TextBox2 & """)")
TextBox2 = StrConv(TextBox2, vbUpperCase)
For a10 = 1 To Len(TextBox2.Value)
Cells(10 + kayit * 2, 2 + a10) = Mid(TextBox2.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox3_Change()
On Error Resume Next
TextBox3 = Evaluate("=b�y�kharf(""" & TextBox3 & """)")
TextBox3 = Evaluate("=upper(""" & TextBox3 & """)")
TextBox3 = StrConv(TextBox3, vbUpperCase)
For a10 = 1 To Len(TextBox3.Value)
Cells(10 + kayit * 2, 12 + a10) = Mid(TextBox3.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox4_Change()
On Error Resume Next
TextBox4 = Evaluate("=b�y�kharf(""" & TextBox4 & """)")
TextBox4 = Evaluate("=upper(""" & TextBox4 & """)")
TextBox4 = StrConv(TextBox4, vbUpperCase)
For a10 = 1 To Len(TextBox4.Value)
Cells(10 + kayit * 2, 26 + a10) = Mid(TextBox4.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox5_Change()
For a10 = 1 To Len(TextBox5.Value)
Cells(10 + kayit * 2, 43 + a10) = Mid(TextBox5.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox6_Change()
For a10 = 1 To Len(TextBox6.Value)
Cells(10 + kayit * 2, 46 + a10) = Mid(TextBox6.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox7_Change()
For a10 = 1 To Len(TextBox7.Value)
Cells(10 + kayit * 2, 49 + a10) = Mid(TextBox7.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox8_Change()
For a10 = 1 To Len(TextBox8.Value)
Cells(10 + kayit * 2, 65 + a10) = Mid(TextBox8.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox9_Change()
On Error Resume Next
TextBox9 = Evaluate("=b�y�kharf(""" & TextBox9 & """)")
TextBox9 = Evaluate("=upper(""" & TextBox9 & """)")
TextBox9 = StrConv(TextBox9, vbUpperCase)
For a10 = 1 To Len(TextBox9.Value)
Cells(10 + kayit * 2, 68 + a10) = Mid(TextBox9.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox10_Change()
On Error Resume Next
TextBox10 = Evaluate("=b�y�kharf(""" & TextBox10 & """)")
TextBox10 = Evaluate("=upper(""" & TextBox10 & """)")
TextBox10 = StrConv(TextBox10, vbUpperCase)
For a10 = 1 To Len(TextBox10.Value)
Cells(10 + kayit * 2, 70 + a10) = Mid(TextBox10.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox11_Change()
For a10 = 1 To Len(TextBox11.Value)
Cells(10 + kayit * 2, 73 + a10) = Mid(TextBox11.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox11_Exit(ByVal Cancel As MSForms.ReturnBoolean)
kayit = kayit + 1
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton2_Click()
Unload Me
End Sub
Private Sub TextBox1_Change()
For a3 = 1 To Len(TextBox1.Value)
Cells(4, 50 + a3) = Mid(TextBox1.Value, a3, 1)
Next a3
End Sub
Private Sub TextBox2_Change()
On Error Resume Next
TextBox2 = Evaluate("=b�y�kharf(""" & TextBox2 & """)")
TextBox2 = Evaluate("=upper(""" & TextBox2 & """)")
TextBox2 = StrConv(TextBox2, vbUpperCase)
For a10 = 1 To Len(TextBox2.Value)
Cells(10, 2 + a10) = Mid(TextBox2.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox3_Change()
On Error Resume Next
TextBox3 = Evaluate("=b�y�kharf(""" & TextBox3 & """)")
TextBox3 = Evaluate("=upper(""" & TextBox3 & """)")
TextBox3 = StrConv(TextBox3, vbUpperCase)
For a10 = 1 To Len(TextBox3.Value)
Cells(10, 12 + a10) = Mid(TextBox3.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox4_Change()
On Error Resume Next
TextBox4 = Evaluate("=b�y�kharf(""" & TextBox4 & """)")
TextBox4 = Evaluate("=upper(""" & TextBox4 & """)")
TextBox4 = StrConv(TextBox4, vbUpperCase)
For a10 = 1 To Len(TextBox4.Value)
Cells(10, 26 + a10) = Mid(TextBox4.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox5_Change()
For a10 = 1 To Len(TextBox5.Value)
Cells(10, 43 + a10) = Mid(TextBox5.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox6_Change()
For a10 = 1 To Len(TextBox6.Value)
Cells(10, 46 + a10) = Mid(TextBox6.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox7_Change()
For a10 = 1 To Len(TextBox7.Value)
Cells(10, 49 + a10) = Mid(TextBox7.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox8_Change()
For a10 = 1 To Len(TextBox8.Value)
Cells(10, 65 + a10) = Mid(TextBox8.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox9_Change()
On Error Resume Next
TextBox9 = Evaluate("=b�y�kharf(""" & TextBox9 & """)")
TextBox9 = Evaluate("=upper(""" & TextBox9 & """)")
TextBox9 = StrConv(TextBox9, vbUpperCase)
For a10 = 1 To Len(TextBox9.Value)
Cells(10, 68 + a10) = Mid(TextBox9.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox10_Change()
On Error Resume Next
TextBox10 = Evaluate("=b�y�kharf(""" & TextBox10 & """)")
TextBox10 = Evaluate("=upper(""" & TextBox10 & """)")
TextBox10 = StrConv(TextBox10, vbUpperCase)
For a10 = 1 To Len(TextBox10.Value)
Cells(10, 70 + a10) = Mid(TextBox10.Value, a10, 1)
Next a10
End Sub
Private Sub TextBox11_Change()
For a10 = 1 To Len(TextBox11.Value)
Cells(10, 73 + a10) = Mid(TextBox11.Value, a10, 1)
Next a10
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub ogle()
Range("F10:J26").ClearContents
On Error Resume Next
c = 0
art = 0
For a = 8 To 11
sat = Sheets("YEMEK L�STES�").Columns("C").Find(Cells(a, 3).Value).Row
For b = sat + 1 To 16 + sat
c = c + 1
son = Sheets("YEMEK L�STES�").Cells(b, 5).Value
If son = 0 Then GoTo 10
Cells(c + 9, 6) = Sheets("YEMEK L�STES�").Cells(b, 5).Value
Cells(c + 9, 7) = Sheets("YEMEK L�STES�").Cells(b, 6).Value
Cells(c + 9, 8) = Sheets("YEMEK L�STES�").Cells(b, 7).Value
Cells(c + 9, 9) = Sheets("YEMEK L�STES�").Cells(b, 8).Value
Cells(c + 9, 10) = Sheets("YEMEK L�STES�").Cells(b, 9).Value
If (c + 9) > 25 Then
MsgBox ("YEMEK L�STES�N� YAZMAK ���N ALAN KALMADI")
Exit Sub
End If
Next b
10 Next a
End Sub
Sub aksam()
Range("F32:J47").ClearContents
On Error Resume Next
c = 0
art = 0
For a = 30 To 33
sat = Sheets("YEMEK L�STES�").Columns("C").Find(Cells(a, 3).Value).Row
For b = sat + 1 To 16 + sat
c = c + 1
son = Sheets("YEMEK L�STES�").Cells(b, 5).Value
If son = 0 Then GoTo 10
Cells(c + 31, 6) = Sheets("YEMEK L�STES�").Cells(b, 5).Value
Cells(c + 31, 7) = Sheets("YEMEK L�STES�").Cells(b, 6).Value
Cells(c + 31, 8) = Sheets("YEMEK L�STES�").Cells(b, 7).Value
Cells(c + 31, 9) = Sheets("YEMEK L�STES�").Cells(b, 8).Value
Cells(c + 31, 10) = Sheets("YEMEK L�STES�").Cells(b, 9).Value
If (c + 31) > 46 Then
MsgBox ("YEMEK L�STES�N� YAZMAK ���N ALAN KALMADI")
Exit Sub
End If
Next b
10 Next a
End Sub
Sub kahvalti()
Range("F51:J62").ClearContents
On Error Resume Next
c = 0
art = 0
For a = 50 To 53
sat = Sheets("YEMEK L�STES�").Columns("C").Find(Cells(a, 3).Value).Row
For b = sat + 1 To 16 + sat
c = c + 1
son = Sheets("YEMEK L�STES�").Cells(b, 5).Value
If son = 0 Then GoTo 10
Cells(c + 50, 6) = Sheets("YEMEK L�STES�").Cells(b, 5).Value
Cells(c + 50, 7) = Sheets("YEMEK L�STES�").Cells(b, 6).Value
Cells(c + 50, 8) = Sheets("YEMEK L�STES�").Cells(b, 7).Value
Cells(c + 50, 9) = Sheets("YEMEK L�STES�").Cells(b, 8).Value
Cells(c + 50, 10) = Sheets("YEMEK L�STES�").Cells(b, 9).Value
If (c + 50) > 61 Then
MsgBox ("YEMEK L�STES�N� YAZMAK ���N ALAN KALMADI")
Exit Sub
End If
Next b
10 Next a
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
If ScrollBar4.Value = 0 Then
ScrollBar1.Value = 0
ScrollBar2.Value = 0
ScrollBar3.Value = 0
End If
If ScrollBar4.Value = 1 Then
ScrollBar1.Value = 0
ScrollBar2.Value = 0
ScrollBar3.Value = 128
End If
If ScrollBar4.Value = 2 Then
ScrollBar1.Value = 0
ScrollBar2.Value = 128
ScrollBar3.Value = 0
End If
If ScrollBar4.Value = 3 Then
ScrollBar1.Value = 0
ScrollBar2.Value = 128
ScrollBar3.Value = 128
End If
If ScrollBar4.Value = 4 Then
ScrollBar1.Value = 128
ScrollBar2.Value = 0
ScrollBar3.Value = 0
End If
If ScrollBar4.Value = 5 Then
ScrollBar1.Value = 128
ScrollBar2.Value = 0
ScrollBar3.Value = 128
End If
If ScrollBar4.Value = 6 Then
ScrollBar1.Value = 128
ScrollBar2.Value = 128
ScrollBar3.Value = 0
End If
If ScrollBar4.Value = 7 Then
ScrollBar1.Value = 192
ScrollBar2.Value = 192
ScrollBar3.Value = 192
End If
If ScrollBar4.Value = 8 Then
ScrollBar1.Value = 128
ScrollBar2.Value = 128
ScrollBar3.Value = 128
End If
If ScrollBar4.Value = 9 Then
ScrollBar1.Value = 0
ScrollBar2.Value = 0
ScrollBar3.Value = 255
End If
If ScrollBar4.Value = 10 Then
ScrollBar1.Value = 0
ScrollBar2.Value = 255
ScrollBar3.Value = 0
End If
If ScrollBar4.Value = 11 Then
ScrollBar1.Value = 0
ScrollBar2.Value = 255
ScrollBar3.Value = 255
End If
If ScrollBar4.Value = 12 Then
ScrollBar1.Value = 255
ScrollBar2.Value = 0
ScrollBar3.Value = 0
End If
If ScrollBar4.Value = 13 Then
ScrollBar1.Value = 255
ScrollBar2.Value = 0
ScrollBar3.Value = 255
End If
If ScrollBar4.Value = 14 Then
ScrollBar1.Value = 255
ScrollBar2.Value = 255
ScrollBar3.Value = 0
End If
If ScrollBar4.Value = 15 Then
ScrollBar1.Value = 255
ScrollBar2.Value = 255
ScrollBar3.Value = 255
End If
End Sub
a = Hex(TextBox1.Value)
b = Hex(TextBox2.Value)
c = Hex(TextBox3.Value)
End Sub
----------kod bitir------
----------kod basla------
Dim ad(1)
Sub Makro1()
On Error Resume Next
ActiveSheet.Shapes(ad(1)).Select
Selection.Delete
c = Sheets("N�fus").Cells(1, 9).Value
For b = 2 To 65000
e = Sheets("Liste").Cells(b, 1).Value
If c = e Then
a = Sheets("Liste").Cells(b, 2).Value
ad(1) = a
Sheets("Resim").Shapes(a).Copy
Sheets("N�fus").Range("C3").PasteSpecial
Selection.ShapeRange.Name = a
Selection.ShapeRange.Height = 124.5
Selection.ShapeRange.Width = 116.25
Selection.ShapeRange.ScaleWidth 0.85, msoScaleFromTopLeft
Range("E3").Select
Exit Sub
End If
Next b
End Sub
----------kod bitir------
----------kod basla------
MsgBox "L�tfen 255 den b�y�k rakam veya ba�ka karakter girmeyiniz", , "HATA"
Controls("textbox" & i).SetFocus
Exit Sub
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub sablon()
Worksheets("Sayfa2").Copy Before:=Worksheets("Sayfa2")
End Sub
----------kod bitir------
----------kod basla------
Sub ara()
Range("B2:D65536").ClearContents
a = WorksheetFunction.CountA(Range("A2:A65536"))
c = 0
For aa = 2 To a + 1
For bb = 2 To Sheets("sayfa1").Cells(65536, 1).End(xlUp).Row
If Cells(aa, 1) = Sheets("sayfa1").Cells(bb, 1).Value Then
c = c + 1
Cells(c + 1, 2) = Cells(aa, 1).Value
Cells(c + 1, 3) = Sheets("sayfa1").Cells(bb, 3).Value
Cells(c + 1, 4) = Sheets("sayfa1").Cells(bb, 6).Value
End If
Next bb
Next aa
End Sub
----------kod bitir------
----------kod basla------
Sub secim()
ActiveCell.EntireRow.Select
Selection.Copy
sat�rsay�s� = InputBox("Eklenecek Sat�r Say�s�n� Giriniz..", "Sat�r Ekle", "Sat�r
Say�s�")
On Error GoTo devam
For i = 1 To sat�rsay�s�
ActiveCell.Cells(i, 1).Activate
ActiveCell.Rows(i + 1 & ":" & i + sat�rsay�s�).Select
Selection.Insert Shift:=xlDown
i = i + sat�rsay�s�
Next i
devam:
MsgBox sat�rsay�s� & " Adet Eklenmi�tir."
End Sub
----------kod bitir------
----------kod basla------
Sub sat�ra�()
Sheets([c2].Value).Rows([b2]).EntireRow.Hidden = False
End Sub
Sub sat�rgizle()
Sheets([c2].Value).Rows([b2]).EntireRow.Hidden = True
End Sub
----------kod bitir------
----------kod basla------
Sub sat�ra�()
Sheets("sayfa2").Rows([b2]).EntireRow.Hidden = False
End Sub
Sub sat�rgizle()
Sheets("sayfa2").Rows([b2]).EntireRow.Hidden = True
End Sub
----------kod bitir------
----------kod basla------
Sub se�()
sat = ActiveCell.Row
sut = ActiveCell.Column
adrs = ActiveCell.Address
adrss = ActiveCell.Offset(1 - sat, 0).Address
adr = "$A$" & sat & ":" & adrs & "," & adrss & ":" & adrs
Range(adr).Select
Range(adrs).Activate
End Sub
----------kod bitir------
----------kod basla------
Sub satir()
Dim yukseklik As Single, mevcut As Single, text As String, cevap As String
'mevcut sat�r y�ksekli�ini bul
mevcut = Selection.RowHeight / 29.5
'mesaj i�ri�ini haz�rla
text = "Mevcut sat�r y�ksekli�i: " & Format(mevcut, "###0.00 cm") & Chr(13) & "Yeni
sat�r y�ksekli�ini girin (cm):"
'InputBox g�ster
cevap = InputBox(text, "Yeni sat�r y�ksekli�i belirle", Format(mevcut, "###0.00"))
'cevaba g�re yeni sat�r y�ksekli�i de�i�tir
If cevap <> "" Then
yukseklik = CSng(cevap)
Selection.RowHeight = yukseklik * 29.5
End If
End Sub
Sub sutun()
Dim genislik As Single, mevcut As Single, text As String, cevap As String
'mevcut s�tun geni�li�ini bul
mevcut = (Selection.ColumnWidth + 0.71) / 5.1425
'mesaj i�ri�ini haz�rla
text = "Mevcut sat�r geni�li�i: " & Format(mevcut, "###0.00 cm") & Chr(13) & "Yeni
s�tun geni�li�ini girin:"
'InputBox g�ster
cevap = InputBox(text, "Yeni sat�r geni�li�ini girin (cm)", Format(mevcut,
"###0.00"))
'cevaba g�re yeni s�tun geni�li�ini de�i�tir
If cevap <> "" Then
genislik = CSng(cevap)
Selection.ColumnWidth = -0.71 + 5.1425 * genislik
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Aktar()
Application.Dialogs(xlDialogWorkbookMove).Show
End Sub
----------kod bitir------
----------kod basla------
Sub auto_close()
Application.CommandBars("Worksheet Menu Bar").Reset
End Sub
----------kod bitir------
----------kod basla------
Sub yaz()
For b = 1 To [a1]
Sheets("sayfa2").Cells(b, 1) = [b1]
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub yaz()
For b = 1 To [a1]
Sheets("sayfa2").Cells(b, 1) = [b1]
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
[b2] = ActiveSheet.Name
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
For a = 1 To Sheets.Count
ComboBox1.AddItem Sheets(a).Name
Next
End Sub
----------kod bitir------
----------kod basla------
Sub a�()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = TextBox1.Text
Sheets(1).Select
End Sub
----------kod bitir------
----------kod basla------
Sub a�()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Name = TextBox1.Text
Sheets(1).Select
End Sub
----------kod bitir------
----------kod basla------
Sub isimdegistir()
Sheets(2).Name = Sheets("sayfa1").[a1]
Sheets([a1].Value).Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
If TextBox1.Value <> "" Then
Sheets("Sayfa1").Activate
Cells(3, 1).Select
Do While ActiveCell.Value <> ""
If Trim(ActiveCell.Value) = Trim(Me.TextBox1.Value) Then
If MsgBox(Me.TextBox1 & " Adl� Stok Kayd� Vard�r." & " Yeniden Kay�t Yap�ls�n m�?",
vbYesNo, "M�kerrer Kay�t") = vbNo Then Exit Sub
End If
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Value = TextBox1.Value
ActiveCell.Offset(0, 1).Value = TextBox2.Value
ActiveCell.Offset(0, 2).Value = TextBox3.Value
ActiveCell.Offset(0, 3).Value = TextBox4.Value
End If
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Enter()
Label1 = ""
End Sub
Private Sub ComboBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
ComboBox1.DropDown
End Sub
Private Sub CommandButton1_Click()
If TextBox1 = "" Or TextBox2 = "" Then
MsgBox "TAR�H G�R��� YAPILMADI"
Exit Sub
End If
satd = WorksheetFunction.CountA(Sheets(ComboBox1.Value).[d10:d40]) + 10
sate = WorksheetFunction.CountA(Sheets(ComboBox1.Value).[e10:e40]) + 10
Sheets(ComboBox1.Value).Cells(satd, 4) = CDate(TextBox1.Value)
Sheets(ComboBox1.Value).Cells(sate, 5) = CDate(TextBox1.Value)
Label1 = "kay�t yap�lan sayfa: " & ComboBox1.Value
TextBox1 = ""
TextBox2 = ""
ComboBox1.SetFocus
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "dd.mmmm.yy")
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2 = Format(TextBox2, "dd.mmmm.yy")
End Sub
Private Sub UserForm_Initialize()
For a = 1 To Sheets.Count
ComboBox1.AddItem Sheets(a).Name
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Enter()
Label1 = ""
End Sub
Private Sub ComboBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
ComboBox1.DropDown
End Sub
Private Sub CommandButton1_Click()
If TextBox1 = "" Or TextBox2 = "" Then
MsgBox "TAR�H G�R��� YAPILMADI"
Exit Sub
End If
satd = WorksheetFunction.CountA(Sheets(ComboBox1.Value).[d10:d40]) + 10
sate = WorksheetFunction.CountA(Sheets(ComboBox1.Value).[e10:e40]) + 10
Sheets(ComboBox1.Value).Cells(satd, 4) = CDate(TextBox1.Value)
Sheets(ComboBox1.Value).Cells(sate, 5) = CDate(TextBox1.Value)
Label1 = "kay�t yap�lan sayfa: " & ComboBox1.Value
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "dd.mmmm.yy")
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2 = Format(TextBox2, "dd.mmmm.yy")
End Sub
Private Sub UserForm_Initialize()
For a = 1 To Sheets.Count
ComboBox1.AddItem Sheets(a).Name
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub rakamay�r()
For adet = 1 To WorksheetFunction.CountA(Range("A1:A65532"))
metin = Range("A" & adet).Value
say� = ""
For a = 1 To Len(metin)
k�rp = Mid(metin, a, 1)
If IsNumeric(k�rp) = True Then
say� = say� & k�rp
End If
Next a
Range("B" & adet) = say�
Next adet
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Levent MENTE�O�LU taraf�ndan 11.03.2005 tarihinde kaydedildi.
'
'
ActiveCell.FormulaR1C1 = "=MID(R[-3]C[-1],1,1)"
End Sub
----------kod bitir------
----------kod basla------
Declare Function sndPlaySound32 Lib "winmm.dll" Alias "sndPlaySoundA" (ByVal
lpszSoundName As String, ByVal uFlags As Long) As Long
Sub Makro1()
'
' Makro1 Makro
' Makro POSSERVER taraf�ndan 23/07/2004 tarihinde kaydedildi.
'
Dim i, e As Integer
On Error Resume Next
Range("a1").Select
e = 1
For i = 1 To 1000000
'MsgBox e
ActiveSheet.Shapes.Range(Array("Line 27", "Line 28", "Line 29", "Line
30")).Select
Range("a1") = Int((49 * Rnd) + 1)
Range("B1") = Int((49 * Rnd) + 1)
Range("C1") = Int((49 * Rnd) + 1)
Range("D1") = Int((49 * Rnd) + 1)
Range("E1") = Int((49 * Rnd) + 1)
Range("F1") = Int((49 * Rnd) + 1)
Selection.ShapeRange.IncrementRotation 10
[G1] = e
DoEvents
e = e + 1
'If Range("a1").Address <> "a1" Then Exit For
Next i
End Sub
Sub hjh()
If [f31] = True Then Call s1
End Sub
Sub gggg()
'
' Makro1 Makro
' Makro POSSERVER taraf�ndan 23/07/2004 tarihinde kaydedildi.
'
If [f31] = True Then Call s2
Dim i, e As Integer
'On Error Resume Next
Range("a1").Select
For i = 1 To 1000000
'MsgBox e
' ActiveSheet.Shapes.Range(Array("Line 3", "Line 2", "Line 4", "Line
5")).Select
Range("a1") = Int((49 * Rnd) + 1)
Range("a2") = Int((49 * Rnd) + 1)
Range("a3") = Int((49 * Rnd) + 1)
Range("a4") = Int((49 * Rnd) + 1)
Range("a5") = Int((49 * Rnd) + 1)
Range("a6") = Int((49 * Rnd) + 1)
' Selection.ShapeRange.IncrementRotation 10
If [f31] = True Then Call s3
DoEvents
If Selection = "" Then
ActiveSheet.Unprotect
Next i
' c = MsgBox("say�lar� listeyi ekliyorum", vbYesNo)
' If c = vbNo Then
' Exit Sub
' Else
e = Cells(100, 10).End(xlUp).Row
Cells(e + 1, 10) = [a1] & "-" & [a2] & "-" & [a3] & "-" & [a4] & "-" & [a5]
& "-" & [a6]
' End If
'
End Sub
Sub dur()
[f24].Select
End Sub
Sub tem()
Range("j2:j100").ClearContents
For i = 1 To 6: Cells(i, 1) = 0: Next i
End Sub
Sub kkk()
Range("a1:a6").Sort Key1:=Range("A1")
End Sub
Sub s1()
Call sndPlaySound32("C:\IBMTOOLS\APPS\THEMES\WINDOWS\Resources\THEMES\Active Think
Theme\default.wav", &H1 Or &H2)
End Sub
Sub s2()
Call sndPlaySound32("C:\IBMTOOLS\APPS\THEMES\WINDOWS\Resources\THEMES\Active Think
Theme\alert.wav", &H1 Or &H2)
End Sub
Sub s3()
Call sndPlaySound32("C:\IBMTOOLS\APPS\THEMES\WINDOWS\Resources\THEMES\Active Think
Theme\new mail.wav", &H1 Or &H2)
End Sub
----------kod bitir------
----------kod basla------
Sub Makro2()
'
' Makro2 Makro
' Makro POSSERVER taraf�ndan 25/07/2004 tarihinde kaydedildi.
'
'
End Sub
Sub R1()
'
' Makro3 Makro
' Makro POSSERVER taraf�ndan 25/07/2004 tarihinde kaydedildi.
'
'
ActiveSheet.Shapes("WordArt 32").Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(204, 236, 255)
Selection.ShapeRange.Fill.BackColor.RGB = RGB(255, 153, 51)
Selection.ShapeRange.Fill.PresetTextured msoTextureBlueTissuePaper
End Sub
Sub R2()
'
' Makro4 Makro
' Makro POSSERVER taraf�ndan 25/07/2004 tarihinde kaydedildi.
'
'
ActiveSheet.Shapes("WordArt 32").Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 0)
Selection.ShapeRange.Fill.BackColor.RGB = RGB(255, 153, 51)
Selection.ShapeRange.Fill.TwoColorGradient msoGradientFromCorner, 1
End Sub
Sub R3()
'
' Makro5 Makro
' Makro POSSERVER taraf�ndan 25/07/2004 tarihinde kaydedildi.
'
'
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoFalse
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 11
Selection.ShapeRange.Fill.BackColor.SchemeColor = 10
Selection.ShapeRange.Fill.TwoColorGradient msoGradientFromCenter, 1
End Sub
----------kod bitir------
----------kod basla------
Private Sub buttadd_Click()
Dim cel As Range, lastRow As Long, myRow As Long, _
desc As String, Button, header
With Sheets("CompanyContact")
lastRow = .Range("A65536").End(xlUp).Row
myRow = lastRow + 1
For Each cel In .Range("B2:B200")
If cel.Value = txtconame.Value Then
MsgBox "This person's details already exist in your database.", _
vbInformation, "Duplicate"
Exit Sub
End If
Next cel
If .Range("A2").Value = "" Then
.Range("A2").Value = 1
Else
.Cells(myRow, 1).Value = lastRow
End If
.Cells(myRow, 2).Value = txtconame.Text
.Cells(myRow, 3).Value = txtcoaddress.Text
.Cells(myRow, 4).Value = txtweb.Text
.Cells(myRow, 5).Value = txtname.Text
.Cells(myRow, 6).Value = txttitle.Text
.Cells(myRow, 7).Value = txtphone.Text
.Cells(myRow, 8).Value = txtfax.Text
.Cells(myRow, 9).Value = txtmail.Text
desc = "Entry is succesful"
Button = vbOKOnly + vbInformation + vbDefaultButton1
header = "Registration"
MsgBox desc, Button, header
End With
End Sub
----------kod bitir------
----------kod basla------
Private Sub buttadd_Click()
Dim cel As Range, lastRow As Long, myRow As Long, _
desc As String, Button, header
With Sheets("Employees")
lastRow = .Range("A65536").End(xlUp).Row
myRow = lastRow + 1
For Each cel In .Range("B2:B200")
If cel.Value = txtempname.Value Then
MsgBox "This person's details already exist in your database.", _
vbInformation, "Duplicate"
Exit Sub
End If
Next cel
If .Range("A2").Value = "" Then
.Range("A2").Value = 1
Else
.Cells(myRow, 1).Value = lastRow
End If
.Cells(myRow, 2).Value = txtempname.Text
.Cells(myRow, 3).Value = txtdb.Text
.Cells(myRow, 4).Value = txtpb.Text
.Cells(myRow, 5).Value = txtempaddress.Text
.Cells(myRow, 6).Value = txtphome.Text
.Cells(myRow, 7).Value = txtpgsm.Text
.Cells(myRow, 8).Value = txtppi.Text
.Cells(myRow, 9).Value = txtname.Text
.Cells(myRow, 10).Value = txtrelation.Text
.Cells(myRow, 11).Value = txtaddress.Text
.Cells(myRow, 12).Value = txtphone.Text
desc = "Details of " & txtempname & vbCrLf & _
"Has been successfully added..."
Button = vbOKOnly + vbInformation + vbDefaultButton1
header = "Registration"
MsgBox desc, Button, header
End With
End Sub
----------kod bitir------
----------kod basla------
Private Sub buttInf_Click()
Call Inf
End Sub
Private Sub AddCo_Click()
Call OpenForm
End Sub
Private Sub AddEmp_Click()
Call OpenForm3
End Sub
Private Sub Exitt_Click()
Unload Main
Call bye
End Sub
Private Sub Frame1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal
X As Single, ByVal Y As Single)
Call Info
End Sub
Private Sub SrcCo_Click()
Call OpenForm2
End Sub
----------kod bitir------
----------kod basla------
Sub OpenForm()
Unload Main
Addresses1.Show
End Sub
Sub OpenForm2()
Unload Main
Addresses2.Show
End Sub
Sub OpenForm3()
Unload Main
Employees1.Show
End Sub
Sub OpenForm4()
Unload Main
Employees2.Show
End Sub
Sub bye()
MsgBox "SBAB CLOSING"
Application.ActiveWorkbook.Save
Application.Quit
End Sub
Sub Auto_Open()
Application.Visible = True
Main.Show
End Sub
Sub Info()
MsgBox "Small Business Address Book By TheGreatest", vbInformation + vbOKOnly,
"SBAB"
End Sub
----------kod bitir------
----------kod basla------
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, _
ByVal nIDEvent As Long, _
ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) As Long
'
Sub StartIt()
ID = SetTimer(0, 0, 200, AddressOf RunMe)
End Sub
'
Sub Stopit()
RetVal = KillTimer(0, ID)
End Sub
'
Private Function RunMe(ByVal hwnd As Long, ByVal uMsg As Long, _
ByVal idEvent As Long, _
ByVal dwTime As Long) As Long
On Error Resume Next
With UserForm1.Label1
.Caption = MyStr
.Left = .Left - 5
If .Left = 20 Then
.Caption = Empty
.Left = 150
End If
End With
End Function
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
'
Private Sub UserForm_Initialize()
Label1.Caption = MyStr
Label1.Left = 150
Call StartIt
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Call Stopit
End Sub
----------kod bitir------
----------kod basla------
Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, _
ByVal nIDEvent As Long, _
ByVal uElapse As Long, _
ByVal lpTimerFunc As Long) As Long
'
Sub StartIt()
ID = SetTimer(0, 0, 200, AddressOf RunMe)
End Sub
'
Sub StopIt()
RetVal = KillTimer(0, ID)
End Sub
'
Private Function RunMe(ByVal hwnd As Long, ByVal uMsg As Long, _
ByVal idEvent As Long, _
ByVal dwTime As Long) As Long
On Error Resume Next
With UserForm1.Label1
.Caption = MyStr
.Left = .Left - 5
If .Left = 20 Then
.Caption = Empty
.Left = 150
End If
UserForm1.Image1.Left = .Left + .Width / 2 - 20
UserForm1.Image2.Left = UserForm1.Image1.Left + 10
UserForm1.Image3.Left = UserForm1.Image2.Left + 10
End With
End Function
'
Sub StartUserForm()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
'
Private Sub UserForm_Initialize()
Label1.Caption = MyStr
Label1.Left = 150
Call StartIt
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Call StopIt
End Sub
----------kod bitir------
----------kod basla------
Sub a()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ScrollBar1_Change()
aa = ScrollBar1.Value
Label1 = aa
If ScrollBar1.Value = 1 Then
ListBox1.Visible = True
ListBox2.Visible = False
ListBox3.Visible = False
Exit Sub
End If
If ScrollBar1.Value = 2 Then
ListBox1.Visible = False
ListBox2.Visible = True
ListBox3.Visible = False
Exit Sub
End If
ListBox1.Visible = False
ListBox2.Visible = False
ListBox3.Visible = True
End Sub
Private Sub UserForm_Initialize()
ListBox1.RowSource = "sayfa1!A2:A11"
ListBox2.RowSource = "sayfa1!B2:B11"
ListBox3.RowSource = "sayfa1!C2:C11"
ListBox1.ColumnHeads = True
ListBox2.ColumnHeads = True
ListBox3.ColumnHeads = True
ListBox1.Visible = True
ListBox2.Visible = False
ListBox3.Visible = False
End Sub
----------kod bitir------
----------kod basla------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 05.01.2005 by ERSIN DANACI
'
'
' Range("J1").Comment.Shape.Select True
'Selection.ShapeRange.IncrementLeft 0.75
' Selection.ShapeRange.IncrementTop 138.75
End Sub
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 05.01.2005 by ERSIN DANACI
'
'
Selection.ShapeRange.IncrementLeft -15.75
Selection.ShapeRange.IncrementTop -144.75
Range("G28").Select
Selection.ShapeRange.IncrementLeft 15.75
Selection.ShapeRange.IncrementTop -201#
End Sub
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 05.01.2005 by ERSIN DANACI
'
'
Range("J1").Comment.Shape.Select True
Selection.ShapeRange.IncrementLeft 9.75
Selection.ShapeRange.IncrementTop -205.5
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm2.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub OptionButton1_Click()
ListBox1.RowSource = "Sayfa1!A2: A21"
End Sub
----------kod bitir------
----------kod basla------
Private Sub CheckBox4_Click()
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim crCB As Control
i = 0
c = 0
For Each crCB In UserForm1.Controls
i = i + 1
If crCB.Value = True Then
c = c + 1
For t = 1 To WorksheetFunction.CountA(Columns(1))
ListBox1.AddItem
ListBox1.List(t - 1, c) = Cells(t, i)
Next t
End If
Next crCB
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim crCB As Control
i = 0
c = 0
Dim alacam(21, 10)
End If
Next crCB
ListBox1.List = alacam()
End Sub
----------kod bitir------
----------kod basla------
Sub dolusay()
MsgBox (WorksheetFunction.CountA(Selection.Cells))
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Private Sub Label1_Click()
End Sub
End Sub
End Sub
End Sub
Private Sub MultiPage1_Change()
End Sub
If IsNumeric(sayi) Then
sayi = Int(sayi * 100) / 100
If sayi < 0 Then
negatif = 1
sayi = Abs(sayi)
End If
asayi = Format(sayi, "000000000000000.00")
k�sur = String(13, "0") & Right(asayi, 2)
asayi = Left(asayi, 15)
If negatif = 1 Then syazi = "Eksi "
syazi = syazi & y�evir(asayi) & " YTL " & y�evir(k�sur) & " YKR"
Else
syazi = "Hata"
End If
YAZIYLAYTL = syazi
End Function
For x = 1 To 15
rakamlar(x) = Val(Mid(sayi, x, 1))
Next
For x = 0 To 4
basamak(1) = rakamlar((x * 3) + 1)
basamak(2) = rakamlar((x * 3) + 2)
basamak(3) = rakamlar((x * 3) + 3)
If basamak(1) = 0 Then
yazi = ""
ElseIf basamak(1) = 1 Then
yazi = "Y�z"
Else
yazi = birler(basamak(1)) + "Y�z"
End If
yazi = yazi + onlar(basamak(2)) + birler(basamak(3))
If yazi <> "" Then yazi = yazi + bsayi(x)
If (x = 3) And (yazi = "BirBin ") Then yazi = "Bin"
syazi = syazi + yazi
Next
If syazi = "" Then
syazi = "S�f�r"
End If
y�evir = syazi
End Function
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Sub sec()
sheets("stokkartlar�").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro uuu taraf�ndan 25.11.2004 tarihinde kaydedildi.
'
'
activesheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"stokkartlar�!A1"
Range("E6").Select
End Sub
----------kod bitir------
----------kod basla------
Sub AC()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
On Error Resume Next
sat = Columns(1).Find(ComboBox1.Value).Row
Range(Cells(sat, 1), Cells(sat, 2)).ClearContents
[A10:B65536].Sort Key1:=[a1]
End Sub
Private Sub UserForm_Initialize()
kayit = WorksheetFunction.CountA(Range("A10:A65536")) + 10
ComboBox1.RowSource = "sayfa1!A10:A" & kayit
End Sub
----------kod bitir------
----------kod basla------
Sub sirala()
For a = 1 To Sheets.Count
For b = a + 1 To Sheets.Count
If Sheets(b).Name > Sheets(a).Name Then GoTo 10
Sheets(b).Move before:=Sheets(a)
10 Next
Next
End Sub
----------kod bitir------
----------kod basla------
Sub s�rala()
adet1 = WorksheetFunction.CountA(Sayfa1.Range("A:A"))
Sayfa1.Range("A1: A" & adet1).Copy
Range("A2").PasteSpecial
Range("A2:A" & (adet1 + 1)).Sort Key1:=Range("A2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
adet2 = WorksheetFunction.CountA(Sayfa1.Range("B:B"))
Sayfa1.Range("B1: B" & adet2).Copy
Range("H2").PasteSpecial
Range("H2:H" & (adet2 + 1)).Sort Key1:=Range("H2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("E2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("Giri�").Select
Application.DisplayFullScreen = True
Application.WindowState = xlNormal
Application.Top = 7
Application.Left = 4
Application.Width = 100
Application.Height = 425
For i = 1 To 425
Application.Height = m
m = m + 1
DoEvents
Next i
For i = 1 To 600
Application.Width = y
y = y + 3
DoEvents
Next i
Application.WindowState = xlMaximized
Sheets("Giri�").Select
Range("c14").Select
With ActiveWindow
.DisplayHeadings = False
.DisplayWorkbookTabs = False
.DisplayGridlines = False
.DisplayOutline = False
.DisplayZeros = False
End With
Application.DisplayFormulaBar = True
Application.DisplayFullScreen = True
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("PivotTable").Visible = False
Application.CommandBars("Chart").Visible = False
Application.CommandBars("Reviewing").Visible = False
Application.CommandBars("Forms").Visible = False
Application.CommandBars("Stop Recording").Visible = False
Application.CommandBars("External Data").Visible = False
Application.CommandBars("Full Screen").Visible = False
Application.CommandBars("Circular Reference").Visible = False
Application.CommandBars("Visual Basic").Visible = False
Application.CommandBars("Web").Visible = False
Application.CommandBars("Control Toolbox").Visible = False
Application.CommandBars("Exit Design Mode").Visible = False
Application.CommandBars("Drawing").Visible = False
Application.CommandBars("WordArt").Visible = False
Application.CommandBars("Picture").Visible = False
Application.CommandBars("Shadow Settings").Visible = False
Application.CommandBars("3-D Settings").Visible = False
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Sheets("Giri�").Select
Application.DisplayFullScreen = True
Application.WindowState = xlNormal
Application.Top = 7
Application.Left = 4
Application.Width = 100
Application.Height = 425
For i = 1 To 425
Application.Height = m
m = m + 1
DoEvents
Next i
For i = 1 To 600
Application.Width = y
y = y + 3
DoEvents
Next i
Application.WindowState = xlMaximized
Sheets("Giri�").Select
Range("c14").Select
With ActiveWindow
.DisplayHeadings = False
.DisplayWorkbookTabs = False
.DisplayGridlines = False
.DisplayOutline = False
.DisplayZeros = False
End With
Application.DisplayFormulaBar = True
Application.DisplayFullScreen = True
Application.CommandBars("Standard").Visible = False
Application.CommandBars("Formatting").Visible = False
Application.CommandBars("PivotTable").Visible = False
Application.CommandBars("Chart").Visible = False
Application.CommandBars("Reviewing").Visible = False
Application.CommandBars("Forms").Visible = False
Application.CommandBars("Stop Recording").Visible = False
Application.CommandBars("External Data").Visible = False
Application.CommandBars("Full Screen").Visible = False
Application.CommandBars("Circular Reference").Visible = False
Application.CommandBars("Visual Basic").Visible = False
Application.CommandBars("Web").Visible = False
Application.CommandBars("Control Toolbox").Visible = False
Application.CommandBars("Exit Design Mode").Visible = False
Application.CommandBars("Drawing").Visible = False
Application.CommandBars("WordArt").Visible = False
Application.CommandBars("Picture").Visible = False
Application.CommandBars("Shadow Settings").Visible = False
Application.CommandBars("3-D Settings").Visible = False
End Sub
----------kod bitir------
----------kod basla------
Sub goster()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
tur = ComboBox1.ListIndex
Select Case tur
Case 0
ComboBox2.RowSource = "Sayfa1!b3:b65532"
Case 1
ComboBox2.RowSource = "Sayfa1!d3:d65532"
Case 2
ComboBox2.RowSource = "Sayfa1!f3:f65532"
End Select
End Sub
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "sayfa1!j1:j3"
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub m()
Dim deger As String
Dim i, a As Integer
deger = InputBox("aranacak de�er", "deneme")
For i = 2 To 28
For a = 2 To 14
If Cells(i, a) = deger Then
MsgBox Cells(i, 1) & " - " & Cells(1, a)
End
End If
Next a
Next i
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub m()
Dim deger As String
Dim i, a As Integer
deger = InputBox("aranacak de�er", "deneme")
For i = 2 To 14
For a = 2 To 28
If Cells(a, i) = deger Then
MsgBox Cells(a, 1) & " - " & Cells(1, i)
End
End If
Next a
Next i
End Sub
----------kod bitir------
----------kod basla------
Dim a, c, i, k, m As Integer
Dim b As String
Sub m1()
Sheets("sayfa3").Activate
For i = 2 To 7
Sheets("sayfa3").Activate
a = Cells(i, 1)
b = Cells(i, 2)
c = Cells(i, 3)
Sheets("sayfa2").Activate
For m = 2 To 20
If Cells((a + 1), m) = 0 Then
For k = m To (c + m)
Cells((a + 1), k) = b
Next k
End If
Next m
Next i
End Sub
Sub m2()
End Sub
Sub m3()
End Sub
----------kod bitir------
----------kod basla------
Sub m4()
End Sub
Sub m5()
End Sub
----------kod bitir------
----------kod basla------
Sub aa()
On Error Resume Next
Sheets("sayfa2").Range("A2:B65536").ClearContents
a = WorksheetFunction.CountA(Sheets("sayfa1").Range("E2:E65536"))
c = 0
son = Cells(65536, 1).End(xlUp).Value
For b = 2 To a + 2
sat = Sheets("sayfa1").Columns("A").Find(Cells(b, 5).Value).Row
For d = 1 To Cells(b, 6)
Sheets("sayfa2").Cells(c + 2, 1) = Cells(sat + d - 1, 1)
Sheets("sayfa2").Cells(c + 2, 2) = d
c = c + 1
If Cells(d, 1) = son Then Exit Sub
Next d
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 23.12.2004 by Zafer KO�ER
'
'
Range("A1").Select
ActiveCell.FormulaR1C1 = "'FR"
Range("A2").Select
End Sub
Sub Macro2()
'
' Macro2 Macro
' Macro recorded 23.12.2004 by Zafer KO�ER
'
'
Range("A1").Select
ActiveCell.FormulaR1C1 = "'TR"
Range("A2").Select
End Sub
Sub Macro3()
'
' Macro3 Macro
' Macro recorded 23.12.2004 by Zafer KO�ER
'
'
Range("A1").Select
ActiveCell.FormulaR1C1 = "'ENG"
Range("A2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub a�()
UserForm4.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
End Sub
For i = 1 To 53
For aa = 1 To a
Controls("Combobox" & i).AddItem Sheets("Sayfa1").Cells(aa, i).Value
Next aa
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox4_Change()
ara = ComboBox1.Value
alan = Sheets("KAYITLAR").Range("KAYITLAR")
Label14.Caption = Application.WorksheetFunction.VLookup(ara, alan, 3, 0)
Label15.Caption = Application.WorksheetFunction.VLookup(ara, alan, 3, 1)
Label16.Caption = Application.WorksheetFunction.VLookup(ara, alan, 3, 3)
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
index.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
yardim.Show
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
index.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
----------kod bitir------
----------kod basla------
Sub AUTO_OPEN()
UserForm1.Show 0
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
ListBox1.ListIndex = ComboBox1.ListIndex
ComboBox2.ListIndex = ComboBox1.ListIndex
End Sub
End Sub
----------kod bitir------
----------kod basla------
Function ParaCevir(Para, Optional PBirim = "Lira", Optional KBirim = "Kuru�")
Dim ParaStr As String
Dim Lira As String, Kurus As String
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " " & PBirim & " " & _
IIf(Val(Kurus) <> 0, Cevir(Kurus) & " " & KBirim & " ", "")
End Function
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
If liste.Text <> "" Then ActiveCell = liste.Text
End
End Sub
Sheets("arayuz").Select
Columns("A:A").Select
Selection.ClearContents
Sheets("liste").Select
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=1, Criteria1:=kriter, Operator:=xlAnd
Range("A1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("arayuz").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Selection.Offset(1, 0).Select
listeformu.liste.RowSource = Selection.Address
Sheets("liste").Select
Application.CutCopyMode = False
Selection.AutoFilter
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
On Error Resume Next
a = Sheets("STOK").Range("A2:A65532").Find(ComboBox1.Value).Row
Cells(a, 2) = Cells(a, 2) + TextBox1.Value
Cells(a, 3) = Cells(a, 3) + TextBox2.Value
Cells(a, 4) = Cells(a, 2) - Cells(a, 3)
Label7 = Cells(a, 4).Value
If Cells(a, 4) < 10 Then
Cells(a, 5) = "L�M�T ALTINDA"
Exit Sub
End If
Cells(a, 5) = "YETERL� SAYIDA"
End Sub
Private Sub CommandButton2_Click()
Unload Me
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
r = r + 4
'1.NC� KALEM
Sheets("Sevk").Cells(r, 1) = Sheets("SAYFA1").Cells(14, 2) 'firma adi
Sheets("Sevk").Cells(r, 2) = Sheets("Sayfa1").Cells(16, 9) 'tarih
Sheets("Sevk").Cells(r, 3) = Sheets("Sayfa1").Cells(14, 9) 'irsaliye no
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(25, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(25, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(26, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(25, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(25, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(25, 8) 'miktar
'2.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(28, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(28, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(29, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(28, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(28, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(28, 8) 'miktar
End If
'3.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(31, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(31, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(32, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(31, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(31, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(31, 8) 'miktar
End If
If Sheets("sayfa1").Cells(33, 2) <> "" Then
'4.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(34, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(34, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(35, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(34, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(34, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(34, 8) 'miktar
End If
'5.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(37, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(37, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(37, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(38, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(37, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(37, 8) 'miktar
End If
'6.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(40, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(40, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(41, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(40, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(40, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(40, 8) 'miktar
End If
'7.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(43, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(43, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(44, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(43, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(43, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(43, 8) 'miktar
End If
End Sub
----------kod bitir------
----------kod basla------
TextBox1.Text = Sheets("CARI").Cells(k + l + 1, 3)
TextBox2.Text = Sheets("CARI").Cells(k + l + 1, 4)
TextBox3.Text = Sheets("CARI").Cells(k + l + 1, 5)
TextBox4.Text = Sheets("CARI").Cells(k + l + 1, 6)
TextBox5.Text = Sheets("CARI").Cells(k + l + 1, 7)
End Sub
End Sub
End Sub
Sheets("Sayfa1").Cells(16, 2) = UserForm1.TextBox2.Text
Sheets("Sayfa1").Cells(19, 5) = UserForm1.TextBox3.Text
Sheets("Sayfa1").Cells(21, 4) = UserForm1.TextBox4.Text
Sheets("Sayfa1").Cells(21, 6) = UserForm1.TextBox5.Text
Sheets("Sayfa1").Cells(16, 9) = UserForm1.TextBox48.Text
Sheets("Sayfa1").Cells(47, 4) = UserForm1.TextBox49.Text
Sheets("Sayfa1").Cells(52, 3) = UserForm1.TextBox50.Text
Sheets("Sayfa1").Cells(52, 8) = UserForm1.TextBox51.Text
'stokkodu
Sheets("Sayfa1").Cells(25, 2) = UserForm1.ComboBox2.Text
Sheets("Sayfa1").Cells(28, 2) = UserForm1.ComboBox4.Text
Sheets("Sayfa1").Cells(31, 2) = UserForm1.ComboBox6.Text
Sheets("Sayfa1").Cells(34, 2) = UserForm1.ComboBox8.Text
Sheets("Sayfa1").Cells(37, 2) = UserForm1.ComboBox10.Text
Sheets("Sayfa1").Cells(40, 2) = UserForm1.ComboBox12.Text
Sheets("Sayfa1").Cells(43, 2) = UserForm1.ComboBox14.Text
'cinsi
Sheets("Sayfa1").Cells(25, 4) = UserForm1.ComboBox3.Text
Sheets("Sayfa1").Cells(28, 4) = UserForm1.ComboBox5.Text
Sheets("Sayfa1").Cells(31, 4) = UserForm1.ComboBox7.Text
Sheets("Sayfa1").Cells(34, 4) = UserForm1.ComboBox9.Text
Sheets("Sayfa1").Cells(37, 4) = UserForm1.ComboBox11.Text
Sheets("Sayfa1").Cells(40, 4) = UserForm1.ComboBox13.Text
Sheets("Sayfa1").Cells(43, 4) = UserForm1.ComboBox15.Text
'renk
Sheets("Sayfa1").Cells(25, 5) = UserForm1.TextBox6.Text
Sheets("Sayfa1").Cells(28, 5) = UserForm1.TextBox11.Text
Sheets("Sayfa1").Cells(31, 5) = UserForm1.TextBox16.Text
Sheets("Sayfa1").Cells(34, 5) = UserForm1.TextBox21.Text
Sheets("Sayfa1").Cells(37, 5) = UserForm1.TextBox26.Text
Sheets("Sayfa1").Cells(40, 5) = UserForm1.TextBox31.Text
Sheets("Sayfa1").Cells(43, 5) = UserForm1.TextBox36.Text
'renk no
Sheets("Sayfa1").Cells(25, 6) = UserForm1.TextBox7.Text
Sheets("Sayfa1").Cells(28, 6) = UserForm1.TextBox12.Text
Sheets("Sayfa1").Cells(31, 6) = UserForm1.TextBox17.Text
Sheets("Sayfa1").Cells(34, 6) = UserForm1.TextBox22.Text
Sheets("Sayfa1").Cells(37, 6) = UserForm1.TextBox27.Text
Sheets("Sayfa1").Cells(40, 6) = UserForm1.TextBox32.Text
Sheets("Sayfa1").Cells(43, 6) = UserForm1.TextBox37.Text
'miktar
Sheets("Sayfa1").Cells(25, 8) = UserForm1.TextBox8.Text
Sheets("Sayfa1").Cells(28, 8) = UserForm1.TextBox13.Text
Sheets("Sayfa1").Cells(31, 8) = UserForm1.TextBox18.Text
Sheets("Sayfa1").Cells(34, 8) = UserForm1.TextBox23.Text
Sheets("Sayfa1").Cells(37, 8) = UserForm1.TextBox28.Text
Sheets("Sayfa1").Cells(40, 8) = UserForm1.TextBox33.Text
Sheets("Sayfa1").Cells(43, 8) = UserForm1.TextBox38.Text
'birim
Sheets("Sayfa1").Cells(25, 9) = UserForm1.TextBox9.Text
Sheets("Sayfa1").Cells(28, 9) = UserForm1.TextBox14.Text
Sheets("Sayfa1").Cells(31, 9) = UserForm1.TextBox19.Text
Sheets("Sayfa1").Cells(34, 9) = UserForm1.TextBox24.Text
Sheets("Sayfa1").Cells(37, 9) = UserForm1.TextBox29.Text
Sheets("Sayfa1").Cells(40, 9) = UserForm1.TextBox34.Text
Sheets("Sayfa1").Cells(43, 9) = UserForm1.TextBox39.Text
'a��klama
Sheets("Sayfa1").Cells(25, 10) = UserForm1.TextBox10.Text
Sheets("Sayfa1").Cells(28, 10) = UserForm1.TextBox15.Text
Sheets("Sayfa1").Cells(31, 10) = UserForm1.TextBox20.Text
Sheets("Sayfa1").Cells(34, 10) = UserForm1.TextBox25.Text
Sheets("Sayfa1").Cells(37, 10) = UserForm1.TextBox30.Text
Sheets("Sayfa1").Cells(40, 10) = UserForm1.TextBox35.Text
Sheets("Sayfa1").Cells(43, 10) = UserForm1.TextBox40.Text
'parti no
Sheets("Sayfa1").Cells(26, 5) = UserForm1.TextBox41.Text
Sheets("Sayfa1").Cells(29, 5) = UserForm1.TextBox42.Text
Sheets("Sayfa1").Cells(32, 5) = UserForm1.TextBox43.Text
Sheets("Sayfa1").Cells(35, 5) = UserForm1.TextBox44.Text
Sheets("Sayfa1").Cells(38, 5) = UserForm1.TextBox45.Text
Sheets("Sayfa1").Cells(41, 5) = UserForm1.TextBox46.Text
Sheets("Sayfa1").Cells(44, 5) = UserForm1.TextBox47.Text
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
'carikod
A = WorksheetFunction.CountA(Sheets("CARI").Range("B8:B65000"))
MsgBox A
k = 7
For t = 1 To A
UserForm1.ComboBox1.AddItem Sheets("CARI").Cells(k + t, 2)
Next t
'stokkod
b = WorksheetFunction.CountA(Sheets("STOKKOD").Range("A7:A100"))
j = 6
For y = 1 To b
ComboBox2.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox4.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox6.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox8.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox10.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox12.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox14.AddItem Sheets("STOKKOD").Cells(y + j, 1)
Next y
'iplik cinsi
c = WorksheetFunction.CountA(Sheets("STOKKOD").Range("B7:B100"))
g = 6
For f = 1 To c
ComboBox3.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox5.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox7.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox9.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox11.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox13.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox15.AddItem Sheets("STOKKOD").Cells(g + f, 2)
Next f
End Sub
----------kod bitir------
----------kod basla------
Sub Ekle()
r = WorksheetFunction.CountA(Sheets("Sevk").Range("A4:A10000")) + 4
'r = r + 4
'1.NC� KALEM
'2.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(28, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(28, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(29, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(28, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(28, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(28, 8) 'miktar
End If
'5.NC� KALEM
Sheets("Sevk").Cells(r, 4) = Sheets("Sayfa1").Cells(37, 2) 'stok kodu
Sheets("Sevk").Cells(r, 5) = Sheets("Sayfa1").Cells(37, 4) 'cinsi
Sheets("Sevk").Cells(r, 6) = Sheets("Sayfa1").Cells(37, 5) 'parti no
Sheets("Sevk").Cells(r, 7) = Sheets("Sayfa1").Cells(38, 5) 'renk
Sheets("Sevk").Cells(r, 8) = Sheets("Sayfa1").Cells(37, 6) 'renk no
Sheets("Sevk").Cells(r, 9) = Sheets("Sayfa1").Cells(37, 8) 'miktar
End If
End If
End Sub
----------kod bitir------
----------kod basla------
TextBox1.Text = Sheets("CARI").Cells(k + l + 1, 3)
TextBox2.Text = Sheets("CARI").Cells(k + l + 1, 4)
TextBox3.Text = Sheets("CARI").Cells(k + l + 1, 5)
TextBox4.Text = Sheets("CARI").Cells(k + l + 1, 6)
TextBox5.Text = Sheets("CARI").Cells(k + l + 1, 7)
End Sub
End Sub
End Sub
Sheets("Sayfa1").Cells(16, 2) = UserForm1.TextBox2.Text
Sheets("Sayfa1").Cells(19, 5) = UserForm1.TextBox3.Text
Sheets("Sayfa1").Cells(21, 4) = UserForm1.TextBox4.Text
Sheets("Sayfa1").Cells(21, 6) = UserForm1.TextBox5.Text
Sheets("Sayfa1").Cells(16, 9) = UserForm1.TextBox48.Text
Sheets("Sayfa1").Cells(47, 4) = UserForm1.TextBox49.Text
Sheets("Sayfa1").Cells(52, 3) = UserForm1.TextBox50.Text
Sheets("Sayfa1").Cells(52, 8) = UserForm1.TextBox51.Text
'stokkodu
Sheets("Sayfa1").Cells(25, 2) = UserForm1.ComboBox2.Text
Sheets("Sayfa1").Cells(28, 2) = UserForm1.ComboBox4.Text
Sheets("Sayfa1").Cells(31, 2) = UserForm1.ComboBox6.Text
Sheets("Sayfa1").Cells(34, 2) = UserForm1.ComboBox8.Text
Sheets("Sayfa1").Cells(37, 2) = UserForm1.ComboBox10.Text
Sheets("Sayfa1").Cells(40, 2) = UserForm1.ComboBox12.Text
Sheets("Sayfa1").Cells(43, 2) = UserForm1.ComboBox14.Text
'cinsi
Sheets("Sayfa1").Cells(25, 4) = UserForm1.ComboBox3.Text
Sheets("Sayfa1").Cells(28, 4) = UserForm1.ComboBox5.Text
Sheets("Sayfa1").Cells(31, 4) = UserForm1.ComboBox7.Text
Sheets("Sayfa1").Cells(34, 4) = UserForm1.ComboBox9.Text
Sheets("Sayfa1").Cells(37, 4) = UserForm1.ComboBox11.Text
Sheets("Sayfa1").Cells(40, 4) = UserForm1.ComboBox13.Text
Sheets("Sayfa1").Cells(43, 4) = UserForm1.ComboBox15.Text
'renk
Sheets("Sayfa1").Cells(25, 5) = UserForm1.TextBox6.Text
Sheets("Sayfa1").Cells(28, 5) = UserForm1.TextBox11.Text
Sheets("Sayfa1").Cells(31, 5) = UserForm1.TextBox16.Text
Sheets("Sayfa1").Cells(34, 5) = UserForm1.TextBox21.Text
Sheets("Sayfa1").Cells(37, 5) = UserForm1.TextBox26.Text
Sheets("Sayfa1").Cells(40, 5) = UserForm1.TextBox31.Text
Sheets("Sayfa1").Cells(43, 5) = UserForm1.TextBox36.Text
'renk no
Sheets("Sayfa1").Cells(25, 6) = UserForm1.TextBox7.Text
Sheets("Sayfa1").Cells(28, 6) = UserForm1.TextBox12.Text
Sheets("Sayfa1").Cells(31, 6) = UserForm1.TextBox17.Text
Sheets("Sayfa1").Cells(34, 6) = UserForm1.TextBox22.Text
Sheets("Sayfa1").Cells(37, 6) = UserForm1.TextBox27.Text
Sheets("Sayfa1").Cells(40, 6) = UserForm1.TextBox32.Text
Sheets("Sayfa1").Cells(43, 6) = UserForm1.TextBox37.Text
'miktar
Sheets("Sayfa1").Cells(25, 8) = UserForm1.TextBox8.Text
Sheets("Sayfa1").Cells(28, 8) = UserForm1.TextBox13.Text
Sheets("Sayfa1").Cells(31, 8) = UserForm1.TextBox18.Text
Sheets("Sayfa1").Cells(34, 8) = UserForm1.TextBox23.Text
Sheets("Sayfa1").Cells(37, 8) = UserForm1.TextBox28.Text
Sheets("Sayfa1").Cells(40, 8) = UserForm1.TextBox33.Text
Sheets("Sayfa1").Cells(43, 8) = UserForm1.TextBox38.Text
'birim
Sheets("Sayfa1").Cells(25, 9) = UserForm1.TextBox9.Text
Sheets("Sayfa1").Cells(28, 9) = UserForm1.TextBox14.Text
Sheets("Sayfa1").Cells(31, 9) = UserForm1.TextBox19.Text
Sheets("Sayfa1").Cells(34, 9) = UserForm1.TextBox24.Text
Sheets("Sayfa1").Cells(37, 9) = UserForm1.TextBox29.Text
Sheets("Sayfa1").Cells(40, 9) = UserForm1.TextBox34.Text
Sheets("Sayfa1").Cells(43, 9) = UserForm1.TextBox39.Text
'a��klama
Sheets("Sayfa1").Cells(25, 10) = UserForm1.TextBox10.Text
Sheets("Sayfa1").Cells(28, 10) = UserForm1.TextBox15.Text
Sheets("Sayfa1").Cells(31, 10) = UserForm1.TextBox20.Text
Sheets("Sayfa1").Cells(34, 10) = UserForm1.TextBox25.Text
Sheets("Sayfa1").Cells(37, 10) = UserForm1.TextBox30.Text
Sheets("Sayfa1").Cells(40, 10) = UserForm1.TextBox35.Text
Sheets("Sayfa1").Cells(43, 10) = UserForm1.TextBox40.Text
'parti no
Sheets("Sayfa1").Cells(26, 5) = UserForm1.TextBox41.Text
Sheets("Sayfa1").Cells(29, 5) = UserForm1.TextBox42.Text
Sheets("Sayfa1").Cells(32, 5) = UserForm1.TextBox43.Text
Sheets("Sayfa1").Cells(35, 5) = UserForm1.TextBox44.Text
Sheets("Sayfa1").Cells(38, 5) = UserForm1.TextBox45.Text
Sheets("Sayfa1").Cells(41, 5) = UserForm1.TextBox46.Text
Sheets("Sayfa1").Cells(44, 5) = UserForm1.TextBox47.Text
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
'stokkod
b = WorksheetFunction.CountA(Sheets("STOKKOD").Range("A7:A100"))
j = 6
For y = 1 To b
ComboBox2.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox4.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox6.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox8.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox10.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox12.AddItem Sheets("STOKKOD").Cells(y + j, 1)
ComboBox14.AddItem Sheets("STOKKOD").Cells(y + j, 1)
Next y
'iplik cinsi
c = WorksheetFunction.CountA(Sheets("STOKKOD").Range("B7:B100"))
g = 6
For f = 1 To c
ComboBox3.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox5.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox7.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox9.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox11.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox13.AddItem Sheets("STOKKOD").Cells(g + f, 2)
ComboBox15.AddItem Sheets("STOKKOD").Cells(g + f, 2)
Next f
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Close()
Application.CommandBars("Worksheet Menu Bar").Reset
Columns("A:G").Select
Selection.EntireColumn.Hidden = True
Range("H1").Select
End Sub
Sub Auto_Open()
'Men� A��p Ba�l���n� Haz�rlar
Set x = Application.CommandBars(1).Controls.Add(msoControlPopup, 1, , , True)
x.Caption = "Ana Men�"
'1 Alt Men� Haz�rlar
Set a = x.Controls.Add(msoControlButton, , , , True)
a.Style = msoButtonIconAndCaption
a.Caption = "S�tun A�"
a.OnAction = "ac"
Set b = x.Controls.Add(msoControlButton, , , , True)
b.Style = msoButtonIconAndCaption
b.Caption = "S�tun Gizle"
b.OnAction = "gizle"
Columns("A:G").Select
Selection.EntireColumn.Hidden = True
Range("H1").Select
End Sub
Sub gizle()
Columns("A:G").Select
Selection.EntireColumn.Hidden = True
Range("H1").Select
End Sub
Sub Ac()
Static sayac As Integer
Do
If sayac = 3 Then
ThisWorkbook.Close False
Else
If InputBox("�ifreyi girin") = "12345" Then
GoTo devam
Else
sayac = sayac + 1
End If
End If
Loop
devam:
Columns("A:G").Select
Selection.EntireColumn.Hidden = False
Range("H1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub rapor()
Range("A4:F65536").ClearContents
c = 0
d = 0
For a = 9 To 31 Step 2
For b = 4 To Sheets("L�STE").Cells(65536, 1).End(xlUp).Row
If Sheets("L�STE").Cells(b, a).Value = 0 Then GoTo 10
If Month(Sheets("L�STE").Cells(b, a).Value) = Month(Cells(1, 2).Value) Then
c = c + 1
Cells(c + 3, 1) = Sheets("L�STE").Cells(b, 2).Value
Cells(c + 3, 2) = Sheets("L�STE").Cells(b, a).Value
Cells(c + 3, 3) = Sheets("L�STE").Cells(b, a + 1).Value
d = Sheets("L�STE").Cells(b, a + 1).Value + d
End If
10 Next b
Next a
e = Cells(65536, 1).End(xlUp).Row
Range("A4:C" & e).Sort Key1:=Range("B4")
Cells(e + 2, 2) = "TOPLAM:"
Cells(e + 2, 3) = d
Range("B3:B" & e).AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range("E3" _
), Unique:=True
For aa = 4 To Cells(65536, 5).End(xlUp).Row
Cells(aa, 6) = WorksheetFunction.SumIf(Range("B4:B65536"), Cells(aa, 5),
Range("C4:C65536"))
Next aa
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro uuuu taraf�ndan 01.03.2005 tarihinde kaydedildi.
'
'
Columns("A:A").Select
Selection.Find(What:="19", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Selection.Find(What:="19", After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
Range("C11").Select
End Sub
----------kod bitir------
----------kod basla------
Sub listele()
Columns("E:F").ClearContents
a = WorksheetFunction.CountA(Sheets("1").Range("A1:A65530"))
s�ra = 0
For say = 1 To a
If Cells(say, 1) = 0 Then GoTo 10
b = WorksheetFunction.CountIf(Sheets("1").Range("A1:A" & say), Cells(say, 1))
If b = 1 Then
s�ra = s�ra + 1
Cells(s�ra, 5) = Cells(say, 1)
Cells(s�ra, 6) = WorksheetFunction.SumIf(Sheets("1").Range("A1:A65530"),
Cells(s�ra, 5), Sheets("1").Range("B1:B65530"))
End If
10 Next say
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_open()
[b2] = Sheets(1).Name
End Sub
----------kod bitir------
----------kod basla------
Public MyUser As String
Public MyPass As String
Sub Auto_Open()
Dim UserArr
Dim PasswArr
Dim i As Integer
Application.Visible = False
10 Call MyPasswBox
Set NewCommandButton1 =
PassWForm.Designer.Controls.Add("forms.CommandButton.1")
With NewCommandButton1
.Caption = "�PTAL"
.Height = 18
.Width = 50
.Left = 70
.Top = 72
End With
Set NewCommandButton2 =
PassWForm.Designer.Controls.Add("forms.CommandButton.1")
With NewCommandButton2
.Caption = "TAMAM"
.Height = 18
.Width = 50
.Left = 130
.Top = 72
End With
With PassWForm.CodeModule
X = .CountOfLines
.InsertLines X + 1, "Sub CommandButton1_Click()"
.InsertLines X + 2, "ActiveWindow.Close"
.InsertLines X + 3, "End Sub"
.InsertLines X + 4, "Sub CommandButton2_Click()"
.InsertLines X + 5, "MyUser = TextBox1"
.InsertLines X + 6, "MyPass = TextBox2"
.InsertLines X + 7, "Unload Me"
.InsertLines X + 8, "End Sub"
.InsertLines X + 9, "Sub UserForm_Activate()"
.InsertLines X + 10, "Me.SpecialEffect=3"
.InsertLines X + 11, "End Sub"
.InsertLines X + 12, "Sub UserForm_QueryClose(Cancel As Integer, CloseMode
As Integer)"
.InsertLines X + 13, "If CloseMode <> 1 Then Cancel = True"
.InsertLines X + 14, "End Sub"
End With
VBA.UserForms.Add(PassWForm.Name).Show
ThisWorkbook.VBProject.VBComponents.Remove VBComponent:=PassWForm
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Application.Visible = False
MultiPage1.Show
End Sub
Sub auto_close()
Application.Visible = True
Application.Quit
ActiveWindow.Close
End Sub
----------kod bitir------
----------kod basla------
'simgedurumuna k���ltme
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function ShowWindow Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
'CEKLER BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
'F�RMA BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRR
'CAR�HESAP BA�LIYORRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Private Sub cmdhesapla_Click()
On Error Resume Next
p = Round(txtodeme1, 2)
p = WorksheetFunction.Substitute(p, ",", ".")
r = Round(txtodeme2, 2)
r = WorksheetFunction.Substitute(r, ",", ".")
s = Round(txtodeme3, 2)
s = WorksheetFunction.Substitute(s, ",", ".")
t = Round(txtodeme4, 2)
t = WorksheetFunction.Substitute(t, ",", ".")
y = Round(txttutar, 2)
y = WorksheetFunction.Substitute(y, ",", ".")
z = (Val(y) - ((Val(p) + Val(r)) + Val(s) + Val(t)))
z = WorksheetFunction.Substitute(z, ".", ",")
txtkalanborc = z
End Sub
Workbooks("��RKET�M.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdtemizle_Click()
cbad.Value = ""
txtsoyad.Value = ""
txtadres.Value = ""
txtcep.Value = ""
txtev.Value = ""
cbmal.Value = ""
txttutar.Value = ""
txtmaltarihi.Value = ""
txtfisno.Value = ""
txtodeme1.Value = ""
txttarih1.Value = ""
txtodeme2.Value = ""
txttarih2.Value = ""
txtodeme3.Value = ""
txttarih3.Value = ""
txtodeme4.Value = ""
txttarih4.Value = ""
txtkalanborc.Value = ""
cbad.SetFocus
End Sub
Private Sub txtfiyat_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txtfiyat.Value = Format(txtfiyat.Value, "#,##0.00 YTL")
End Sub
Private Sub txttarih_Exit(ByVal Cancel As MSForms.ReturnBoolean)
txttarih = Mid(txttarih, 1, 2) & " " & Mid(txttarih, 3, 2) & " " & Right(txttarih,
4)
End Sub
Private Sub cmdsil_Click()
Dim say As Integer
Dim i As Integer
Dim bos As Range
For Each bos In Range("B2:B" & WorksheetFunction.CountA(Range("B2:B65000")))
If cbad.Value = "" Or bos = "" Or ActiveCell = "" Then
MsgBox "�nce arad���n�z veriyi BUL ile bulmal�s�n�z"
Exit Sub
End If
Next bos
Range(ActiveCell.Offset(0, -1).Address(False, False) & ":" &
ActiveCell.Offset(0, 50).Address(False, False)).Delete Shift:=xlUp
say = WorksheetFunction.CountA(Range("A2:A65000"))
For i = 1 To say
Cells(i + 1, 1) = i
Next i
Workbooks("��RKET�M.XLS").Save
MsgBox "Veriniz Silindi", , "KAYIT"
cmdtemizle_Click
cbad.RowSource = "Veri!B2:B" & say + 1
txtsira.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub
Private Sub cmdkapat_Click()
Unload Me
Application.Visible = True
Application.Quit
End Sub
'USERFORMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
Private Sub UserForm_Activate()
i = " " & Format(Date, "dd mmmm yyyy dddd") & Format(Today, "ddd") & " " & "
Saat " & Format(Time, "hh:mm")
caritarih.Value = i
firmalartarih.Value = i
ceklertarih.Value = i
Dim hWndForm As Long, frmStyle As Long 'simgedurumun k���ltme
hWndForm = FindWindow(vbNullString, Me.Caption)
frmStyle = GetWindowLong(hWndForm, (-16))
frmStyle = frmStyle Or &H80000 Or &H20000 Or &H10000
SetWindowLong hWndForm, (-16), frmStyle
ShowWindow hWndForm, 5
DrawMenuBar hWndForm
End Sub
Private Sub UserForm_Initialize()
----------kod bitir------
----------kod basla------
Function yaziyacevir(rakam)
'veysel emre taraf�ndan yap�lm�t�r
Dim grup(5), sayi(10, 3), basamak(5), oku(3)
sayi(0, 1) = "": sayi(0, 2) = "": sayi(0, 3) = ""
sayi(1, 1) = "Y�Z": sayi(1, 2) = "ON": sayi(1, 3) = "B�R"
sayi(2, 1) = "�K�Y�Z": sayi(2, 2) = "Y�RM�": sayi(2, 3) = "�K�"
sayi(3, 1) = "��Y�Z": sayi(3, 2) = "OTUZ": sayi(3, 3) = "��"
sayi(4, 1) = "D�RTY�Z": sayi(4, 2) = "KIRK": sayi(4, 3) = "D�RT"
sayi(5, 1) = "BE�Y�Z": sayi(5, 2) = "ELL�": sayi(5, 3) = "BE�"
sayi(6, 1) = "ALTIY�Z": sayi(6, 2) = "ALTMI�": sayi(6, 3) = "ALTI"
sayi(7, 1) = "YED�Y�Z": sayi(7, 2) = "YETM��": sayi(7, 3) = "YED�"
sayi(8, 1) = "SEK�ZY�Z": sayi(8, 2) = "SEKSEN": sayi(8, 3) = "SEK�Z"
sayi(9, 1) = "DOKUZY�Z": sayi(9, 2) = "DOKSAN": sayi(9, 3) = "DOKUZ"
basamak(5) = "TR�LYON"
basamak(4) = "M�LYAR"
basamak(3) = "M�LYON"
basamak(2) = "B�N"
basamak(1) = ""
lira = Int(rakam)
If kucuk = 1 Then
For x = 0 To 9
For y = 1 To 3
sayi(x, y) = Replace(sayi(x, y), "I", "�")
sayi(x, y) = Replace(sayi(x, y), "�", "i")
sayi(x, y) = LCase(sayi(x, y))
Next
Next
For y = 2 To 5
basamak(y) = Replace(basamak(y), "I", "�")
basamak(y) = Replace(basamak(y), "�", "i")
basamak(y) = LCase(basamak(y))
Next
End If
For x = 1 To 5
A = 15 - 3 * x
If Len(lira) > A Then
grup(6 - x) = Int(kalan / 10 ^ A)
kalan = kalan - (grup(6 - x) * 10 ^ A)
End If
Next x
If grup(2) = 1 Then
yaziyacevir = yaziyacevir + "B�N"
End If
Application.Visible = False
10 Call MyPasswBox
Set NewCommandButton1 =
PassWForm.Designer.Controls.Add("forms.CommandButton.1")
With NewCommandButton1
.Caption = "�PTAL"
.Height = 18
.Width = 50
.Left = 70
.Top = 72
End With
Set NewCommandButton2 =
PassWForm.Designer.Controls.Add("forms.CommandButton.1")
With NewCommandButton2
.Caption = "TAMAM"
.Height = 18
.Width = 50
.Left = 130
.Top = 72
End With
With PassWForm.CodeModule
X = .CountOfLines
.InsertLines X + 1, "Sub CommandButton1_Click()"
.InsertLines X + 2, "ActiveWindow.Close"
.InsertLines X + 3, "End Sub"
.InsertLines X + 4, "Sub CommandButton2_Click()"
.InsertLines X + 5, "MyUser = TextBox1"
.InsertLines X + 6, "MyPass = TextBox2"
.InsertLines X + 7, "Unload Me"
.InsertLines X + 8, "End Sub"
.InsertLines X + 9, "Sub UserForm_Activate()"
.InsertLines X + 10, "Me.SpecialEffect=3"
.InsertLines X + 11, "End Sub"
.InsertLines X + 12, "Sub UserForm_QueryClose(Cancel As Integer, CloseMode
As Integer)"
.InsertLines X + 13, "If CloseMode <> 1 Then Cancel = True"
.InsertLines X + 14, "End Sub"
End With
VBA.UserForms.Add(PassWForm.Name).Show
ThisWorkbook.VBProject.VBComponents.Remove VBComponent:=PassWForm
End Sub
Sub Yazd�r()
Sheets("T").PrintOut
End Sub
Sub HarfHarf(ref As UserForm7)
baslik = ref.Caption
ref.Caption = ""
For i = 0 To Len(baslik)
If i = 0 Then
ref.Caption = ""
current = Timer
Do While Timer - current < 0.5
DoEvents
Loop
GoTo Son
Else
End If
ref.Caption = Left(baslik, i)
current = Timer
Do While Timer - current < 0.5
DoEvents
Loop
Son:
Next i
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Public Function ParaCevir(Para)
Dim ParaStr As String
Dim Lira As String, Kurus As String
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " Lira " & Cevir(Kurus)
& " Kuru�"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
----------kod bitir------
----------kod basla------
Sub Temizle()
Range("E6,E7:H7,G6:H6,J10,D13:J22,E24:F24,E25:F25,E26,D29:E29").ClearContents
End Sub
Sub Yazdir()
ActiveSheet.PageSetup.PrintArea = "$C$3:$K$30"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.PageSetup.PrintArea = ""
End Sub
----------kod bitir------
----------kod basla------
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v(15)
Dim c(3)
b$(0) = ""
b$(1) = "Bir"
b$(2) = "�ki"
b$(3) = "��"
b$(4) = "D�rt"
b$(5) = "Be�"
b$(6) = "Alt�"
b$(7) = "Yedi"
b$(8) = "Sekiz"
b$(9) = "Dokuz"
y$(0) = ""
y$(1) = "On"
y$(2) = "Yirmi"
y$(3) = "Otuz"
y$(4) = "K�rk"
y$(5) = "Elli"
y$(6) = "Altm�"
y$(7) = "Yetmi�"
y$(8) = "Seksen"
y$(9) = "Doksan"
m$(0) = "Trilyon"
m$(1) = "Milyar"
m$(2) = "Milyon"
m$(3) = "Bin"
m$(4) = ""
a$ = Str(sayi)
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
s$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�z"
Else
e$ = b$(c(1)) + "Y�z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "BirBin") Then e$ = "Bin"
s$ = s$ + e$
Next x
yaz$ = s$
GoTo tamam
hata: yaz$ = "Hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Sub kopyala()
Sheets("sayfa1").Select
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Dim son As Integer
Private Sub ComboBox1_Click()
Rows(2).AutoFilter 1, ComboBox1.Value
End Sub
Private Sub ComboBox2_Click()
Rows(2).AutoFilter 2, ComboBox2.Value
End Sub
Private Sub ComboBox3_Click()
Rows(2).AutoFilter 3, ComboBox3.Value
End Sub
Private Sub ComboBox4_Click()
Rows(2).AutoFilter 4, ComboBox4.Value
End Sub
Private Sub ComboBox5_Click()
bastar = CLng(CDate(ComboBox5.Value))
Rows(2).AutoFilter 5, Criteria1:=">=" & bastar
End Sub
Private Sub ComboBox6_Click()
bittar = CLng(CDate(ComboBox6.Value))
Rows(2).AutoFilter 6, Criteria1:="<=" & bittar
End Sub
Private Sub CommandButton2_Click()
Rows(2).AutoFilter
For a = 1 To 6
Controls("combobox" & a).Value = ""
Next
ComboBox1.SetFocus
Rows(2).AutoFilter
End Sub
Private Sub CommandButton1_Click()
toplam = WorksheetFunction.Subtotal(3, [a2:a65536])
If toplam = 1 Then
MsgBox ("BU KR�TERLERE UYGUN VER� BULUNAMADI")
Exit Sub
End If
Sheets("sayfa2").[a1:f65536].ClearContents
Sheets("sayfa1").Range("A2:F" & son + 1).Copy
Sheets("sayfa2").[a1].PasteSpecial
Application.CutCopyMode = False
Sheets("sayfa1").Rows(2).AutoFilter
Sheets("sayfa2").Rows(1).AutoFilter
Sheets("sayfa2").Select
[h2].Select
End Sub
Private Sub UserForm_Initialize()
Sheets("sayfa1").Rows(2).AutoFilter
For a = 1 To 6
For b = 3 To Sheets("sayfa1").Cells(65536, 1).End(xlUp).Row
son = Sheets("sayfa1").Cells(65536, a).End(xlUp).Row
If WorksheetFunction.CountIf(Range(Sheets("sayfa1").Cells(b, a),
Sheets("sayfa1").Cells(son, a)), Sheets("sayfa1").Cells(b, a).Value) = 1 Then
UserForm1.Controls("combobox" & a).AddItem Sheets("sayfa1").Cells(b, a).Value
End If
Next
Next
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Rows(2).AutoFilter
End Sub
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
UserForm2.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub Calendar1_Click()
UserForm1.TextBox1 = Format(Calendar1.Value, "dd.mmmm.yy")
UserForm1.CommandButton1.SetFocus
Unload Me
End Sub
----------kod bitir------
----------kod basla------
Function tarihfarkbul(sont, ilkt)
sonyil = Year(sont)
sonay = Month(sont)
songun = Day(sont)
ilkyil = Year(ilkt)
ilkay = Month(ilkt)
ilkgun = Day(ilkt)
farkyil = sonyil - ilkyil
farkay = sonay - ilkay
If farkay < 0 Then
farkyil = farkyil - 1
farkay = farkay + 12
End If
farkgun = songun - ilkgun
If farkgun < 0 Then
farkay = farkay - 1
farkgun = farkgun + 30
End If
tarihfarkbul = farkgun & "." & farkay & "." & farkyil
End Function
----------kod bitir------
----------kod basla------
Sub tarihebak()
a = WorksheetFunction.CountA(Sheets("sayfa1").Range("A2:A65536"))
For b = a To 2 Step -1
If Cells(b, 2) = [d1] Then
c = Cells(b, 1) + "," + c
End If
Next b
MsgBox (c & " �r�nlerinin sevk tarihi geldi")
End Sub
----------kod bitir------
----------kod basla------
Sub frmac()
vlistele.Show
End Sub
----------kod bitir------
----------kod basla------
Dim bastar As Date
Dim bittar As Date
Dim aratar As Date
Public arananay
Private Sub ComboBox1_Change()
arananay = ComboBox1.Value
End Sub
Private Sub CommandButton2_Click()
Sheets("rapor").Select
Range("A3:J55000").Select
Selection.ClearContents
Sheets("MALT").Select
j = 3
t = 3
Do While Cells(j, 1) <> ""
bak = Choose(Month(Cells(j, 2)), "OCAK", "�UBAT", "MART", "N�SAN", "MAYIS",
"HAZ�RAN", "TEMMUZ", "A�USTOS", "EYL�L", "EK�M", "KASIM", "ARALIK")
If bak = arananay Then
For k = 1 To 10
Worksheets("rapor").Cells(t, k + 0) = Cells(j, k)
Next k
t = t + 1
End If
j = j + 1
Loop
vlistele.Hide
Sheets("rapor").Select
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Private Sub CommandButton3_Click()
Sheets("rapor").Select
Range("A3:J55000").ClearContents
Sheets("MALT").Select
Range("D2").AutoFilter Field:=4, Criteria1:=ComboBox2.Value
a = WorksheetFunction.CountA(Sheets("MALT").Range("A3:A65000"))
Sheets("MALT").Range("A3:J" & a + 2).Copy
Sheets("rapor").Range("A3").PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Selection.AutoFilter
b = WorksheetFunction.CountA(Sheets("rapor").Range("A3:A65000"))
For c = 3 To b + 2
Cells(c, 1) = c - 2
Next c
Range("A1").Select
vlistele.Hide
Sheets("rapor").Select
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Private Sub CommandButton4_Click()
Sheets("rapor").Select
Range("A3:J55000").ClearContents
Sheets("MALT").Select
Range("E2").AutoFilter Field:=5, Criteria1:=ComboBox3.Value
a = WorksheetFunction.CountA(Sheets("MALT").Range("A3:A65000"))
Sheets("MALT").Range("A3:J" & a + 2).Copy
Sheets("rapor").Range("A3").PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Selection.AutoFilter
b = WorksheetFunction.CountA(Sheets("rapor").Range("A3:A65000"))
For c = 3 To b + 2
Cells(c, 1) = c - 2
Next c
Range("A1").Select
vlistele.Hide
Sheets("rapor").Select
ActiveWindow.SelectedSheets.PrintPreview
End Sub
Private Sub CommandButton5_Click()
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub
Private Sub CommandButton6_Click()
Unload Me
malt.Show
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
[B3:B8].Copy
sat = WorksheetFunction.CountA(Sayfa2.[A3:A65536]) + 3
Sayfa2.Range("A" & sat).PasteSpecial Paste:=xlPasteValues, Transpose:=True
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Sub Listele()
Sheets("G�R��").Select
End Sub
Sub tamam()
Listele
sayfa_olustur
End Sub
----------kod bitir------
----------kod basla------
Sub Giri�leri_Yerlestir()
Sheets("Giri�").Select
son = WorksheetFunction.CountA(Range("b2:b1000"))
For say = 1 To son
ilk:
End If
End Sub
Sub gir_yer1()
Giri�leri_Yerlestir
Sheets("G�R��").Select
Range("C2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub sayfa_olustur()
Dim Sh As Worksheet
Dim Rng As Range
Dim c As Range
Set Sh = Worksheets("G�R��")
Set Rng = Sh.Range("B2:B" & Sh.Range("B65536").End(xlUp).Row)
For Each c In Rng
Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = c.Text
Next c
Sh.Activate
End Sub
Sub yazdir()
Dim hucreE As Range
For Each hucreE In Range("f:f") 'buras� m s�tununa g�re alg�l�yor
If hucreE.Value <> "" Then hucreE.Select
Next
Range(Cells(1, 1), ActiveCell).Select ' birinci 1 sat�r ikinci 1 s�tunu ifade eder
otomatik se�me ile ilgili
Selection.PrintOut Copies:=1, Collate:=True
Range("c2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_OPen()
Sheets("G�R��").Select
Range("C2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Giri�leri_Yerlestir1()
Sheets("Giri�").Select
son = WorksheetFunction.CountA(Range("b2:b1000"))
For say = 1 To son
On Error GoTo Hata
Sheets(Sheets("Giri�").Range("B" & say + 1).Value).Select
Range("b2").Select 'sayflardaki yap�t�r�lacak adres
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select 'Buras� 2 olursa akt�r�lan bilgiler 1 sat�r bo�luk
ile aktarl�r
Loop
ActiveCell.Value = Sheets("Giri�").Range("B" & say + 1)
ActiveCell.Offset(0, 1).Value = Sheets("Giri�").Range("C" & say + 1)
ActiveCell.Offset(0, 2).Value = Sheets("Giri�").Range("D" & say + 1)
ActiveCell.Offset(0, 3).Value = Sheets("Giri�").Range("E" & say + 1)
ActiveCell.Offset(0, 4).Value = Sheets("Giri�").Range("F" & say + 1)
Next
Exit Sub
Hata:
MsgBox Sheets("Giri�").Range("B" & say + 1).Value _
& " �sminde Sayfa Yoktur", vbCritical, "Levent Erdo�an & Chr(153)"
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro ETSAS IPLIK taraf�ndan 15.04.2005 tarihinde kaydedildi.
'
'
Range("A5:E65500").Select
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A5").Select
End Sub
Sub Makro2()
'
' Makro2 Makro
' Makro ETSAS IPLIK taraf�ndan 15.04.2005 tarihinde kaydedildi.
'
'
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Sheets("SAYFA1").Select
Rows("1:1").Select
Selection.Insert Shift:=xlDown
Sheets("SAYFA2").Select
Range("A1:F1").Select
Selection.Copy
Sheets("SAYFA1").Select
Range("A1:F1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ComboBox1.Value = ""
ComboBox2.Value = ""
ComboBox3.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
Range("A1:E65500").Select
Selection.Sort Key1:=Range("A5"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B5").Select
Sheets("SAYFA2").Select
Sheets("SAYFA1").Select
End Sub
ComboBox1.ListIndex = ListBox1.ListIndex
ComboBox2.ListIndex = ListBox1.ListIndex
ComboBox3.ListIndex = ListBox1.ListIndex
ComboBox4.ListIndex = ListBox1.ListIndex
ComboBox5.ListIndex = ListBox1.ListIndex
End Sub
With ListBox1
.RowSource = "[TELEFON_DEFTER�.xls]SAYFA1!A1:A65500"
.Font.Name = "Verdana"
.Font.Size = 10
End With
With ComboBox1
.RowSource = "[TELEFON_DEFTER�.xls]SAYFA1!b1:b65500"
.ShowDropButtonWhen = fmShowDropButtonWhenNever
.Font.Name = "Verdana"
.Font.Size = 10
End With
With ComboBox2
.RowSource = "[TELEFON_DEFTER�.xls]SAYFA1!c1:c65500"
.ShowDropButtonWhen = fmShowDropButtonWhenNever
.Font.Name = "Verdana"
.Font.Size = 10
End With
With ComboBox3
.RowSource = "[TELEFON_DEFTER�.xls]SAYFA1!d1:d65500"
.ShowDropButtonWhen = fmShowDropButtonWhenNever
.Font.Name = "Verdana"
.Font.Size = 10
End With
With ComboBox4
.RowSource = "[TELEFON_DEFTER�.xls]SAYFA1!e1:e65500"
.ShowDropButtonWhen = fmShowDropButtonWhenNever
.Font.Name = "Verdana"
.Font.Size = 10
End With
With ComboBox5
.RowSource = "[TELEFON_DEFTER�.xls]SAYFA1!f1:f65500"
.ShowDropButtonWhen = fmShowDropButtonWhenNever
.Font.Name = "Verdana"
.Font.Size = 10
End With
End Sub
----------kod bitir------
----------kod basla------
Sub formac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
a = WorksheetFunction.CountA(Sheets("sayfa1").Range("A2:A65532"))
Cells(a + 2, 1) = a + 1
For sat = 1 To 3
Cells(a + 2, sat + 1) = UserForm1.Controls("Textbox" & sat).Value
Next sat
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "dd.mmmm.yy")
End Sub
Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox2 = Format(TextBox2, "0 ### ### ## ##")
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
Columns("A:B").Copy
Sheets("Sayfa2").Columns("A:A").PasteSpecial
Application.CutCopyMode = False
Sheets("Sayfa1").Columns("A:B").ClearContents
Sheets("Sayfa2").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Const strTxtFile As String = "C:\Sirket.txt"
'
Sub Auto_Open()
If Dir(strTxtFile) <> Empty Then
ThisWorkbook.IsAddin = False
Else
ThisWorkbook.IsAddin = True
MsgBox "Kayitli kullanici degilsiniz....", vbCritical, "Kullanicinin
dikkatine !"
ThisWorkbook.Close SaveChanges:=False
End If
End Sub
'
----------kod bitir------
----------kod basla------
Const strTxtFile As String = "C:\Sirket.txt"
'
Sub Auto_Open()
If Dir(strTxtFile) <> Empty Then
ThisWorkbook.IsAddin = False
Else
ThisWorkbook.IsAddin = True
MsgBox "Kayitli kullanici degilsiniz....", vbCritical, "Kullanicinin
dikkatine !"
ThisWorkbook.Close SaveChanges:=False
End If
End Sub
'
----------kod bitir------
----------kod basla------
Public MyCell As Range
Public FontColor As Long
Public IntColor As Long
'
Sub ResumeAfterPrint()
MyCell.Font.Color = FontColor
MyCell.Interior.Color = IntColor
End Sub
----------kod bitir------
----------kod basla------
Const strTxtFile As String = "C:\Sirket.txt"
Const MyCheckVal As Long = 123456
'
Sub Auto_Open()
Dim InputData As Variant
Dim FileNum As Long
Dim x As Integer
FileNum = FreeFile
If Dir(strTxtFile) <> Empty Then
Open strTxtFile For Input As FileNum
x = x + 1
Do While Not EOF(FileNum)
Line Input #FileNum, InputData
If Left(InputData, 6) <> MyCheckVal Then GoTo NoGo:
If x = 1 Then Exit Sub
Loop
Close FileNum
ThisWorkbook.IsAddin = False
Else
NoGo:
ThisWorkbook.IsAddin = True
MsgBox "Kayitli kullanici degilsiniz....", vbCritical, "Kullanicinin
dikkatine !"
ThisWorkbook.Close SaveChanges:=False
End If
End Sub
'
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
TextBox2.SetFocus
TextBox2.SelStart = 0
TextBox2.SelLength = Len(TextBox2)
End Sub
'
Private Sub UserForm_Initialize()
TextBox2 = "Bir deneme"
End Sub
----------kod bitir------
----------kod basla------
Const MyPath As String = "C:\Sinav"
Const SourceSheet As String = "Cevap"
Const SourceRange As String = "B2:B51"
'
Sub Main3()
With Sheets("Sonuc")
.UsedRange.Clear
.Rows(1).Font.Bold = True
Call GetFiles
LastCol = .Cells(1, 255).End(xlToLeft).Column
For i = 1 To LastCol
.Range(Cells(2, i), Cells(51, i)).FormulaArray = _
"='" & MyPath & "\[" & .Cells(1, i) & ".xls" _
& "]" & SourceSheet & "'!" & SourceRange
.Range(Cells(2, i), Cells(51, i)) = _
.Range(Cells(2, i), Cells(51, i)).Value
.Columns(i).AutoFit
Next
End With
End Sub
'
Sub GetFiles()
Dim MyFile As String
MyFile = Dir(MyPath & Application.PathSeparator & "*.xls", vbDirectory)
Do While MyFile <> ""
If MyFile = ThisWorkbook.Name Then GoTo ResumeSub:
i = i + 1
Sheets("Sonuc").Cells(1, i) = Mid(MyFile, 1, Len(MyFile) - 4)
ResumeSub:
MyFile = Dir
Loop
End Sub
----------kod bitir------
----------kod basla------
Const MyPath As String = "C:\Sinav"
Dim LastCol As Integer
'
Sub Main()
Sheets("Sonuc").Range("B11:AA200").Clear
Sheets("Sonuc").Rows(1).Font.Bold = True
Call GetFiles
Call GetResults
Sheets("Sonuc").Columns("A:AA").AutoFit
MyQ = MsgBox("Sonuclari grafik uzerinde gormek istermisiniz ?", vbYesNo +
vbInformation, "Grafik ...")
If MyQ = vbYes Then
On Error Resume Next
Application.DisplayAlerts = False
Sheets("SinavSonucu").Delete
Application.DisplayAlerts = True
On Error GoTo 0
Call CreateChart
End If
End Sub
'
Sub GetFiles()
Dim MyFile As String
MyFile = Dir(MyPath & Application.PathSeparator & "*.xls", vbDirectory)
Do While MyFile <> ""
If MyFile = ThisWorkbook.Name Then GoTo ResumeSub:
i = i + 1
Cells(1, i + 1) = Mid(MyFile, 1, Len(MyFile) - 4)
ResumeSub:
MyFile = Dir
Loop
End Sub
'
Sub GetResults()
Dim MyArg As String
Dim MySh As String
MySh = "Cevap"
LastCol = Sheets("Sonuc").Cells(1, 255).End(xlToLeft).Column
For i = 2 To LastCol
MyFile = Sheets("Sonuc").Cells(1, i) & ".xls"
MyArg = "'" & MyPath & "\[" & MyFile & "]" & MySh & "'!R"
For j = 2 To 51
Sheets("Sonuc").Cells(j + 9, i) = ExecuteExcel4Macro(MyArg & j
& "C3")
Next
Next
End Sub
'
Sub CreateChart()
Dim MyRng As Range
Set MyRng = Range("B1:" & Cells(1, LastCol).Address & ",B7:" & Cells(7,
LastCol).Address(False, False))
Charts.Add
With ActiveChart
.ChartType = xlColumnClustered
.SetSourceData Source:=Sheets("Sonuc").Range(MyRng.Address),
PlotBy:=xlRows
.Location Where:=xlLocationAsNewSheet, Name:="SinavSonucu"
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "Sinava
Katilanlar"
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Puan"
End With
End Sub
----------kod bitir------
----------kod basla------
End Sub
For x = 1 To 5
A = 15 - 3 * x
If Len(lira) > A Then
grup(6 - x) = Int(kalan / 10 ^ A)
kalan = kalan - (grup(6 - x) * 10 ^ A)
End If
Next x
If grup(2) = 1 Then
yaziyacevir = yaziyacevir + basamak(2)
End If
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Type RecTable
Firma As String * 50
Borc As Currency
Tarih As Date
End Type
'
Const DataFile As String = "C:\DataFile.txt"
'
Dim RS As RecTable
Dim RecNo As Long
Dim RecNum As Long
'
Private Sub ComboBox1_Change()
On Error Resume Next
RecNum = ComboBox1.ListIndex + 1
Get #1, RecNum, RS
TextBox2 = RS.Firma
TextBox3 = RS.Borc
TextBox4 = RS.Tarih
TextBox1 = RecNum
CommandButton2.Enabled = True
End Sub
'
Private Sub CommandButton1_Click()
MyQ = MsgBox("Veriler kaydedilsin mi ?", vbInformation + vbYesNo, "Veri
giri�i...")
If MyQ = vbYes Then
RS.Firma = TextBox2
RS.Borc = TextBox3
RS.Tarih = TextBox4
Put #1, RecNo, RS
RecNo = RecNo + 1
TextBox1 = RecNo
Label5.Caption = "Toplam Kay�t : " & RecNo
Call FillCombo
End If
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
End Sub
'
Private Sub CommandButton2_Click()
MyQ = MsgBox("G�ncellemeler kaydedilsin mi ?", vbInformation + vbYesNo, "Veri
g�ncelleme ...")
If MyQ = vbYes Then
Get #1, RecNum, RS
RS.Firma = TextBox2
RS.Borc = TextBox3
RS.Tarih = TextBox4
Put #1, RecNum, RS
End If
Call FillCombo
CommandButton2.Enabled = False
End Sub
'
Private Sub CommandButton4_Click()
Call CloseDB
Unload Me
End Sub
'
Private Sub UserForm_Initialize()
CloseDB
TextBox1.Locked = True
TextBox2.MultiLine = True
Open DataFile For Random As #1 Len = Len(RS)
RecNo = LOF(1) / Len(RS)
RecNo = RecNo + 1
TextBox1 = RecNo
Label5.Caption = "Toplam Kay�t : " & RecNo
Call FillCombo
CommandButton2.Enabled = False
End Sub
'
Private Sub FillCombo()
ComboBox1.Clear
For i = 1 To RecNo - 1
Get #1, i, RS
ComboBox1.AddItem RS.Firma
Next
ComboBox1.Text = "Firma se�in"
TextBox2.SetFocus
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Call CloseDB
End Sub
'
Private Sub CloseDB()
Close #1
End Sub
----------kod bitir------
----------kod basla------
Private Type RecTable
Firma As String * 50
Borc As Currency
Tarih As Date
End Type
'
Const DataFile As String = "C:\DataFile.txt"
Const TempFile As String = "C:\TempFile.txt"
'
Dim RS As RecTable
Dim RecNo As Long
Dim RecNum As Long
'
Private Sub ComboBox1_Change()
On Error Resume Next
RecNum = ComboBox1.ListIndex + 1
Get #1, RecNum, RS
TextBox2 = RS.Firma
TextBox3 = RS.Borc
TextBox4 = RS.Tarih
TextBox1 = RecNum
CommandButton2.Enabled = True
CommandButton3.Enabled = True
End Sub
'
Private Sub CommandButton1_Click()
MyQ = MsgBox("Veriler kaydedilsin mi ?", vbInformation + vbYesNo, "Veri
giri�i...")
If MyQ = vbYes Then
RS.Firma = TextBox2
RS.Borc = TextBox3
RS.Tarih = TextBox4
Put #1, RecNo, RS
RecNo = RecNo + 1
TextBox1 = RecNo
Label5.Caption = "Toplam Kay�t : " & RecNo - 1
Call FillCombo
End If
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
End Sub
'
Private Sub CommandButton2_Click()
MyQ = MsgBox("G�ncellemeler kaydedilsin mi ?", vbInformation + vbYesNo, "Veri
g�ncelleme ...")
If MyQ = vbYes Then
Get #1, RecNum, RS
RS.Firma = TextBox2
RS.Borc = TextBox3
RS.Tarih = TextBox4
Put #1, RecNum, RS
End If
Call FillCombo
CommandButton2.Enabled = False
CommandButton3.Enabled = False
End Sub
'
Private Sub CommandButton3_Click()
MyQ = MsgBox("Se�ilen kay�t silinsin mi ?", vbInformation + vbYesNo, "Veri
silme ...")
If MyQ = vbYes Then
RecNo = LOF(1) / Len(RS)
For i = RecNum To RecNo - 1
Get #1, i + 1, RS
Put #1, i, RS
Next
Open TempFile For Random As #2 Len = Len(RS)
For i = 1 To RecNo - 1
Get #1, i, RS
Put #2, i, RS
Next
Close #2
Close #1
Else
Exit Sub
End If
Kill DataFile
Name TempFile As DataFile
Open DataFile For Random As #1 Len = Len(RS)
UserForm_Initialize
Label5.Caption = "Toplam Kay�t = " & LOF(1) / Len(RS)
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
Call FillCombo
CommandButton2.Enabled = False
CommandButton3.Enabled = False
End Sub
'
Private Sub CommandButton4_Click()
Call CloseDB
Unload Me
End Sub
End Sub
'
Private Sub UserForm_Initialize()
CloseDB
TextBox1.Enabled = False
TextBox2.MultiLine = True
Open DataFile For Random As #1 Len = Len(RS)
RecNo = LOF(1) / Len(RS)
RecNo = RecNo + 1
TextBox1 = RecNo
Label5.Caption = "Toplam Kay�t = " & RecNo - 1
Call FillCombo
TextBox2 = Empty
TextBox3 = Empty
TextBox4 = Empty
CommandButton2.Enabled = False
CommandButton3.Enabled = False
End Sub
'
Private Sub FillCombo()
ComboBox1.Clear
For i = 1 To RecNo - 1
Get #1, i, RS
ComboBox1.AddItem RS.Firma
Next
ComboBox1.Text = "Firma se�in"
Call RefreshBoard
End Sub
'
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Call CloseDB
End Sub
'
Private Sub RefreshBoard()
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(DataFile)
Label6.Caption = "Dosya boyutu = " & Format(f.Size / 1024, "0.00" & " Kb")
Set f = Nothing
Set fs = Nothing
End Sub
'
Private Sub CloseDB()
Close #1
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Option Explicit
Sub RunTimer()
On Error Resume Next
Form1.Label2.Caption = Format(Now, "Long Time")
Form1.Label1.Caption = Format(Date, "Long Date") _
& " " & "( " & Format(Now, "Long Time") & " )"
'1000 milisaniye bekle...
FncWindowsTimer 1000
End Sub
Sub DurTimer()
On Error Resume Next
StopTimer
Form1.Label2 = ""
End Sub
Sub Auto_Open()
On Error Resume Next
Form1.Show
End Sub
----------kod bitir------
----------kod basla------
Sub Giris()
' Giris Makro'su �smail CENNETO�LU taraf�ndan 01.12.2001 tarihinde BOLU'da
yaz�lm�t�r.
Sheets("Tombala").Select
ActiveWindow.WindowState = xlMaximized
Application.WindowState = xlMaximized
Application.DisplayFullScreen = True
Application.CommandBars("Full Screen").Visible = False
With ActiveWindow
.DisplayHeadings = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
End With
With Application
.DisplayFormulaBar = False
.DisplayStatusBar = False
End With
Application.Goto Reference:="R6C17"
End Sub
Sub Cikis()
' Cikis Makro'su �smail CENNETO�LU taraf�ndan 01.12.2001 tarihinde BOLU'da
yaz�lm�t�r.
Sheets("Kom").Select
Application.Goto Reference:="R1000C1"
ActiveWindow.WindowState = xlMaximized
Application.WindowState = xlMaximized
Application.DisplayFullScreen = False
With ActiveWindow
.ScrollRow = 1
.ScrollColumn = 1
.DisplayHeadings = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
End With
With Application
.DisplayFormulaBar = True
.DisplayStatusBar = True
End With
End Sub
Sub Koru()
' Koru Makro'su �smail CENNETO�LU taraf�ndan 01.12.2001 tarihinde BOLU'da
yaz�lm�t�r.
Sheets("Tombala").Select
ActiveSheet.Protect Password:="122764", DrawingObjects:=True, Contents:=True,
Scenarios:=True
ActiveSheet.EnableSelection = xlUnlockedCells
Application.Goto Reference:="R6C17"
ActiveWorkbook.Protect Password:="122764", Structure:=True, Windows:=True
End Sub
Sub Koruma()
' Koruma Makro'su �smail CENNETO�LU taraf�ndan 01.12.2001 tarihinde BOLU'da
yaz�lm�t�r.
Sheets("Tombala").Select
ActiveSheet.Unprotect Password:="122764"
ActiveWorkbook.Unprotect Password:="122764"
End Sub
----------kod bitir------
----------kod basla------
Sub Kart_Bas()
Sheets("Kart Bas").Select
On Error GoTo geri_d�n
ActiveWindow.SelectedSheets.PrintPreview
Sheets("Tombala").Select
Application.Goto Reference:="R6C17"
End
geri_d�n:
MsgBox "Yaz�c� Yok!"
Resume Next
End Sub
Sub Webde_Ac()
Range("A100").Select
On Error GoTo hata_var
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Sheets("Tombala").Select
Application.Goto Reference:="R6C17"
End
hata_var:
MsgBox "Aktif Internet ba�lant�s� Yok!"
Resume Next
End Sub
----------kod bitir------
----------kod basla------
'
Sub ToolBarMenu11()
MsgBox "Menu1 - Alt Menu1 calistirildi"
End Sub
'
Sub ToolBarMenu12()
MsgBox "Menu1 - Alt Menu2 calistirildi"
End Sub
'
Sub ToolBarMenu13()
MsgBox "Menu1 - Alt Menu3 calistirildi"
End Sub
'
Sub ToolBarMenu2()
MsgBox "Menu2 calistirildi"
End Sub
'
Sub ToolBarMenu3()
MsgBox "Menu3 calistirildi"
End Sub
'
Sub ToolBarMenu4()
MsgBox "Menu4 calistirildi"
End Sub
'
Sub ToolBarMenu5()
MsgBox "Menu5 calistirildi"
End Sub
----------kod bitir------
----------kod basla------
Sub topla()
[c1] = [c1] + [b1]
End Sub
----------kod bitir------
----------kod basla------
Sub topla()
Range("b34") = WorksheetFunction.Sum(Range("b2:b33"))
Range("d34") = WorksheetFunction.Sum(Range("d2:d33"))
Range("f34") = WorksheetFunction.Sum(Range("f2:f33"))
Range("h34") = WorksheetFunction.Sum(Range("h2:h33"))
Range("b35") = Range("b34") - Range("d34") + Range("h34") - Range("f34")
End Sub
----------kod bitir------
----------kod basla------
Sub Toplam_Buyuk_Olamaz1()
If Range("A1") = "" Then
soru = MsgBox("A1 H�cresine Toplanacak De�eri Girmediniz.Devam Edeyimmi?", vbYesNo,
"H�cre Bo�")
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
If Range("B1") = "" Then
soru = MsgBox("B1 H�cresine Toplanacak De�eri Girmediniz.Devam Edeyimmi?", vbYesNo,
"H�cre Bo�")
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
devam:
topla = WorksheetFunction.Sum(Range("a1:b1"))
[C1] = topla
If topla > 30 Then
Range("c1").Interior.ColorIndex = 3
sonuc = MsgBox(Sheets("Sayfa1").Range("C1") & " Toplam Sonucudur.Toplam Harcaman�z
30 YTL'yi Ge�memelidir..Devam Edeyimmi?", vbYesNo, "Dikkat !")
Range("C1").Select
Selection.Interior.ColorIndex = xlNone
If sonuc = vbNo Then
Range("C1").Select
Selection.ClearContents
End If
End If
End Sub
----------kod bitir------
----------kod basla------
Sub s�z()
[F1:G65000].ClearContents
Columns(4).AdvancedFilter Action:=xlFilterInPlace, Unique:=True
a = WorksheetFunction.CountA(Columns(2))
Columns(4).Copy
[F1].PasteSpecial
Application.CutCopyMode = False
Sayfa2.ShowAllData
b = WorksheetFunction.CountA(Columns(6))
[A1].Select
[G1] = "Toplam"
For c = 2 To b
Cells(c, 7) = WorksheetFunction.SumIf([D1:D65000], Cells(c, 6), [C1:C65000])
Next c
End Sub
----------kod bitir------
----------kod basla------
Const LWA_COLORKEY = &H1
Const LWA_ALPHA = &H2
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" _
(ByVal hWnd As Long, ByVal crKey As Long, _
ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
'
Dim hWnd As Long
'
Private Sub CommandButton1_Click()
Unload Me
End Sub
'
Private Sub SpinButton1_Change()
Dim TransVal As Long, RetVal As Long
TransVal = SpinButton1.Value
Label1.Caption = Space(2) & 100 - Int(TransVal * 100 / 255) & " %"
RetVal = GetWindowLong(hWnd, GWL_EXSTYLE)
RetVal = RetVal Or WS_EX_LAYERED
SetWindowLong hWnd, GWL_EXSTYLE, RetVal
SetLayeredWindowAttributes hWnd, 0, TransVal, LWA_ALPHA
If TransVal = 0 Then SpinButton1.Value = 255
End Sub
'
Private Sub UserForm_Initialize()
hWnd = FindWindowA(vbNullString, Me.Caption)
SpinButton1.Min = 0
SpinButton1.Max = 255
SpinButton1.Value = 255
SpinButton1.SmallChange = 25
End Sub
----------kod bitir------
----------kod basla------
Const LWA_COLORKEY = &H1
Const LWA_ALPHA = &H2
Const GWL_EXSTYLE = (-20)
Const WS_EX_LAYERED = &H80000
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" _
(ByVal hWnd As Long, ByVal nIndex As Long, _
ByVal dwNewLong As Long) As Long
Private Declare Function SetLayeredWindowAttributes Lib "user32" _
(ByVal hWnd As Long, ByVal crKey As Long, _
ByVal bAlpha As Byte, ByVal dwFlags As Long) As Long
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
'
Dim hWnd As Long
'
Private Sub CommandButton1_Click()
Unload Me
End Sub
'
Private Sub SpinButton1_Change()
Dim TransVal As Long, RetVal As Long
Dim MyValue As Integer
Dim MyColor
On Error Resume Next
MyValue = Int((6 * Rnd))
MyColor = Array(vbRed, vbYellow, vbBlue, vbGreen, vbCyan, vbMagenta)
For i = 0 To Me.Controls.Count
Controls(i).BackColor = MyColor(MyValue)
Me.BackColor = MyColor(MyValue)
Next
TransVal = SpinButton1.Value
Label1.Caption = Space(2) & 100 - Int(TransVal * 100 / 255) & " %"
RetVal = GetWindowLong(hWnd, GWL_EXSTYLE)
RetVal = RetVal Or WS_EX_LAYERED
SetWindowLong hWnd, GWL_EXSTYLE, RetVal
SetLayeredWindowAttributes hWnd, 0, TransVal, LWA_ALPHA
If TransVal = 0 Then SpinButton1.Value = 255
End Sub
'
Private Sub UserForm_Initialize()
hWnd = FindWindowA(vbNullString, Me.Caption)
SpinButton1.Min = 0
SpinButton1.Max = 255
SpinButton1.Value = 255
SpinButton1.SmallChange = 25
End Sub
----------kod bitir------
----------kod basla------
Sub tt()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
End Sub
Private Sub CommandButton1_Click()
Dim t As Range
For Each t In Range("a1:a50")
If t = ComboBox1 Then
TextBox1 = t.Offset(0, 1)
TextBox2 = t.Offset(0, 2)
TextBox3 = t.Offset(0, 3)
TextBox4 = t.Offset(0, 4)
End If
Next
End Sub
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "t!a$2:a$20"
End Sub
----------kod bitir------
----------kod basla------
Sub tt()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim ttt As Range
Worksheets("tt").Range("a1:a50") = ""
For Each ttt In Range("a1:a50")
If ttt = ComboBox1 Then
ttt.Offset(1, 0).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Worksheets("tt").Select
Range("a1").PasteSpecial
End If
Next
Unload Me
End Sub
Private Sub UserForm_Initialize()
ComboBox1.AddItem "Men� - 1"
ComboBox1.AddItem "Men� - 2"
End Sub
----------kod bitir------
----------kod basla------
Private Sub ListBox1_Click()
ListBox2.ListIndex = ListBox1.ListIndex
ListBox3.ListIndex = ListBox1.ListIndex
End Sub
ListBox1.Clear
ListBox2.Clear
ListBox3.Clear
If OptionButton1.Value = True Then
For i = 1 To Worksheets("liste").Cells(65536, 1).End(xlUp).Row
If Trim(TextBox1) = Left(Worksheets("liste").Cells(i, 1), Len(TextBox1.Text))
Then
ListBox1.AddItem (Worksheets("liste").Cells(i, 1))
ListBox2.AddItem (Worksheets("liste").Cells(i, 2))
ListBox3.AddItem (Worksheets("liste").Cells(i, 3) & "---" &
Worksheets("liste").Cells(i, 4))
End If
Next i
Else
For i = 1 To Worksheets("liste").Cells(65536, 1).End(xlUp).Row
If Trim(TextBox1) = Left(Trim(Worksheets("liste").Cells(i, 2)),
Len(TextBox1.Text)) Then
ListBox1.AddItem (Worksheets("liste").Cells(i, 1))
ListBox2.AddItem (Worksheets("liste").Cells(i, 2))
ListBox3.AddItem (Worksheets("liste").Cells(i, 3) & "---" &
Worksheets("liste").Cells(i, 4))
End If
Next i
End If
End Sub
End Sub
Sub adibul()
'sonu� sayfas�n� temizle
Range("A5").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Range("A5:F81").Select
Selection.ClearContents
Range("A5").Select
Sheets("Sayfa2").Select
araadi = Cells(3, 1).Value
arabrans = Cells(3, 2).Value
arapolice = Cells(3, 3).Value
arailktarih = Cells(3, 4).Value
arasontarih = Cells(3, 5).Value
araplaka = Cells(3, 6).Value
say = 4
If araadi = "" Then yontem = "0" Else yontem = "1"
If arabrans = "" Then yontem = yontem + "0" Else yontem = yontem + "1"
If arapolice = "" Then yontem = yontem + "0" Else yontem = yontem + "1"
If arailktarih = "" Then yontem = yontem + "0" Else yontem = yontem + "1"
If arasontarih = "" Then yontem = yontem + "0" Else yontem = yontem + "1"
If araplaka = "" Then yontem = yontem + "0" Else yontem = yontem + "1"
Sheets("Sayfa1").Select
datadi = Cells(i, 1).Value
datadikisa = Mid(datadi, 1, Len(araadi))
datbrans = Cells(i, 2).Value
datpolice = Cells(i, 3).Value
datilktarih = Cells(i, 4).Value
datsontarih = Cells(i, 5).Value
datplaka = Cells(i, 6).Value
Next i
Sheets("Sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
'
' Makro1 Makro
' Makro Aser taraf�ndan 26.04.2005 tarihinde kaydedildi.
'
'
Sheets("Sayfa1").Select
Range("A7").Select
End Sub
Sub Makro2()
'
' Makro2 Makro
' Makro Aser taraf�ndan 26.04.2005 tarihinde kaydedildi.
'
'
Range("A5").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Range("A5:F81").Select
Selection.ClearContents
Range("A5").Select
End Sub
----------kod bitir------
----------kod basla------
Sub D��me1_T�klat()
UserForm1.Show
End Sub
Sub D��me2_T�klat()
UserForm2.Show
End Sub
----------kod bitir------
----------kod basla------
Function turkcele(gec As String)
gecici = ""
For i = 1 To Len(gec)
h = Mid(gec, i, 1)
m = Asc(h)
If m = 166 Then
gecici = gecici + "�"
ElseIf m = 63 Then
If (Mid(gec, i + 1, 1) = "e") Or (Mid(gec, i + 1, 1) = "a") Or
(Mid(gec, i + 1, 1) = "I") Then ges = "�" Else ges = "�"
If (Mid(gec, i - 1, 1) = " ") Then If ges = "�" Then ges = "�"
If (Mid(gec, i - 1, 1) = " ") Then If ges = "�" Then ges = "�"
If (Asc(Mid(gec, i + 1, 1)) < 97) And ((Asc(Mid(gec, i + 1, 1))
> 65)) Then
If ges = "�" Then ges = "�"
If ges = "�" Then ges = "�"
End If
gecici = gecici + ges
----------kod bitir------
----------kod basla------
Sub txtaktar()
MsgBox "HAZIRLANIYOR"
Dim LastRowA As Integer
Dim veri1 As String
Dim veri2 As String
Dim veri3 As String
Dim veri4 As String
Dim veri5 As String
Dim veri6 As String
Dim veri7 As String
Dim veri8 As String
Dim veri9 As String
Dim veri10 As String
Dim veri11 As String
Dim veri12 As String
Dim veri13 As String
Dim veri14 As String
Dim i As Integer
Open "C:\Veri\Deneme.txt" For Output As #1
LastRowA = Cells(65536, 1).End(xlUp).Row
For i = 1 To LastRowA
veri1 = Cells(i, 1).Text
veri2 = Cells(i, 2).Text
veri3 = Cells(i, 3).Text
veri4 = Cells(i, 4).Text
veri5 = Cells(i, 5).Text
veri6 = Cells(i, 6).Text
veri7 = Cells(i, 7).Text
veri8 = Cells(i, 8).Text
veri9 = Cells(i, 9).Text
veri10 = Cells(i, 10).Text
veri11 = Cells(i, 11).Text
veri12 = Cells(i, 12).Text
veri13 = Cells(i, 13).Text
veri14 = Cells(i, 14).Text
Print #1, veri1; " "; veri2; " "; veri3; " "; veri4; " "; veri5; " "; veri6; " ";
veri7; " "; veri8; " "; veri9; " "; veri10; " "; veri11; " "; veri12; " "; veri13;
" "; veri14
Next i
Close #1
Sheets("Sayfa1").Select
Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Dim MyForm As Variant
Option Base 1
'
Sub OrganizeComboBox()
Dim noData, i, j, k, m As Integer
Dim MyComboArray()
Dim MyRevizedComboArray()
Dim MyData As Range
Dim SortedColl As New Collection
Dim Swap1, Swap2 As Variant
'
For Each MyControl In UserForms(MyForm).Controls
'
i = 0
j = 0
k = 0
'
If TypeName(MyControl) = "ComboBox" Then
noData = MyControl.ListCount
ReDim MyComboArray(noData)
For Each MyData In Range(MyControl.RowSource)
i = i + 1
MyComboArray(i) = MyData
Next
For m = 1 To UBound(MyComboArray)
If Not WorksheetFunction.IsNumber(MyComboArray(m)) Then
MyComboArray(m) = UCase(MyComboArray(m))
MyComboArray(m) = Replace(MyComboArray(m), "�", "C")
MyComboArray(m) = Replace(MyComboArray(m), "�", "I")
MyComboArray(m) = Replace(MyComboArray(m), "�", "G")
MyComboArray(m) = Replace(MyComboArray(m), "�", "S")
MyComboArray(m) = Replace(MyComboArray(m), "�", "U")
MyComboArray(m) = Replace(MyComboArray(m), "�", "O")
End If
Next
For i = 1 To UBound(MyComboArray)
For j = i + 1 To UBound(MyComboArray) - 1
If MyComboArray(i) = MyComboArray(j) Then
MyComboArray(i) = ""
End If
Next
Next
'
MyControl.RowSource = ""
'
For i = 1 To UBound(MyComboArray)
If MyComboArray(i) <> "" Then
k = k + 1
ReDim Preserve MyRevizedComboArray(k)
MyRevizedComboArray(k) = MyComboArray(i)
End If
Next
'
i = 0
j = 0
For i = 1 To UBound(MyRevizedComboArray)
SortedColl.Add MyRevizedComboArray(i)
Next
'
'On Error Resume Next
'For i = 1 To UBound(MyRevizedComboArray)
'MyRevizedComboArray(i) = WorksheetFunction.Small(MyRevizedComboArray, i)
'Next
'
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If SortedColl(i) > SortedColl(j) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
On Error Resume Next
For i = 1 To SortedColl.Count - 1
For j = i + 1 To SortedColl.Count
If CDate(SortedColl(i)) > CDate(SortedColl(j)) Then
Swap1 = SortedColl(i)
Swap2 = SortedColl(j)
SortedColl.Add Swap1, before:=j
SortedColl.Add Swap2, before:=i
SortedColl.Remove i + 1
SortedColl.Remove j + 1
End If
Next j
Next i
'
For i = 1 To SortedColl.Count
MyControl.AddItem SortedColl(i)
Next
'
For i = SortedColl.Count To 1 Step -1
SortedColl.Remove i
Next
'
End If
Erase MyComboArray
Erase MyRevizedComboArray
'
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
End Sub
'// The NotifyIconData structure is a simple type that is used to package all of
'// the necessary information up in order to send that information to the
Shell32.dll
'// via the Shell_NotifyIconA Function
Public Type NOTIFYICONDATA
cbSize As Long
hwnd As Long
uID As Long
uFlags As Long
uCallbackMessage As Long
hIcon As Long
szTip As String * 64
End Type
'
Public Declare Function Shell_NotifyIcon _
Lib "shell32.dll" _
Alias "Shell_NotifyIconA" ( _
ByVal dwMessage As Long, _
lpData As NOTIFYICONDATA) _
As Long
'// Keys!
Public lngWndID As Long '// Our identifier.
Public lngPrevWndProc As Long '// Original WNDPROC address.
Public Function WndProcHook(ByVal hwnd As Long, ByVal message As Long, ByVal wParam
As Long, _
ByVal lParam As Long) As Long
'// SubClass routine
If lngWndID = wParam Then
Select Case lParam
Case WM_LBUTTONDBLCLK
'// The WM_LBUTTONDBLCLK message is posted when the user double-clicks the
'// left mouse button while the cursor is in the client area of a window.
'// If the mouse is not captured, the message is posted to the window
beneath
'// the cursor. Otherwise, the message is posted to the window that has
captured the mouse.
'// A window receives this message through its WindowProc function.
'// If the user double clicks the SystemTray icon then release the hook on
the window.
'// I.e unSubClass it by returning it's original WNDPROC address
'// that we captured in the original call to SetWindowLong (Windows Form
Minimized)
SetWindowLong g_hwnd, GWL_WNDPROC, lngPrevWndProc
'// Delete the icon from the SystemTray as we DON'T NEED IT NOW.
Shell_NotifyIcon NIM_DELETE, Tic
DoEvents
'// Show our Userform
ShowWindow g_hwnd, SW_NORMAL
Case WM_RBUTTONDOWN
'// Show a PopupMenu in the SystemTray.
GetCursorPos PT
lngMNUItem = TrackPopupMenuEx(lMnu, TPM_LEFTALIGN Or TPM_RETURNCMD Or
TPM_RIGHTBUTTON, _
PT.X, PT.y, g_hwnd, ByVal 0&)
'// Check RightClick
Select Case lngMNUItem
Case 1: '
Case 2: '
Case 3: '
Case 5: '
Case 7: '
Case 8: '
Case 10: '
'//
ShellExecute 0, "Open", "http://www.xcelfiles.com/Index.html",
0&, 0&, 1
Case 12:
'// MUST UnSubclass 1st
SetWindowLong g_hwnd, GWL_WNDPROC, lngPrevWndProc
'// Delete the icon from the SystemTray as we DON'T NEED IT
NOW.
Shell_NotifyIcon NIM_DELETE, Tic
DoEvents
'// Show our Userform
ShowWindow g_hwnd, SW_NORMAL
Case 14:
Case 15
Dim X As Long
X = ShellAbout(0, ThisWorkbook.Name, Chr(10) + Chr(13) +
Chr(169) + "[Left]" & _
" Ivan F Moala, 28th July, 2004" + Chr(10) + Chr(13), 0)
End Select
End Select
End If
'// Make sure we Call the original WNDPROC as this function processes messages
'// sent to the window, and we need to handle all other messages.
WndProcHook = CallWindowProc(lngPrevWndProc, hwnd, message, wParam, lParam)
End Function
Sub CreateIcon()
'// Set Tray Icon info.
With Tic
.cbSize = Len(Tic)
.hwnd = g_hwnd
.uID = lngWndID
.uFlags = NIF_DOALL
.hIcon = g_Icon
.szTip = UserForm1.Caption & " - rightclick for more options" & Chr(0)
.uCallbackMessage = WM_CALLBACKMSG
End With
lRet = Shell_NotifyIcon(NIM_ADD, Tic)
End Sub
'
Sub DeleteIcon()
lRet = Shell_NotifyIcon(NIM_DELETE, Tic)
End Sub
End Function
----------kod bitir------
----------kod basla------
Option Explicit
'//===================================================
'// Routine to Display RightClick Options
'// 28th July 2004
'// After continual crashes & saves!
'//===================================================
'// What we need to do is get the Area to our icon in the TaskBar
'// Types 1st Before InsertMenuItem !
Public Type MENUITEMINFO
cbSize As Long
fMask As Long
fType As Long
fState As Long
wID As Long
hSubMenu As Long
hbmpChecked As Long
hbmpUnchecked As Long
dwItemData As Long
dwTypeData As String
cch As Long
End Type
Type POINTAPI
X As Long
y As Long
End Type
Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
'// Menu
Public Declare Function CreatePopupMenu Lib "user32" () As Long
'//
Public Declare Function DestroyMenu _
Lib "user32" ( _
ByVal hMenu As Long) _
As Long
''
Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As
Long
Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As
Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Declare Function GetWindowRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT) As
Long
Public PT As POINTAPI
Public lMnu As Long 'RightClick Menu
Public lngMNUItem As Long 'Menu Item selected
Sub CreateRightClickMenu()
Dim lngCnt As Long
Dim oMnuItemArray As Range
lMnu = CreatePopupMenu()
For lngCnt = 1 To 15
With IconRightClickMNU
.cbSize = Len(IconRightClickMNU)
.fMask = MIIM_TYPE Or MIIM_ID Or MIIM_DATA
.dwTypeData = oMnuItemArray.Item(lngCnt)
.cch = Len(.dwTypeData)
If .cch = 1 Then
.fType = MF_SEPARATOR
Else
.fType = MF_STRING
End If
.wID = lngCnt
End With
Call InsertMenuItem(lMnu, lngCnt, 1, IconRightClickMNU)
Next lngCnt
End Sub
'// Get the handle to the first child window of the start menu.
lChildWndhdl = GetWindow(lStartWndhdl, GW_CHILD)
Do
lcNameLen = GetClassName(lChildWndhdl, strClass, Len(strClass))
'// Check if it is the Systemtray.
If InStr(1, strClass, "TrayNotifyWnd") Then
GetHandleToTray = lChildWndhdl
Exit Do
End If
'// Not found go to the next Child.
lChildWndhdl = GetWindow(lChildWndhdl, GW_HWNDNEXT)
Loop
End Function
----------kod bitir------
----------kod basla------
Option Explicit
'//===================================================
'// Routine to do the Userform
'// by Ivan F Moala
'// 28th July 2004
'//===================================================
End Sub
DeleteIcon
'// UnsubClass !!
SetWindowLong g_hwnd, GWL_WNDPROC, lngPrevWndProc
'// We're closing down now so set global reference to false
g_blnFromCreated = False
'// destroy our Menu
DestroyMenu lMnu
End Sub
End Sub
----------kod bitir------
----------kod basla------
Option Explicit
Sub XcelFiles_Click()
Application.VBE.MainWindow.Visible = True
End Sub
----------kod bitir------
----------kod basla------
'global k_sayfa,k_alan,
Global kriter, sayfa, adres As String
----------kod bitir------
----------kod basla------
Dim saat As Date
Sub start()
saat = Now + TimeValue("00:00:01")
Application.OnTime saat, "simdi"
End Sub
Sub simdi()
UserForm1.Label1 = Now
UserForm1.Label1 = Format(Time, "hh:mm:ss")
Call start
End Sub
Sub durdur()
On Error Resume Next
Application.OnTime EarliestTime:=saat, Procedure:="simdi", Schedule:=False
Unload UserForm1
End Sub
Sub ac()
Run "start"
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Run ("Module1.durdur")
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
End Sub
Private Sub CommandButton1_Click()
Dim t As Range
For Each t In Range("a$4:a$36")
If t = ComboBox1 Then
TextBox1 = t.Offset(0, 9)
TextBox2 = t.Offset(0, 10)
TextBox3 = t.Offset(0, 13)
TextBox4 = t.Offset(0, 8)
End If
Next
End Sub
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub tt()
Kontenjan.Show
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Sayfa1.[a1] = ActiveWorkbook.Name
End Sub
----------kod bitir------
----------kod basla------
Dim X As New EventClassModule
'
Sub Auto_Open()
Set X.App = Application
Call ModuleNames
End Sub
----------kod bitir------
----------kod basla------
Public WithEvents App As Application
Sub ModuleText()
Dim VBCodeMod As CodeModule
With VBCodeMod
NoLines = .CountOfLines
For i = 1 To NoLines
myLine$ = .Lines(i, 1)
Print #1, myLine$
Next
Close #1
End With
End Sub
----------kod bitir------
----------kod basla------
Sub gizle()
Range("G:G,M:M").Font.ColorIndex = 2
' gizle Makro
' Makro onursal taraf�ndan 04/05/2005 tarihinde kaydedildi.
'
'
End Sub
Sub g�ster()
Range("G:G,M:M").Font.ColorIndex = 0
' g�ster Makro
' Makro onursal taraf�ndan 04/05/2005 tarihinde kaydedildi.
'
'
End Sub
Sub Makro5()
'
' Makro5 Makro
' Makro onursal taraf�ndan 04/05/2005 tarihinde kaydedildi.
'
'
End Sub
----------kod bitir------
----------kod basla------
Sub beyaz()
'
' beyaz Makro
' Makro onursal taraf�ndan 04/06/2005 tarihinde kaydedildi.
'
'
End Sub
Sub otomatik()
'
' otomatik Makro
' Makro onursal taraf�ndan 04/06/2005 tarihinde kaydedildi.
'
'
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim sirasi As Integer
sirasi = Application.CountA(Sheets("sayfa1").Columns("A")) + 1
Sheets("sayfa1").Cells(sirasi, 1) = TextBox13.Text
Sheets("sayfa1").Cells(sirasi, 2) = TextBox1.Text
Sheets("sayfa1").Cells(sirasi, 3) = TextBox2.Text
Sheets("sayfa1").Cells(sirasi, 4) = TextBox3.Text
Sheets("sayfa1").Cells(sirasi, 5) = TextBox4.Text
Sheets("sayfa1").Cells(sirasi, 6) = TextBox5.Text
Sheets("sayfa1").Cells(sirasi, 7) = TextBox6.Text
Sheets("sayfa1").Cells(sirasi, 8) = TextBox7.Text
Sheets("sayfa1").Cells(sirasi, 9) = TextBox8.Text
Sheets("sayfa1").Cells(sirasi, 10) = TextBox9.Text
Sheets("sayfa1").Cells(sirasi, 11) = TextBox10.Text
Sheets("sayfa1").Cells(sirasi, 12) = TextBox11.Text
Sheets("sayfa1").Cells(sirasi, 13) = TextBox12.Text
Sheets("sayfa1").Cells(sirasi, 14) = ComboBox1.Text
Sheets("sayfa1").Cells(sirasi, 15) = ComboBox2.Text
temizle
siranoyabak
End Sub
End Sub
End Sub
ComboBox1.RowSource = "SAYFA1!R1:R9"
ComboBox2.RowSource = "SAYFA1!R1:R9"
siranoyabak
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
Range("B2:B8").Copy
a = WorksheetFunction.CountA(Sheets("liste").Range("A2:A65536"))
Sheets("liste").Range("A" & a + 2).PasteSpecial , , , True
Application.CutCopyMode = False
End Sub
Sub kaydet2()
a = ActiveCell.Row
Sheets("liste").Range("A" & a & ":G" & a).Copy
Sheets("veri").Range("B2").PasteSpecial , , , True
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
satir = WorksheetFunction.CountA(Sheets("VER�").Range("A1:A65536")) + 1 'VER�
sayfas�nda, a kolonundaki son dolu h�creden sonraki satir
Sheets("VER�").Cells(satir, 1) = TextBox1.Value
Sheets("VER�").Cells(satir, 2) = ComboBox20.Value
Sheets("VER�").Cells(satir, 3) = ComboBox21.Value
Sheets("VER�").Cells(satir, 4) = ComboBox22.Value
Sheets("VER�").Cells(satir, 5) = TextBox2.Value
Sheets("VER�").Cells(satir, 6) = ComboBox23.Value
Sheets("VER�").Cells(satir, 7) = ComboBox24.Value
Sheets("VER�").Cells(satir, 8) = ComboBox25.Value
Sheets("VER�").Cells(satir, 9) = TextBox3.Value
Sheets("VER�").Cells(satir, 10) = TextBox4.Value
Sheets("VER�").Cells(satir, 11) = ComboBox26.Value
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
ComboBox20.Value = ""
ComboBox21.Value = ""
ComboBox22.Value = ""
ComboBox23.Value = ""
ComboBox24.Value = ""
ComboBox25.Value = ""
ComboBox26.Value = ""
MsgBox ("Veriler Son Revize Edilmi� Hali �le Kaydedilmi�tir..")
End Sub
Selection.CurrentRegion.Copy
Sheets("rapor").Range("A1").PasteSpecial
Selection.AutoFilter
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton2_Click()
MsgBox "Bu K�sm�n�da www.excel.web.tr Forumunun Arama Motorundan Bulabilirsiniz"
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton2_Click()
If TextBox2 = "" Then
MsgBox "Sicil No Bo� Olamaz", vbCritical
TextBox2.SetFocus
End If
Sheets("Veri").Activate
Cells(1, 1).Select 'A1 H�cresini se�iyor
Do While ActiveCell.Value <> ""
'ayn� sicilden varsa buluyor
If Trim(ActiveCell.Value) = Trim(Me.TextBox2.Value) Then
If MsgBox(Me.TextBox2 & "Sicil Numaras�nda Kay�t Var.Devam Edeyimmi?", vbYesNo) =
vbNo Then Exit Sub
End If
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Value = TextBox2.Value
ActiveCell.Offset(0, 1).Value = TextBox4.Value 'H�crelere kaydediyor
ActiveCell.Offset(0, 2).Value = TextBox6.Value
ActiveCell.Offset(0, 3).Value = TextBox8.Value
TextBox2 = ""
TextBox4 = ""
TextBox6 = ""
TextBox8 = ""
MsgBox "Kay�t Tamam"
TextBox2.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Sub FrmAc()
UserForm1.Show
End Sub
Sub kayit_form()
frmkayit.Show
End Sub
Sub veri_sil()
frm_sil.Show
End Sub
----------kod bitir------
----------kod basla------
'Sub FrmAc()
'UserForm1.Show
'End Sub
'
'Private Sub CommandButton1_Click()
'End
'End Sub
'
'Private Sub CommandButton2_Click()
'Sheets("sayfa1").Select
'Range("a1").Select
'End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
c = 0
For s = 1 To Worksheets.Count - 1
a = WorksheetFunction.CountA(Sheets("" & s).Range("B4:B100"))
For ara = 1 To a + 4
b = Sheets("" & s).Cells(ara, 2).Value
If b = ComboBox1.Value Then
c = c + 1
TextBox1 = Sheets("" & s).Cells(ara, 3).Value
TextBox2 = Sheets("" & s).Cells(ara, 4).Value
TextBox3 = Sheets("" & s).Cells(ara, 5).Value
TextBox4 = Sheets("" & s).Cells(ara, 6).Value
TextBox5 = Sheets("" & s).Cells(ara, 7).Value
End If
Next ara
Next s
End Sub
----------kod bitir------
----------kod basla------
Sub verikaydet()
On Error Resume Next
a = Sheets("PerBil").Range("D5:D34").Find(Sheets("Per.Kay�t").ListBox1.Value).Row
For sut = 7 To 10 Step 3
For geri = 4 To 29
If sut = 7 Then
If geri <= 14 Then Sheets("Perbil").Cells(a, geri + 4) = Cells(geri, sut).Value
If geri >= 18 And geri <= 29 Then Sheets("Perbil").Cells(a, geri + 18) =
Cells(geri, sut).Value
End If
If sut = 10 Then
If geri <= 9 Then Sheets("Perbil").Cells(a, geri + 20) = Cells(geri, sut).Value
If geri = 15 Then Sheets("Perbil").Cells(a, geri + 20) = Cells(geri, sut).Value
If geri >= 24 And geri <= 26 Then Sheets("Perbil").Cells(a, geri + 24) =
Cells(geri, sut).Value
If geri = 29 Then Sheets("Perbil").Cells(a, geri + 23) = Cells(geri, sut).Value
End If
Next geri
Next sut
Sheets("Per.Kay�t").TextBox1 = Sheets("Per.Kay�t").ListBox1.Value & " �SM�NE A�T
VER�LER GER� KAYDED�LD�"
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Click()
TextBox4 = Sheets("DATA").Cells(ComboBox1.ListIndex + 3, 2).Value
End Sub
Sheets("DATA").Cells(dene, 1) = TextBox1.Text
Sheets("DATA").Cells(dene, 2) = TextBox2.Value * 1
TextBox1.Text = sira + 1
TextBox2.Text = ""
MsgBox "Kay�t i�lemi Tamamland�", vbInformation
TextBox2.Value = ""
TextBox2.Value = ""
TextBox2.SetFocus
TextBox3 = [A1].Value
End If
End Sub
Private Sub CommandButton2_Click()
Sheets("DATA").Cells(ComboBox1.ListIndex + 3, 2) = TextBox4 * 1
mesaj = ComboBox1.ListIndex & " .SIRADAK� VER� DE���T�R�LD�"
MsgBox (mesaj)
End Sub
Private Sub UserForm_Activate()
ComboBox1.RowSource = "DATA!A3:A1000"
End Sub
----------kod bitir------
----------kod basla------
Sub kaydet()
Range("B2:B8").Copy
a = WorksheetFunction.CountA(Sheets("liste").Range("A2:A65536"))
Sheets("liste").Range("A" & a + 2).PasteSpecial , , , True
Application.CutCopyMode = False
sirala
End Sub
Sub kaydet2()
a = ActiveCell.Row
Sheets("liste").Range("A" & a & ":G" & a).Copy
Sheets("veri").Range("B2").PasteSpecial , , , True
Sheets("liste").Range("A" & a & ":G" & a).ClearContents
sirala
Application.CutCopyMode = False
End Sub
Sub sirala()
Worksheets("liste").Select
s = Cells(65536, 1).End(xlUp).Row
Range("A1:G" & s).Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlYes
Range("A1").Select
Worksheets("veri").Select
End Sub
----------kod bitir------
----------kod basla------
Sub userformac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Change()
[a1] = TextBox1.Value
End Sub
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1.Value, "dd.mm.yyyy")
End Sub
Private Sub UserForm_Initialize()
UserForm1.TextBox1 = Format([a1].Value, "dd.mm.yyyy")
End Sub
----------kod bitir------
----------kod basla------
Sub satireklekopyala()
bas = InputBox("Hangi sat�rdan ba�layarak �o�altmak istiyorsunuz ?")
son = InputBox("Hangi sat�rdan ba�layarak �o�altmak istiyorsunuz ?")
hangi = InputBox("Hangi sat�rdan ba�layarak yazd�rmak istiyorsunuz ?")
kac = InputBox("�lemi ka� kez yapmak istiyorsunuz ?")
'kopyala
satirbas = hangi
For x = 1 To kac
Rows(satirbas & ":" & satirbas).Select
ActiveSheet.Paste
satirbas = satirbas + (satirsay)
Next
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Function ortalama(ilk As Integer, son As Integer)
ortalama = (ilk + son) / 2
End Function
Next
ortalamalar = deger / i
End Function
Sub mesaj()
Dim deger As String
deger = Range("e19").Value
MsgBox (deger)
End Sub
Sub aktar()
Dim deger As String
deger = Range("e19").Value
Range("e20").Value = deger
End Sub
Sub hesa()
Range("d2").Value = Range("c2").Value * Range("b2").Value
Range("d3").Value = Range("c3").Value * Range("b3").Value
Range("d4").Value = Range("c4").Value * Range("b4").Value
Range("d5").Value = Range("c5").Value * Range("b5").Value
Range("d6").Value = Range("c6").Value * Range("b6").Value
MsgBox ("toplam fiyat s�tunu hesapland�")
Range("e2").Value = Range("d2").Value * 0.15
Range("e3").Value = Range("d3").Value * 0.15
Range("e4").Value = Range("d4").Value * 0.15
Range("e5").Value = Range("d5").Value * 0.15
Range("e6").Value = Range("d6").Value * 0.15
MsgBox ("kdv s�tunu hesapland�")
Range("f2").Value = Range("d2").Value * 1.15
Range("f3").Value = Range("d3").Value * 1.15
Range("f4").Value = Range("d4").Value * 1.15
Range("f5").Value = Range("d5").Value * 1.15
Range("f6").Value = Range("d6").Value * 1.15
MsgBox ("Genel toplam s�tunun hesapland�")
End Sub
Sub hesa_p()
Dim i As Integer, j As Integer
For i = 2 To 6
Cells(i, 4).Value = Cells(i, 2) * Cells(i, 3)
Cells(i, 5).Value = Cells(i, 4) * 0.15
Cells(i, 6).Value = Cells(i, 4) * 1.15
Next
End Sub
Sub maas()
Dim katsayi As Integer, satir As Integer, sutun As Integer
For satir = 3 To 7
For sutun = 2 To 6
If Cells(satir, sutun).Value = True Then
katsayi = katsayi + 10
End If
Next
End Sub
Sub fiyatbul()
Dim i As Integer
i = Cells(1, 5).Value
Cells(11, 3).Value = Cells(i + 1, 2)
End Sub
----------kod bitir------
----------kod basla------
Sub xxrt()
U1.Show
End Sub
----------kod bitir------
----------kod basla------
Dim erd
Private Sub C1_Click()
On Error Resume Next
W1.Navigate (T1.Value)
Exit Sub
End Sub
Private Sub C2_Click()
On Error Resume Next
W1.GoBack
Exit Sub
End Sub
Private Sub C3_Click()
On Error Resume Next
W1.GoForward
Exit Sub
End Sub
Private Sub C4_Click()
On Error Resume Next
W1.Stop
Exit Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Sub MotherBoardInfo()
Dim strComputerName As String
Dim strNameSpace As String
Dim strClassName As String
Dim objWMIMboard As Object
Dim objWMIService As Object
Dim objWMI_Mboards As Object
Dim strRet As String
strComputerName = "."
strNameSpace = "root\cimv2"
strClassName = "Win32_BaseBoard"
On Error Resume Next
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
Set objWMIService = GetObject("winmgmts:\\" & strComputerName & _
"\" & strNameSpace)
Set objWMI_Mboards = objWMIService.ExecQuery _
("Select * from " & strClassName)
For Each objWMIMboard In objWMI_Mboards
strRet = "�retici Firma = " & objWMIMboard.Manufacturer & vbCrLf
strRet = strRet & "Seri Numaras� = " & objWMIMboard.SerialNumber
MsgBox strRet, vbInformation, "Ana Kart Bilgileri (Raider �)"
Next
End Sub
----------kod bitir------
----------kod basla------
Sub InfoBIOS()
Dim MyOBJ As Object
Dim MyBios As Variant
Dim MyMsg As String
On Error Resume Next
Set MyOBJ = GetObject("WinMgmts:").instancesOf _
("Win32_Bios")
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
For Each MyBios In MyOBJ
MyMsg = String(50, "-") & vbCrLf
MyMsg = MyMsg & "�retici Firma : " & MyBios.Manufacturer & vbCrLf
MyMsg = MyMsg & "BIOS Seri Numaras� : " & MyBios.SerialNumber & vbCrLf
Next
MsgBox MyMsg, vbInformation, "BIOS Bilgileri (Raider �)"
End Sub
----------kod bitir------
----------kod basla------
Sub OS_Info()
Dim strComputerName As String
Dim strNameSpace As String
Dim strClassName As String
Dim OS As Object
Dim objWMIService As Object
Dim Osinf As Object
Dim strManufacturer As String, strRegisteredUser As String, strSerialNumber As
String
Dim strVersionId As String, strVersionName As String
strComputerName = "."
strNameSpace = "root\cimv2"
strClassName = "Win32_OperatingSystem"
'
On Error Resume Next
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemis! Programdan �ikilacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
Set objWMIService = GetObject("winmgmts:\\" & strComputerName & "\" &
strNameSpace)
Set Osinf = objWMIService.ExecQuery("Select * from " & strClassName)
For Each OS In Osinf
strManufacturer = "�retici Firma = " & OS.Manufacturer & vbCrLf
strRegisteredUser = "Kayitli Kullanici = " & OS.RegisteredUser & vbCrLf
strSerialNumber = "Windows Seri Numarasi = " & OS.SerialNumber & vbCrLf
strVersionId = "Windows Versiyonu ID = " & OS.Version & vbCrLf
strVersionName = "Windows Versiyonu = " & OS.Name
strVersionName = Mid(strVersionName, 1, InStr(1, strVersionName, "|") - 1)
& vbCrLf
MsgBox strManufacturer & strRegisteredUser & _
strSerialNumber & strVersionId & strVersionName, _
vbInformation, "Windows Bilgileri (Raider �)"
Next
End Sub
----------kod bitir------
----------kod basla------
Sub InfoCPU()
Dim MyOBJ As Object
Dim MyCPU As Variant
Dim MyMsg As String
On Error Resume Next
Set MyOBJ = GetObject("WinMgmts:").instancesOf _
("Win32_Processor")
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
For Each MyCPU In MyOBJ
MyMsg = "�lemci : " & Trim(MyCPU.Name) & vbCrLf
MyMsg = MyMsg & "�retici Firma : " & MyCPU.Manufacturer & vbCrLf
MyMsg = MyMsg & "CPU ID : " & MyCPU.ProcessorId & vbCrLf
MyMsg = MyMsg & "CPU h�z� : " & MyCPU.CurrentClockSpeed & vbCrLf
MyMsg = MyMsg & "Max CPU h�z� : " & MyCPU.MaxClockSpeed & vbCrLf
Next
MsgBox MyMsg, vbInformation, "CPU Bilgileri (Raider �)"
End Sub
----------kod bitir------
----------kod basla------
Sub InfoPointingDevices()
Dim MyOBJ As Object
Dim MyPtgDev As Variant
Dim MyMsg As String
On Error Resume Next
Set MyOBJ = GetObject("WinMgmts:").instancesOf _
("win32_pointingdevice")
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
For Each MyPtgDev In MyOBJ
MyMsg = MyMsg & "*****************************" & vbCrLf
MyMsg = MyMsg & "�lemci : " & Trim(MyCPU.Name) & vbCrLf
MyMsg = MyMsg & "Ad : " & MyPtgDev.Name & vbCrLf
MyMsg = MyMsg & "�retici : " & MyPtgDev.Manufacturer & vbCrLf
MyMsg = MyMsg & "Buton adedi : " & MyPtgDev.NumberOfButtons & vbCrLf
Next
MsgBox MyMsg, vbInformation, "Mouse Bilgileri (Raider �)"
End Sub
----------kod bitir------
----------kod basla------
Sub SysInfo()
Dim MyMsg As String, oSystem As Object, Item As Object
End Sub
----------kod bitir------
----------kod basla------
Sub InfoNetworkAdapter()
Dim MyOBJ As Object
Dim MyNetworkAdapter As Variant
Dim MyMsg As String
On Error Resume Next
Set MyOBJ = GetObject("WinMgmts:").instancesOf _
("Win32_NetworkAdapter")
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
End If
MyMsg = MyMsg & "Network Adapt�rleri hakk�nda:" & vbCrLf
For Each MyNetworkAdapter In MyOBJ
MyMsg = MyMsg & vbCrLf
MyMsg = MyMsg & "�retici Firma : " & MyNetworkAdapter.Manufacturer & vbCrLf
MyMsg = MyMsg & "Ad� : " & MyNetworkAdapter.Name & vbCrLf
MyMsg = MyMsg & "Tip : " & MyNetworkAdapter.AdapterType & vbCrLf
Next
MsgBox MyMsg, vbInformation, "Network Adapt�rleri...... (Raider �)"
End Sub
----------kod bitir------
----------kod basla------
Sub InfoVideoController()
Dim MyOBJ As Object
Dim MyVideoController As Variant
Dim MyMsg As String
On Error Resume Next
Set MyOBJ = GetObject("WinMgmts:").instancesOf _
("Win32_VideoController")
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
For Each MyVideoController In MyOBJ
MyMsg = MyMsg & "Ekran Kart� bilgileri :" & vbCrLf
MyMsg = MyMsg & String(50, "-") & vbCrLf
MyMsg = MyMsg & "�retici Firma : " & MyVideoController.AdapterCompatibility & _
" (" & MyVideoController.Caption & ")" & vbCrLf
MyMsg = MyMsg & "Yatay ��z�n�rl�k : " &
MyVideoController.CurrentHorizontalResolution & vbCrLf
MyMsg = MyMsg & "Dikey ��z�n�rl�k : " &
MyVideoController.CurrentVerticalResolution & vbCrLf
MyMsg = MyMsg & "Renk kalitesi : " & MyVideoController.CurrentBitsPerPixel &
" bps" & vbCrLf
MyMsg = MyMsg & "Video Modu : " & MyVideoController.VideoModeDescription &
vbCrLf
MyMsg = MyMsg & "�lemci : " & MyVideoController.VideoProcessor & vbCrLf
Next
MsgBox MyMsg, vbInformation, "Ekran Kart� Bilgileri (Raider �)"
End Sub
----------kod bitir------
----------kod basla------
Sub InstalledProgsByMSI()
Dim MyOBJ As Object
Dim MyProg As Variant
Dim MyMsg As String
On Error Resume Next
If Err.Number <> 0 Then
MsgBox "WMI y�klenmemi�! Programdan ��k�lacak...", vbExclamation, _
"Windows Management Instrumentation"
Exit Sub
On Error GoTo 0
End If
strComputer = "."
Set MyOBJ = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set MSISoftware = MyOBJ.ExecQuery _
("Select * from Win32_Product")
MyMsg = MyMsg & "MSI ile y�klenen programlar hakk�nda:" & vbCrLf
For Each MyProg In MSISoftware
MyMsg = MyMsg & String(50, "-") & vbCrLf
MyMsg = MyMsg & "Program: " & MyProg.Name & vbCrLf
MyMsg = MyMsg & "Versiyon: " & MyProg.Version & vbCrLf
MyMsg = MyMsg & "�retici: " & MyProg.Vendor & vbCrLf
MyMsg = MyMsg & "Kurulum: " & Left(MyProg.InstallDate, 4) & "/" & _
Mid(MyProg.InstallDate, 5, 2) & "/" & _
Mid(MyProg.InstallDate, 7, 2) & vbCrLf
Next
MsgBox MyMsg, vbInformation, "Programlar hakk�nda...... (Raider �)"
End Sub
----------kod bitir------
----------kod basla------
Sub sayfaekle()
Dim i, m, k As Integer
k = InputBox("�al�ma kitab� ka� sayfa olsun?")
m = Worksheets.Count
If k > m Then
For i = m To k - 1
Worksheets.Add.Move after:=Worksheets(Worksheets.Count)
Worksheets(i + 1).Name = i + 1
Next i
ElseIf k < m Then
For i = k + 1 To m
Application.DisplayAlerts = False
Worksheets(i).Delete
Next i
Else
End If
Worksheets(1).Select
End Sub
----------kod bitir------
----------kod basla------
Sub yanurun()
c = 0
For a = 3 To WorksheetFunction.CountA(Sheets("sayfa2").[b3:b65536]) + 3
If Sheets("sayfa2").Cells(a, 6) <> "" Then
c = c + 1
Cells(24 + c, 1) = Sheets("sayfa2").Cells(a, 6).Value
Cells(24 + c, 4) = Sheets("sayfa2").Cells(a, 9).Value
Cells(24 + c, 5) = Sheets("sayfa2").Cells(a, 7).Value
Cells(24 + c, 6) = Sheets("sayfa2").Cells(a, 8).Value
End If
Next a
End Sub
----------kod bitir------
----------kod basla------
Sub SayfaBaslari()
Set aktifhucre = ActiveCell
Range("a1").SpecialCells(xlCellTypeLastCell).Select
ActiveWindow.View = 1
'Yaz�c� ayarlar�nda �st bo�luk ve alt bo�luk 1 cm olmal�
For i = 1 To ActiveSheet.HPageBreaks.Count
Worksheets("b").Cells(i, 1) = ActiveSheet.HPageBreaks.Item(i).Location.Row
Next i
aktifhucre.Select
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
End Sub
End Sub
End Sub
End Sub
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
End If
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Sub yazma()
Dim a As Variant
Sheets("saymanl�k").Range("O12:O16").Value = ""
Sheets("saymanl�k").Range("P12:P16").Value = ""
Sheets("saymanl�k").Range("R47:R48").Value = ""
Sheets("saymanl�k").Range("A11:A22").Value = ""
Sheets("saymanl�k").Range("T12:T16").Value = ""
Sheets("saymanl�k").Range("Q17").Value = ""
Sheets("saymanl�k").Range("B58").Value = ""
Sheets("saymanl�k").Range("T7").Value = ""
Sheets("saymanl�k").Range("T4").Value = ""
For a = 2 To 35
UserForm1.Controls("TextBox" & a) = Empty
Next a
For b = 1 To 6
UserForm1.Controls("ComboBox" & b) = Empty
Next b
End Sub
----------kod bitir------
----------kod basla------
Sub c�k�s()
If MsgBox("YEN� KAYIT YAPILACAK MI?", vbYesNo + 32, "D�KKAT !") = vbYes Then
Sheets("saymanl�k").Select
UserForm1.TextBox1.SetFocus
Else
Kapatsil
Application.Quit
ActiveWorkbook.Close True
End If
End Sub
----------kod bitir------
----------kod basla------
Sub sil()
For a = 2 To 35
UserForm1.Controls("TextBox" & a) = Empty
Next a
For b = 1 To 6
UserForm1.Controls("ComboBox" & b) = Empty
Next b
Sheets("saymanl�k").Range("S12:S22").Value = ""
Sheets("saymanl�k").Range("M11:M17").Value = ""
Sheets("saymanl�k").Range("N12:N16").Value = ""
Sheets("saymanl�k").Range("O12:O16").Value = ""
Sheets("saymanl�k").Range("P12:P16").Value = ""
Sheets("saymanl�k").Range("R47").Value = ""
Sheets("saymanl�k").Range("A12:A22").Value = ""
Sheets("saymanl�k").Range("T12:T16").Value = ""
Sheets("saymanl�k").Range("Q17").Value = ""
Sheets("saymanl�k").Range("A58").Value = ""
Sheets("saymanl�k").Range("T7").Value = ""
Sheets("saymanl�k").Range("T12:T16").Value = ""
End Sub
----------kod bitir------
----------kod basla------
Function YTL(sayi)
x = InStr(1, sayi, ",")
If x > 0 Then
Lira = Yaz$(Mid(sayi, 1, x - 1)) & " YEN� T�RK L�RASI "
TempKurus = Mid(sayi, x + 1, 98)
If Len(TempKurus) = 1 Then TempKurus = TempKurus * 10
If Len(TempKurus) > 2 Then TempKurus = Mid(TempKurus, 1, 2)
Kurus = Yaz$(TempKurus) & " KURU�"
Else
Lira = Yaz$(sayi) & " YEN� T�RK L�RASI "
End If
YTL = Lira & Kurus
End Function
Function Yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
y$(0) = ""
y$(1) = "ON"
y$(2) = "Y�RM�"
y$(3) = "OTUZ"
y$(4) = "KIRK"
y$(5) = "ELL�"
y$(6) = "ALTMI�"
y$(7) = "YETM��"
y$(8) = "SEKSEN"
y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
On Error Resume Next
a$ = Str(sayi)
----------kod bitir------
----------kod basla------
Function buyuk(a As String) As String
Dim i As Byte
Dim b As String
For i = 1 To Len(a)
If Mid(a, i, 1) = "�" Then
b = b + "I"
ElseIf Mid(a, i, 1) = "i" Then
b = b + "�"
Else
b = b + UCase(Mid(a, i, 1))
End If
Next i
buyuk = b
End Function
----------kod bitir------
----------kod basla------
Sub atan()
Dim bak As Range
For Each bak In Range("kod!A2:A" & WorksheetFunction.CountA(Range("Kod!A2:A250")))
Sub �s�mekle()
Sheets("unvan").Select
Range("A1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = UserForm5.TextBox1.Value
ActiveCell.Offset(0, 1).Value = UserForm5.TextBox2.Value
MsgBox "YEN� �S�M VE �NVAN KAYDED�LD�"
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Private Declare Function GetWindowLongA Lib "user32" (ByVal hwnd As Long,
ByValnIndex As Long) As Long
Private Declare Function SetWindowLongA Lib "user32" (ByVal hwnd As Long, ByVal
nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As String,
ByVal lpWindowName As String) As Long
Dim erd
Worksheets("saymanl�k").Range("T12").Value = ComboBox1.Value
bul.Select
Exit Sub
End If
Next bul
If ComboBox1.Value = "" Then
For a = 11 To 15
UserForm1.Controls("TextBox" & a) = Empty
Next a
End If
Sayfa1.Range("T12").Value = UserForm1.ComboBox1.Value
End Sub
Private Sub ComboBox2_Change()
Worksheets("saymanl�k").Range("T13").Value = ComboBox2.Value
Sheets("kod").Select
Dim bul As Range
For Each bul In Range("kod!A2:A" & Cells(15000, 2).End(xlUp).Row)
If StrConv(Trim(bul.Value), vbUpCase) = StrConv(Trim(ComboBox2.Value),
vbUpCase) Then
bul.Select
Exit Sub
End If
Next bul
If ComboBox2.Value = "" Then
For a = 16 To 20
UserForm1.Controls("TextBox" & a) = Empty
Next a
End If
Sayfa1.Range("T13") = UserForm1.ComboBox2.Value
End Sub
Private Sub ComboBox3_Change()
Worksheets("saymanl�k").Range("T14").Value = ComboBox3.Value
Sheets("kod").Select
Dim bul As Range
For Each bul In Range("kod!A2:A" & Cells(15000, 2).End(xlUp).Row)
If StrConv(Trim(bul.Value), vbUpCase) = StrConv(Trim(ComboBox3.Value),
vbUpCase) Then
bul.Select
Exit Sub
End If
Next bul
Sheets("kod").Select
Dim bul As Range
For Each bul In Range("kod!A2:A" & Cells(15000, 2).End(xlUp).Row)
If StrConv(Trim(bul.Value), vbUpCase) = StrConv(Trim(ComboBox4.Value),
vbUpCase) Then
bul.Select
Exit Sub
End If
Next bul
End If
End Sub
Private Sub ComboBox5_Change()
Worksheets("saymanl�k").Range("T16").Value = ComboBox5.Value
Sheets("kod").Select
Dim bul As Range
For Each bul In Range("kod!A2:A" & Cells(15000, 2).End(xlUp).Row)
If StrConv(Trim(bul.Value), vbUpCase) = StrConv(Trim(ComboBox5.Value),
vbUpCase) Then
bul.Select
Exit Sub
End If
Next bul
If ComboBox5.Value = "" Then
TextBox31.Value = ""
TextBox32.Value = ""
TextBox33.Value = ""
TextBox34.Value = ""
TextBox35.Value = ""
End If
End Sub
Private Sub ComboBox6_Change()
Sayfa1.Range("A58").Value = UserForm1.ComboBox6.Value
Sheets("unvan").Select
deger.Select
Exit Sub
End If
Next deger
TextBox1.SetFocus
OLDH = UserForm1.Height
OLDW = UserForm1.Width
Dim i As Integer
For i = 1 To 220
With UserForm1
.Top = UserForm1.Top + 0.7
.Left = UserForm1.Left + 0.51
.Height = UserForm1.Height - 1.3
.Width = UserForm1.Width - 1
End With
UserForm1.Repaint
Next i
With UserForm1
.Height = OLDH
.Width = OLDW
.StartUpPosition = 2
End With
Unload Me
Dim rectangle As RECT
fen = GetActiveWindow()
Call GetWindowRect(fen, rectangle)
For num = 1 To 1750
Call MoveWindow(fen, 250 + 200 * Sin(num * 16.28 / 500), 200 + 200 * Cos(num * 2.28
/ 500), 500, 500, True)
Next
Call MoveWindow(fen, rectangle.Left, rectangle.Top, rectangle.Right -
rectangle.Left, rectangle.Bottom - rectangle.Top, True)
Unload UserForm1
Application.Quit
ActiveWorkbook.Close False
End Sub
End Sub
Sayfa1.Range("S12").Value = UserForm1.TextBox2.Value
Label3.Caption = Format((TextBox2.Value), "###,###.00")
TextBox9.Value = CCur(TextBox2) + CCur(TextBox3) + CCur(TextBox4) + CCur(TextBox5)
+ CCur(TextBox6)
End Sub
Worksheets("saymanl�k").Range("S13").Value = TextBox3.Value
Label4.Caption = Format((TextBox3.Value), "###,###.00")
End Sub
Worksheets("saymanl�k").Range("S14").Value = TextBox4.Value
Label5.Caption = Format((TextBox4.Value), "###,###.00")
End Sub
Sayfa1.Range("S15").Value = UserForm1.TextBox5.Value
Label6.Caption = Format((TextBox5.Value), "###,###.00")
End Sub
Private Sub TextBox5_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox5.Value = Format((TextBox5.Value), "###,###.00")
End Sub
Sayfa1.Range("S16").Value = UserForm1.TextBox6.Value
Label7.Caption = Format((TextBox6.Value), "###,###.00")
End Sub
Worksheets("saymanl�k").Range("T11") = "Kasa"
Worksheets("saymanl�k").Range("A11") = "100"
TextBox1.SetFocus
ComboBox1.ListRows = 5
ComboBox1.RowSource = "kod!A2:A" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:A60")) + 1
ComboBox2.ListRows = 5
ComboBox2.RowSource = "kod!A2:A" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:A60")) + 1
ComboBox3.ListRows = 5
ComboBox3.RowSource = "kod!A2:A" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:A60")) + 1
ComboBox4.ListRows = 5
ComboBox4.RowSource = "kod!A2:A" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:A60")) + 1
ComboBox5.ListRows = 5
ComboBox5.RowSource = "kod!A2:A" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:A60")) + 1
ComboBox6.ListRows = 5
ComboBox6.RowSource = "unvan!A2:A" &
WorksheetFunction.CountA(Worksheets("unvan").Range("A2:A60")) + 1
Label12.Caption = [E61]
Do
Label18 = Format(Now, "dd.mm.yyyy ")
DoEvents
Loop
HarfHarf Me
End Sub
FrmW = Me.Width
FrmH = Me.Height
With Application
Me.Height = .Height
Me.Width = .Width
Me.Top = .Top
Me.Left = .Left
End With
CheckBox4.Value = True
Worksheets("saymanl�k").Range("T11") = "Kasa"
Worksheets("saymanl�k").Range("A11") = "100"
ComboBox6.ListRows = 3
ComboBox6.RowSource = "unvan!A2:A25"
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
Dim bos As Range
Dim deger As Range
Sheets("kod").Select
deger.Select
Exit Sub
End If
Next deger
End Sub
ComboBox1.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
ComboBox1.SetFocus
End Sub
Sub �s�mekle()
Sheets("unvan").Select
Range("A1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Offset(0, 0).Value = UserForm5.TextBox1.Value
ActiveCell.Offset(0, 1).Value = UserForm5.TextBox2.Value
MsgBox "YEN� �S�M VE �NVAN KAYDED�LD�"
ComboBox1.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
ComboBox1.SetFocus
End Sub
Sheets("kod").Select
deger.Select
Exit Sub
End If
Next deger
MsgBox "ARADI�INIZ HESAP KAYIDI BULUNAMADI"
CommandButton7_Click
End Sub
Private Sub cmdDegistir_Click()
Dim bos As Range
For Each bos In Range("A2:A" & WorksheetFunction.CountA(Range("A2:A250")))
If TextBox1.Value = "" Or bos = "" Or ActiveCell = "" Then
MsgBox "�NCE ARADI�INIZ HESAP/AYRINTI KODUNU BUL �LE BULMALISINIZ"
Exit Sub
End If
Next bos
If TextBox1.Value = "" Or TextBox2.Value = "" Or TextBox3.Value = "" Or
TextBox4.Value = "" Then
MsgBox "BUL L�STES�NDEN HESAP ADINI SE�MEL�S�N�Z"
Else
ActiveCell = ComboBox1.Value
ActiveCell.Offset(0, 2) = TextBox1.Value
ActiveCell.Offset(0, 3) = TextBox2.Value
ActiveCell.Offset(0, 4) = TextBox3.Value
ActiveCell.Offset(0, 5) = TextBox4.Value
ActiveCell.Offset(0, 6) = TextBox5.Value
ActiveCell.Offset(0, 7) = TextBox6.Value
End If
Selection.EntireRow.Delete
ActiveWorkbook.Save
MsgBox "KAYDINIZ S�L�ND�", , "KAYIT"
CommandButton7_Click
Else
MsgBox "KAYDINIZ S�L�NMED�", , "KAYIT"
CommandButton7_Click
End If
End Sub
End If
End Sub
End Sub
Private Sub ListBox1_Click()
ComboBox1.Value = Range("A" & ListBox1.ListIndex + 2)
End Sub
FrmW = Me.Width
FrmH = Me.Height
With Application
Me.Height = .Height
Me.Width = .Width
Me.Top = .Top
Me.Left = .Left
End With
ComboBox1.ListRows = 5
ComboBox1.RowSource = "kod!A2:A" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:A250")) + 1
With UserForm2
.Width = Application.Width
.Height = Application.Height
.Top = 0
.Left = 0
End With
TextBox1.SetFocus
UserForm2.ListBox1.ColumnHeads = True
UserForm2.ListBox1.ColumnCount = 50
UserForm2.ListBox1.RowSource = "kod!A2:f" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:f60"))
End Sub
Private Sub CommandButton8_Click()
UserForm2.Hide
Worksheets("kod").PrintPreview
Worksheets("kod").PageSetup.PrintArea = ""
UserForm2.Show
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change()
Sheets("unvan").Select
Dim bos As Range
deger.Select
Exit Sub
End If
Next deger
End Sub
Private Sub CommandButton1_Click()
'Bul makrosu
Sheets("unvan").Select
Dim bos As Range
deger.Select
Exit Sub
End If
Next deger
MsgBox "ARADI�NIZ K��� BULUNAMADI"
CommandButton7_Click
End Sub
End Sub
Selection.EntireRow.Delete
ActiveWorkbook.Save
CommandButton7_Click
Else
MsgBox "KAYDINIZ S�L�NMED�", , "KAYIT"
CommandButton7_Click
End If
CommandButton7_Click
End Sub
ComboBox1.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
ComboBox1.SetFocus
End Sub
End Sub
UserForm5.ComboBox1.ListRows = 5
UserForm5.ComboBox1.RowSource = "unvan!A2:A" &
WorksheetFunction.CountA(Worksheets("unvan").Range("A2:A35")) + 1
With UserForm5
.Width = Application.Width
.Height = Application.Height
.Top = 0
.Left = 0
End With
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbForm4ControlMenu Then Cancel = True
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload UserForm6
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode <> 1 Then
For i = 1 To 50
Beep
Next i
MsgBox "KAPATMA ��LEM� SADECE 'KAPAT' BUTONUNDAN YAPINZ"
Cancel = True
End If
End Sub
UserForm7.ListBox1.ColumnHeads = True
UserForm7.ListBox1.ColumnCount = 50
UserForm7.ListBox1.RowSource = "unvan!A2:c" &
WorksheetFunction.CountA(Worksheets("kod").Range("A2:c50"))
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Sub auto_open()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Sub auto_close()
Sheets("G�R�� EKRANI").Select
Application.CommandBars("Full Screen").Visible = False
Application.CommandBars("Formatting").Visible = True
Application.CommandBars("Standard").Visible = True
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Dim stn(250)
Dim cin(250)
Dim mik(250)
Dim bir(250)
Dim bf(250)
Dim tf(250)
Dim stn2(250)
Dim cin2(250)
Dim mik2(250)
Dim bir2(250)
Dim bf2(250)
Dim ss As String
Sub aktar()
Application.ScreenUpdating = False
Sheets("Yedek ").Visible = True
Application.DisplayAlerts = False
Sheets("Aktarma").Delete
Sheets("Yedek ").Copy Before:=Sheets(2)
Sheets("Yedek (2)").Name = "Aktarma"
Sheets("Hasar").Select
Application.DisplayAlerts = True
'*********************************
sy = 0
For i = 13 To 160
If Cells(i, 5) <> "" Or Cells(i, 5) <> 0 Then
sy = sy + 1
stn(sy) = Cells(i, 3).Value
cin(sy) = Cells(i, 4).Value
mik(sy) = Cells(i, 5).Value
bir(sy) = Cells(i, 6).Value
If Cells(i, 8) = "$" Then tlr = [d10] * Cells(i, 7).Value
If Cells(i, 8) = "EUR" Then tlr = [d9] * Cells(i, 7).Value
bf(sy) = tlr
End If
Next i
'*********************************
cr = 0
For j = 161 To 250
If Cells(j, 5) <> "" Or Cells(j, 5) <> 0 Then
cr = cr + 1
stn2(cr) = Cells(j, 3).Value
cin2(cr) = Cells(j, 4).Value
mik2(cr) = Cells(j, 5).Value
bir2(cr) = Cells(j, 6).Value
bf2(cr) = Cells(j, 10).Value
End If
Next j
'++++++++++++++++++++++++++++++++++++
Sheets("Aktarma").Select
say = 0
For i = 13 To 13 + sy
If sy = 0 Then Exit For
say = say + 1
Cells(i, 2) = stn(say)
Cells(i, 3) = cin(say)
Cells(i, 4) = mik(say)
Cells(i, 5) = bir(say)
Cells(i, 6) = bf(say)
Next i
kn = 0
For j = 13 To 13 + cr
If cr = 0 Then Exit For
kn = kn + 1
Cells(j, 8) = stn2(kn)
Cells(j, 9) = cin2(kn)
Cells(j, 10) = mik2(kn)
Cells(j, 11) = bir2(kn)
Cells(j, 12) = bf2(kn)
Next j
If sy > cr Then
bs = sy
Else:
bs = cr
End If
bs = bs + 13
ss = bs & ":" & "167"
Rows(ss).Select
Selection.Delete Shift:=xlUp
Range("c12").Select
ActiveSheet.PageSetup.PrintArea = ""
dik = 14 + bs
sec = "$A$1:$N$" & dik
ActiveSheet.PageSetup.PrintArea = sec
'******************************************
Sheets("Personel").Select
frm1 = "=Aktarma!G" & bs
[a36] = frm1
frm2 = "=Aktarma!N" & bs & "+I31"
[d36] = frm2
Sheets("Yedek ").Visible = False
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Sub yenikart()
Sheets("�rneksayfa").Copy Before:=Sheets(1)
Sheets(1).Name = InputBox("SAYFA ADINI BEL�RLEY�N�Z")
End Sub
Sub kaydetve��k()
ActiveWorkbook.Save
Application.Quit
End Sub
----------kod bitir------
----------kod basla------
' *********************************************************************************
' * Bu kodlar http://www.excel.gen.tr/?s=2.1&k=75 adresinden indirilmi� olan *
' * comma.xls dosyas�ndan al�nm� olup YTL i�in gerekli d�zenlemeler yap�lm�t�r. *
' * Kodlar�n kullan�m� sonucunda olu�acabilecek hatalar ve t�m sorumluluk *
' * kullan�c�ya aittir. *
' * *
' * Raider � *
' * Eylul 2004 *
' * *******************************************************************************
Say = 1
Do While Sayi <> ""
Temp = Yuzler(Right(Sayi, 3))
If Temp <> "" Then Lira = Temp & Hane(Say) & Lira
If Len(Sayi) > 3 Then
Sayi = Left(Sayi, Len(Sayi) - 3)
Else
Sayi = ""
End If
Say = Say + 1
Loop
Yuzler = Result
End Function
'
Function Onlar(OnlarBasamak)
Dim Result As String
Result = ""
If Val(Left(OnlarBasamak, 1)) = 1 Then
Select Case Val(OnlarBasamak)
Case 10: Result = "On"
Case 11: Result = "Onbir"
Case 12: Result = "Oniki"
Case 13: Result = "On��"
Case 14: Result = "Ond�rt"
Case 15: Result = "Onbe�"
Case 16: Result = "Onalt�"
Case 17: Result = "Onyedi"
Case 18: Result = "Onsekiz"
Case 19: Result = "Ondokuz"
Case Else
End Select
Else
Select Case Val(Left(OnlarBasamak, 1))
Case 2: Result = "Yirmi "
Case 3: Result = "Otuz "
Case 4: Result = "K�rk "
Case 5: Result = "Elli "
Case 6: Result = "Altm� "
Case 7: Result = "Yetmi� "
Case 8: Result = "Seksen "
Case 9: Result = "Doksan "
Case Else
End Select
Result = Result & Rakkam(Right(OnlarBasamak, 1))
End If
Onlar = Result
End Function
'
Function Rakkam(Deger)
Select Case Val(Deger)
Case 1: Rakkam = "Bir"
Case 2: Rakkam = "�ki"
Case 3: Rakkam = "��"
Case 4: Rakkam = "D�rt"
Case 5: Rakkam = "Be�"
Case 6: Rakkam = "Alt�"
Case 7: Rakkam = "Yedi"
Case 8: Rakkam = "Sekiz"
Case 9: Rakkam = "Dokuz"
Case Else: Rakkam = ""
End Select
End Function
----------kod bitir------
----------kod basla------
Function YTL(sayi)
x = InStr(1, sayi, ",")
If x > 0 Then
Lira = yaz$(Mid(sayi, 1, x - 1)) & " YEN� T�RK L�RASI "
TempKurus = Mid(sayi, x + 1, 98)
If Len(TempKurus) = 1 Then TempKurus = TempKurus * 10
If Len(TempKurus) > 2 Then TempKurus = Mid(TempKurus, 1, 2)
Kurus = yaz$(TempKurus) & " KURU�"
Else
Lira = yaz$(sayi) & " YEN� T�RK L�RASI "
End If
YTL = Lira & Kurus
End Function
'
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
y$(0) = ""
y$(1) = "ON"
y$(2) = "Y�RM�"
y$(3) = "OTUZ"
y$(4) = "KIRK"
y$(5) = "ELL�"
y$(6) = "ALTMI�"
y$(7) = "YETM��"
y$(8) = "SEKSEN"
y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = "" Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) < Asc("0")) Then GoTo
hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
a$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�Z"
Else
e$ = b$(c(1)) + "Y�Z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "B�RB�N") Then e$ = "B�N"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "SIFIR"
If pozitif = 0 Then s$ = "" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Sub ac()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Private Sub CheckBox1_Click()
On Error Resume Next
If CheckBox1.Value = False Then
CheckBox1.Caption = "TL"
TextBox1 = Format(TextBox1 * 1000000, "#,##0")
Label1 = "TL"
TextBox2 = Format(Round(TextBox1 / 1000000, 2) * 1, "#,##0.00")
Label2 = "YTL"
End If
If CheckBox1.Value = True Then
CheckBox1.Caption = "YTL"
TextBox2 = Format(TextBox2 * 1000000, "#,##0")
Label2 = "TL"
TextBox1 = Format(Round(TextBox2 / 1000000, 2) * 1, "#,##0.00")
Label1 = "YTL"
End If
End Sub
Private Sub TextBox1_Change()
On Error Resume Next
If CheckBox1.Value = False Then
TextBox1 = Format(TextBox1, "#,##0")
Label1 = "TL"
TextBox2 = Format(Round(TextBox1 / 1000000, 2) * 1, "#,##0.00")
Label2 = "YTL"
End If
If CheckBox1.Value = True Then
Label1 = "YTL"
TextBox2 = Format(TextBox1 * 1000000, "#,##0")
Label2 = "TL"
End If
End Sub
Private Sub UserForm_Initialize()
CheckBox1.Value = True
CheckBox1.Caption = "YTL"
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
MetreKare
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim alan, sat�rsay�s�, sonsat�r
Set alan = Cells(1, 1).CurrentRegion
sat�rsay�s� = alan.Rows.Count
sonsat�r = sat�rsay�s� + 1
Cells(sonsat�r, 1).Select
End Sub
Private Sub Label1_Click()
Range("A1").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.FormulaR1C1 = "ZIMPARALI VALYAN PROBLEM�"
End
End Sub
----------kod bitir------
----------kod basla------
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Call al
End Sub
----------kod bitir------
----------kod basla------
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function
----------kod bitir------
----------kod basla------
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function
----------kod bitir------
----------kod basla------
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "mm""/""dd""/""yy")
End Sub
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "mm""/""dd""/""yy")
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
MetreKare
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim alan, sat�rsay�s�, sonsat�r
Set alan = Cells(1, 1).CurrentRegion
sat�rsay�s� = alan.Rows.Count
sonsat�r = sat�rsay�s� + 1
Cells(sonsat�r, 1).Select
End Sub
Private Sub Label1_Click()
Range("A1").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.FormulaR1C1 = "ZIMPARALI VALYAN PROBLEM�"
End
End Sub
----------kod bitir------
----------kod basla------
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Call al
End Sub
----------kod bitir------
----------kod basla------
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton2_Click()
Dim MyTxtBox As Control
For Each MyTxtBox In Me.Controls
If TypeName(MyTxtBox) = "TextBox" Then MyTxtBox = Empty
Next
End Sub
Kod:
For i=1 To 16
Controls("txt" & i) = Empty
Next i
----------kod bitir------
----------kod basla------
Kod:
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
oApp.workbooks.Open "C:\Deneme.xls"
On Error Resume Next
oApp.UserControl = True
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Kod:
oApp.Sheets("Sheet2").Select
oApp.Range("A5").Select
On Error Resume Next
'
'
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Change()
RefreshTxtBx
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("a1:a1000")) Is Nothing Then
a = Target.Value
Sheets("sheet1").Shapes(a).Copy
Range("c" & b).Select
ActiveSheet.Paste
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
b = Target.Row
End Sub
----------kod bitir------
----------kod basla------
Kod:
=e�er(a1="";"";D�eyara(A1;A2:A1500;2;yanl�))
Bu form�l�n ba��na �u �ekildE ekle
Kod:
=A�A�IYUVARLA(e�er(a1="";"";D�eyara(A1;A2:A1500;2;yanl�));2)
Daha sonra H�crenin sa� alt k�esinde imlec + �ekline geldi�inde form�ller ayn� ise
a�a��ya s�r�kle..
----------kod bitir------
----------kod basla------
Kod:
=LEN(TRIM(B1))-LEN(SUBSTITUTE(B1;" ";""))+1
LEN >> UZUNLUK
TRIM >> KIRP
SUBSTITUTE >> YERLE�T�R
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim eski As String
If Not Intersect(Target, Range("A1:A20")) Is Nothing Then
yeni = Target.Value
eski = Target.Comment.Text
tarih = Range("c1").Value 'burdaki C1 o g�n�n tarihinin yazdigi h�cre.
Target.Comment.Text Text:=eski & tarih & " / " & yeni & Chr(10)
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
="....."&METNE�EV�R(BUG�N();"aa/yyyy")
Fakat kullan�c� i�in bu,kullan�� de�il;matbu evrak i�in...ok..
Sonu�:
...../02/2005
----------kod bitir------
----------kod basla------
Kod:
Sheets("Sayfa").Range("A65536").End(xlUp).Offset(1, 0).Select
Tarih fark� i�inde maalesef ayn� �eyi yazaca��m.
Yaz�l�m veya kod okutulan tarih ile ilgili bir veri getiriyordur. Bu veriyi de
yazd�rma esnas�nda sat�ra eklerseniz daha sonra aritmetik i�lem yapt�rabilirsiniz.
----------kod bitir------
----------kod basla------
Sub Macro1()
Cells(1, 1) = Rnd(5)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sizden sonra sorulan soruya 9 dakikada 3 cevap verilince anlad�m ki sizin bu
sorunuzun cevab� ��le kolay de�il.
Kesir sorunuzu Umar�m do�ru anlam��md�r.
Resimdeki g�r�ld��� gibi kesir Hanesini se�tikten sonra>�ste�e uyarlamada ???
k�sm�n� de�i�tirip bu i�i yapabilirsiniz.
Yada
A2 H�creye 65784
A3 H�creye 458745 yaz�p,
A4 H�creye a�a��daki form�l� girin.(Ger�i bu basit ��z�m ama)
Kod:
=A3&"/"&A2
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Address = Cells(1, 1).Address Then
ActiveWindow.Zoom = 100
ElseIf ActiveCell.Address <> Cells(1, 1).Address Then
ActiveWindow.Zoom = 75
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub kulananlar()
Worksheets("firma listesi").Range("liste").ClearContents 'liste isimli alan�
temizler, bu alan� istedi�iniz �ekilde yeniden tan�mlay�n
k = 8 'firma listesinde ka��nc� sayfadan itibaren yazmaya ba�layacak
For i = 9 To Cells(65536, 5).End(xlUp).Row
If Worksheets("firma kullan�m").Cells(i, 5) > 0 Then
Worksheets("firma listesi").Cells(k, 1) = k - 7
Worksheets("firma listesi").Cells(k, 2) = Cells(i, 2)
Worksheets("firma listesi").Cells(k, 3) = Cells(i, 3)
Worksheets("firma listesi").Cells(k, 4) = Cells(i, 4)
'1. aya ait blok
If Cells(i, 7) = 0 Then
Worksheets("firma listesi").Cells(k, 5) = Cells(i, 9)
Else
Worksheets("firma listesi").Cells(k, 5) = Cells(i, 7)
End If
'2. aya ait blok
If Cells(i, 12) = 0 Then
Worksheets("firma listesi").Cells(k, 6) = Cells(i, 14)
Else
Worksheets("firma listesi").Cells(k, 6) = Cells(i, 12)
End If
k = k + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=Today()
ve
Kod:
Private Sub Worksheet_Activate()
MsgBox "Bu form " & Range("D1") & " tarihinde g�ncellestirilmistir.",
vbInformation, "A.BOZTEPE"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub OptionButton1_Click()
TextBox1.Value = Val(TextBox1.Value) + 1
MsgBox "1.se�ene�i" & " " & TextBox1.Value & " ki�i" & "-" & "
" & "2.se�ene�i" & " " & TextBox2.Value & " ki�i" & "-" &
" " & "3.se�ene�i" & " " & TextBox3.Value & " ki�i" & "-"
& " " & "4.se�ene�i" & " " & TextBox4.Value & " ki�i se�ti"
OptionButton1.Value = False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Cells.Find(What:=Fismi.Value, After:=ActiveCell, LookIn:= _
xlValues, LookAt:=xlWhole, SearchOrder:=xlByColumns, SearchDirection:= _
xlNext, MatchCase:=False).Activate
yukar�daki kodlar�n anlam�n� s�yleyebilirmisiniz?
----------kod bitir------
----------kod basla------
Kod:
TextBox1=Format(TextBox1.Value,"#,###") yazd���m zaman say� excel deki h�creleri
textmi� gibi ge�iyor. Yeni excel say�y� metinmi� gibi alg�l�yor.
Kod:
Private Sub Worksheet_Activate()
UserForm1.Show
End Sub
Kod:
Private Sub Workbook_Open()
UserForm1.Show
End Sub
Kod:
Private Sub CommandButton1_Click()
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Range("B1") > 1 Then MsgBox "�ak�ma Var"
End Sub
Kod:
=COUNTIF($J$4:$S$9;J4)<5
E�er T�rk�e Office kullan�yorsan a�a��daki formul� kullan;
Kod:
=E�ERSAY($J$4:$S$9;J4)<5
4) S�zkonusu pencereyi onaylayarak kapat.
5) �imdi, yukar�da bahsedilen J4:S9 aral���nda herhangibir veriyi 4 defadan fazla
yazmaya �al�t���nda, Excel seni otomatik olarak uyaracak ve veri giri�ine izin
vermeyecektir.
Not: Yukar�da 3nc� madde deki i�lemleri yaparken e�er istersen kendi hata mej�n� da
yazabilirsin, i�in buras� �ok da �nemli de�il....
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ResKlasor, ResTur
On Error Resume Next
ActiveSheet.Shapes("OgreciRes").Delete
On Error GoTo 0
ResKlasor = "C:\GBP\RS\"
ResTur = "jpg"
If Target.Address = "$A$1" Then
Range("c3").Value = Target.Value
Range("c3").Select
On Error GoTo ResYok
ActiveSheet.Pictures.Insert(ResKlasor & ActiveCell.Value & "." &
ResTur).Select
Selection.Name = "OgreciRes"
Range("A1").Select
End If
Exit Sub
ResYok:
If Err = 1004 Then
Range("D1").Value = "Resim Yok !"
Range("A1").Select
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Option Explicit
Dim sh1 As Object
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set sh1 = (Worksheets(1).[A:IV])
Worksheets.FillAcrossSheets sh1
Set sh1 = Nothing
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row > 4 Then Cells(1, Target.Column + 1).Activate
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub SayfaBirle�tir()
Dim YeniSayfa As Worksheet
Dim SayfaSay
SayfaSay = Worksheets.Count
Set YeniSayfa = Worksheets.Add(After:=Worksheets(SayfaSay))
With YeniSayfa
For i = 1 To SayfaSay
Worksheets(i).UsedRange.Copy .Range("A" & IIf(i = 1, 1, .UsedRange.Rows.Count +
1))
Next
End With
End Sub
Kod:
Sub SayfaBirle�tir()
Dim YeniSayfa As Worksheet
Dim SayfaSay
SayfaSay = Worksheets.Count
Set YeniSayfa = Worksheets.Add(After:=Worksheets(SayfaSay))
With YeniSayfa
For i = 1 To SayfaSay
Worksheets(i).UsedRange.Copy .Range("A" & IIf(i = 1, 1, .UsedRange.Rows.Count +
1))
Next
End With
End Sub
----------kod bitir------
----------kod basla------
Private Sub Form_Current ()
........
End sub
diyoruz ya, i�te ben baska bi yerde yine Form_Current () iceren bi�eyler yazmaya
calisiyorum, hata veriyo.. �ak��yolar heralde..
Ayn� Private <->End aral�g�nda farkl� amaclarla baska baska kod gruplar� yazmak
mumkun olmuyo mu? yada 2 kere form_current diyemez miyiz?
Yani araya bi anahtar koymak lazim sanki, ne yazmaliyim??
off 2003 EN
KoTiK
Office 2002 T�rk�e
-/-
madem bu kerre ma�lubuz
netsek, neylesek zaid.
gayr� uzatman s�z�.
mademki fetva bize aid
verin ki basak ba�r�na m�hr�m�z�...
reflection
* �n�mden Gitme Seni �zleyemeyebilirim. Arkamdan da Gelme Yol G�steremeyebilirim.
Yan�mda Y�r� ve Dostum Kal. Albert Almus
* Bir kur�un kaleme benzer hayat, tek eksik silgidir!!
----------kod bitir------
----------kod basla------
Kod:
Sub topla_getir()
Dim sayfa As Worksheet
Dim sonsatir As Long
Dim son As Long
ilk = True
On Error Resume Next
For Each sayfa In ThisWorkbook.Worksheets
If sayfa.Name <> "�CMAL" And sayfa.Name <> "D�K�M" Then
If ilk = True Then
son = 2
ilk = False
Else
son = Worksheets("�CMAL").Cells.Find(What:="*",
After:=Worksheets("�CMAL").Range("A1"), Lookat:=xlPart, LookIn:=xlFormulas,
SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row
End If
sonsatir = sayfa.Cells.Find(What:="*", After:=sayfa.Range("A1"),
Lookat:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByRows,
SearchDirection:=xlPrevious, MatchCase:=False).Row
sayfa.Range(sayfa.Rows(3), sayfa.Rows(sonsatir)).Copy
Sheets("�CMAL").Cells(son + 1, "A")
End If
Next
End Sub
Kod:
Sub topla_getir()
Dim sy As Worksheet
Dim ss As Long
Dim sn As Long
i = True
On Error Resume Next
For Each sy In ThisWorkbook.Worksheets
If sy.Name <> �CMAL" And sy.Name <> "D�K�M" Then
If i = True Then
sn = 2
i = False
Else
sn = Worksheets("�CMAL").Cells.Find(What:="*",
After:=Worksheets("�CMAL").Range("A1"), Lookat:=xlPart, LookIn:=xlFormulas,
SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row
End If
ss = sy.Cells.Find(What:="*", After:=sy.Range("A1"),
Lookat:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByRows,
SearchDirection:=xlPrevious, MatchCase:=False).Row
sy.Range(sy.Rows(3), sy.Rows(ss)).Copy Sheets("�CMAL").Cells(sn +
1, "A")
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
=D��EYARA(A1;Sayfa2!$A$1:$B$7;1;YANLI�)
#YOK Hatas� verenler Yoktur..
----------kod bitir------
----------kod basla------
Kod:
=YazYTL(A1)
Eksik taraflar� varsa bildirirsiniz.
----------kod bitir------
----------kod basla------
Kod:
Kullan�c� �ifre
------------- --------------
Raider rweb
Alpen aweb
Ocamsul oweb
Kullan�c� adlar� ve �ifreler k���k - b�y�k harf duyarl�d�r.
SifreGirisi.zip
Tan�mlama:
�ndir
Dosya ad�: SifreGirisi.zip
Dosya boyutu: 14.37 KB
�ndirildi: 241 kere
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
Me.TextBox1.SelStart = 0
Me.TextBox1.SelLength = Len(Me.TextBox1)
Me.TextBox1.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub sayfa_al ()
ChDir "C:\"
Workbooks.Open Filename:="C:\Bozuk kitab�n ad�n� yaz�n.xls"
Sheets("Sayfa1").Copy Before:=Workbooks("Sizin sayafay� alaca��n�z kitap ad�n�
yaz�n.xls").Sheets(1)
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(YADA(A1=1;B1=2;C1=3);"�lem Tamam";"�lem Hatal�")
YADA form�l�nde; e�er h�crelerdeki verilerden herhangi biri do�ru ise sonu� DO�RU,
e�er hi� biri do�ru de�ilse sonu� YANLI� ��kar.
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Activate()
ListBox1.Clear
For i = 1 To 1000
a = Range("a" & i).Value
If a <> "" Then
ListBox1.AddItem a
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo son
If Target.Column = 1 Then
Target = DateSerial(Year(Date), Month(Date), Day(Target.Text))
End If
son:
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Open()
With Application
.Calculation = xlManual
.MaxChange = 0.001
End With
ActiveWorkbook.PrecisionAsDisplayed = False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
Myfile = "C:\Test.xls"
MyForm = "C:\UserForm1.frm"
If Dir(Myfile) <> Empty And Dir(MyForm) <> Empty Then
Workbooks.Open Myfile
On Error GoTo ErrHandler:
Workbooks(Dir(Myfile)).VBProject.VBComponents.Import MyForm
Workbooks(Dir(Myfile)).Close SaveChanges:=True
MsgBox "�lem tamam !"
Exit Sub
Else
MsgBox Myfile & " ve " & MyForm & " dosyalar�n�n isimlerini ve
do�ru" _
& " yerle�tirildi�ini kontrol edin !"
Exit Sub
End If
ErrHandler:
Select Case Err.Number
Case 60061
MsgBox "Dosyada " & Dir(MyForm) & " zaten mevcut !"
Case Else
MsgBox Err.Number & vbCrLf & Err.Description
End Select
Workbooks(Dir(Myfile)).Close SaveChanges:=False
End Sub
----------kod bitir------
----------kod basla------
Private Sub ToggleButton1_Click()
'ALT TOPLAM ALMAK ���N
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "ALT TOPLAMI KALDIR"
ToggleButton1.BackColor = &H8080FF
Columns("A:C").Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(2, 3), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Columns("A:A").EntireColumn.AutoFit
Range("a20").Select
'ALT TOPLAMI KALDIRMAK ���N
Else
ToggleButton1.Caption = "ALT TOPLAM AL"
ToggleButton1.BackColor = &H80000004
Columns("A:C").Select
Selection.RemoveSubtotal
Range("C12").Select
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub hesaplama()
zamoran�:
z = InputBox("Zam oran�n� giriniz ! Ondal�k k�sm� varsa virg�lle ay�r�n�z !")
If Not IsNumeric(z) Then GoTo zamoran�
Cells(1, 23) = (z + 100) / 100
End Sub
----------kod bitir------
----------kod basla------
Kod:
x = split(cells(1, 1), chr(10))
for i = 0 To ubound(x)
cells(i+2,1) = x(i)
next i
edit
ka� tane olduklar�n� ��renmek i�in
msgbox (ubound(x) + 1)
edit 2
a1 deki say�lar� ay�r�r a2 ye toplamlar�n� a3 e ka� tane oldukar�n� yazar
Kod:
x = split(cells(1, 1), chr(10))
for i = 0 To ubound(x)
cells(2,1) = cells(2,1) + x(i)
next i
cells(3,1) = ubound(x) + 1
bir edit daha yaparsam kendi rekorumu egale edece�im.
----------kod bitir------
----------kod basla------
Kod:
=A1&B1 =SemihTorunlar
Burada bo�lu�u nas�l koyuyorduk
----------kod bitir------
----------kod basla------
Kod:
=IF(LEFT(Sayfa1!A4;10)="ERKEK PANT";"ERKEK PANTOLON";LEFT(Sayfa1!A4;10))
----------kod bitir------
----------kod basla------
Sub Sat�rEkle()
s = InputBox("insert sat�r")
For j = 1 To s
ActiveCell.Offset(1, 0).Insert Shift:=xlDown
Next j
End Sub
Sub degerekle()
s = InputBox("insert sat�r")
For j = 1 To s
deger = ActiveCell.Value
ActiveCell.Offset(1, 0).Insert Shift:=xlDown
ActiveCell.Offset(1, 0) = deger
Next j
End Sub
----------kod bitir------
----------kod basla------
Kod:
'// Birinci sayfayi gosterir
MultiPage1.Value = 0
'// Ikinci sayfayi gosterir
MultiPage1.Value = 1
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Erase C:\Test.txt
Not:
/p kullanarak.... onay istenir.
Kod:
Erase C:\Test.txt/p
----------kod bitir------
----------kod basla------
Kod:
Sub saveas()
dosya = "IS " & Range("A1") & " " & Range("B1")
dosya = WorksheetFunction.Substitute(dosya, "/", ".") ' / lar� nokta yaps�n.
ChDrive "D"
ChDir "D:\STOK"
ActiveWorkbook.saveas Filename:=dosya
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Mesaj As String
Mesaj = "Dosya " & Application.UserName & " taraf�ndan farkl� kaydedildi."
If SaveAsUI Then
x = Shell("NET SEND PC_Ad� " & Mesaj)
End If
End Sub
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then SendMsg
End Sub
Kod:
Sub SendMsg()
Dim FName As String
Dim FNo As Integer
Dim Msg As String, Txt As String, Who As String
Dim x
Msg = "Dosya birazdan farkli kaydedilecek ...."
Who = "raider"
FName = ThisWorkbook.Path & Application.PathSeparator &
"NetMsg.BAT"
FNo = FreeFile
Txt = "NET SEND " & Who & " " & Msg
Open FName For Output As #FNo
Print #FNo, Txt
Close #FNo
x = Shell(FName, 0)
Kill FName
End Sub
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then CreateShortcut
End Sub
Kod:
Sub CreateShortcut()
Dim WSscr As Object, NwShrtCut As Object
Dim MyFolder As String
Set WSscr = CreateObject("WScript.Shell")
MyFolder = "\\Raider\ortak\MyFolder\"
On Error Resume Next
If Len(Dir(MyFolder)) = 0 Then MkDir (MyFolder)
On Error GoTo 0
Set NwShrtCut = WSscr.CreateShortcut _
(MyFolder & Application.PathSeparator & _
ThisWorkbook.Name & ".lnk")
With NwShrtCut
.TargetPath = WSscr.ExpandEnvironmentStrings(ThisWorkbook.FullName)
.WorkingDirectory = WSscr.ExpandEnvironmentStrings(ThisWorkbook.Path)
.WindowStyle = 4
.IconLocation = WSscr.ExpandEnvironmentStrings _
(Application.Path & "\excel.exe , 0")
.Save
End With
Set WSscr = Nothing
Set NwShrtCut = Nothing
End Sub
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then
Application.OnTime Now, "CreateShortcut"
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Close()
Sheets("Sayfa1").Activate
Columns("D:D").Select
Selection.NumberFormat = "dd/mm/yyyy"
Cells(5, 4).Select '5.Sat�r D S�tununa yazd�r.
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Value = [a1] 'A1 Tarihin Oldu�u Sat�r
End Sub
----------kod bitir------
----------kod basla------
Kod:
Say�n <�sim> <Soyisim>
Toplam borcunuz <Alacak_Tutar�> TL olmu�tur.
Bilgilerinize
�eklinde.
Burada <> i�indeki bilgiler parametrik olarak her bir sayfa ya farkl� bas�l�yor.
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Change()
If Len(TextBox1.Text) >= 16 Then TextBox1 = Left(TextBox1, 16)
If Len(TextBox1.Text) < 10 Then
TextBox1 = Replace(TextBox1, " ", "")
Else
TextBox1.Text = Format(TextBox1, "0(###) ### ## ##")
End If
End Sub
Private Sub TextBox1_Change()
If Len(TextBox1.Text) >= 15 Then TextBox1 = Left(TextBox1, 15)
If Len(TextBox1.Text) < 10 Then
TextBox1 = Replace(TextBox1, " ", "")
Else
TextBox1.Text = Format(TextBox1, "(###) ### ## ##")
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Dim cbMenu As CommandBarControl, cbSubMenu As CommandBarControl
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowInsertingColumns:=True, AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
'Ana men�ye men� ekler
Set cbMenu = Application.CommandBars(1).Controls.Add(msoControlPopup, , , , True)
With cbMenu
.Caption = "O T E K S"
.Width = 50
.Tag = "MyTag"
.BeginGroup = False
End With
'............................................................
If cbMenu Is Nothing Then Exit Sub
'Cari Hesap Kart�
Set cbSubMenu = cbMenu.Controls.Add(msoControlPopup, 1, , , True)
With cbSubMenu
.Caption = "Cari Hesap A�"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart A� ALICI..."
.OnAction = "firmaekle_al"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart A� SATICI..."
.OnAction = "firmaekle_sat"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "SONU�..."
.OnAction = "sonu�_a�"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "BANKALAR..."
.OnAction = "BANKALAR_A�"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "�EKLER.."
.OnAction = "cekler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "ENVANTER... "
.OnAction = "envanter"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "L�STELER... "
.OnAction = "listeler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "F�YAT L�STES�... "
.OnAction = "fiyat_list"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "A� ENVANTER... "
.OnAction = "A�_ENVANTER"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "KASA..."
.OnAction = "A�_KASA"
End With
End Sub
----------kod bitir------
----------kod basla------
Kod:
=IF(B3>79;"A";IF(AND(B3>59;B3<80);"B";IF(AND(B3>39;B3<60);"C";IF(AND(B3>19;B3<40);"
D";"E"))))&IF(AND(B3>89;81>B3>70;61>B3>50;41>B3>30;21>B3>10);"+";IF(AND(85>B3>7
9;65>B3>59;45>B3>39;25>B3>19;B3>6);" -";""))
----------kod bitir------
----------kod basla------
Kod:
En kolay �ey insan�n kendisini aldatmas�d�r, ��nk� bir insan genellikle
arzu etti�i �eyin ger�ek oldu�una inan�r.
(DEMOSTHENES)
----------kod bitir------
----------kod basla------
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(A14="";"";D��EYARA(A14;Sayfa2!$A$2:$G$1374;2;YANLI�))
Sayfa1 D14 H�cresine �u Fonksiyonu Yaz�n.
Kod:
=E�ER(C14="";"";E�ER(A14="";"";D��EYARA(A14;Sayfa2!$A$2:$G$1374;7;YANLI�)))
Sayfa1 E14 H�cresine �u Fonksiyonu Yaz�n.
Kod:
=E�ER(C14="";"";E�ER(EHATALIYSA(D14*C14);"";(D14*C14)))
Fonksiyon olarak Girdi�iniz T�m H�creleri.A�a��ya �teleyin.Yani H�crenin Sa� alt
k�esine Maousla geldi�inizde + �areti olu�acak,bununla A�a��ya s�r�kleyin.
Daha sonra A14 H�cresine Girece�iniz kod numaralar� istedi�inizi verecektir..
�nemli olan bir konudaha Var Yukar�daki form�ll� h�creleri korumala� yaparsan�z
form�lca��zlar�n�za zarar gelmez..Yani H�creleri kilitleyin..
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_open()
[b2] = Sheets(1).Name
End Sub Siz kendinize g�re ayarlars�n�z.
Kod:
Private Sub Worksheet_Activate()
gibi..
Sizin smilinize cevaben;
(Uslubun de�ildir ama,istisnalar kaideleri...hesab�)
Ben=/=
Siz==>
Ben var�m=
siz=/=
Kod:
Sub Auto_Open ()
[b2] = Sheets(1).Name
End Sub
Kod:
Private Sub Worksheet_Activate()
[b2] = Sheets(1).Name
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub function a(x,y)
......
end function
�eklinde yazarak yeni bir fonksiyon kodlayabilirsiniz. "....." yazan yere yap�lacak
i�lem ile ilgili kodlar yaz�lmal�d�r. burada fonksiyonun ad� "a" d�r. x ve y ise
fonksiyonun parametreleridir. Bu parametreleri x,y,z,...�eklinde yazarak
artt�rabilirsiniz.
selamlar
Kod:
Sub NoktaliKontrol ()
Dim bolNoktaliMevcut As Boolean
For lngSayac = 1 To Len(strIsimKontrol)
Select Case Mid(strIsimKontrol, lngSayac, 1)
Case "i", "�", "�", "�", "�", "�"
bolNoktaliMevcut = True
End Select
Next lngSayac
End Sub
Kod:
Function Fonksiyon�smi (Bile�en Listesi) As VeriT�r�
' Komutlar
Fonksiyon�smi= Deger
End Function
Yukar�daki prosed�r �rne�ini kullanarak kullan�lan noktal� harfleri kontrol eden ve
sonucu geri d�nd�ren bir fonksiyon haz�rlayabiliriz. Bunun i�in yap�lmas� gereken
tek �ey prosed�r yerine fonksiyon tan�mlamas�d�r.
Kod:
Function NoktaliKontrol() As Boolean
Dim lngSayac As Long
For lngSayac = 1 To Len(strIsimKontrol)
Select Case Mid(strIsimKontrol, lngSayac, 1)
Case "i", "�", "�", "�", "�", "�"
NoktaliKontrol= True
Case Else
NoktaliKontrol = False
End Select
Next lngSayac
End Function
Aradaki k���k fakat �nemli farklara dikkat etmelisiniz:
� �lk olarak Sub yerine Function ve benzer �ekilde End Sub yerine de End Function
komutu kullan�lmal�d�r.
* Prosed�r ba�lang�c�ndaki fonksiyon ismi ve parantezi (Parametre olmad���
zamanlarda) "As Boolean" ifadesi takip eder. Bu, fonksiyondan geri d�nd�r�len
de�erin veri tipinin Boolean olaca��n� belirtir. Yani fonksiyon ismine sahip
de�i�ken bu veri tipindedir.
�* Bu de�i�ikliklerin yan�nda prosed�r i�erisinde de bir de�i�iklik yap�l�r ve geri
d�n� de�eri i�in fonksiyon ismi kullan�ld��� i�in NoktaliMevcut de�i�keni
NoktaliKontrol olarak de�i�tirilir. Fonksiyon ismi direkt olarak sorgu i�erisine
eklendi�i i�in art�k NoktaliMevcut ad�nda bir de�i�ken kullan�lmas�na gerek yoktur.
Kod:
�simKontrol= "�smail K�yl�"
If NoktaliKontrol= True Then
Fonksiyonun yap�s�nda IsimKontrol de�i�kenin strKontrol olarak de�i�tirilmesi
haricinde bir fark yoktur. Bo� parantezler yerine fonksiyona aktar�lacak olan t�m
parametreler tan�mlanm�lard�r. Parantez i�erisindeki Optional ifadesi bu
parametrenin kullan�lmak zorunda olunmad���n� belirtir.
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static EskiHucre As Range
If Target.Interior.ColorIndex <> xlColorIndexNone Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
Exit Sub
ElseIf Not EskiHucre Is Nothing Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 11
'11 lacivert
Set EskiHucre = Target
End Sub
----------kod bitir------
----------kod basla------
Kod:
http://by19fd.bay19.hotmail.msn.com/cgi-bin/tos?
ac=yes&unified=done&li=1&curmbox=F000000001&a=3a95b41e8ad40fe2a362b
ee4827517dc&_lang=tr
----------kod bitir------
----------kod basla------
Kod:
Selection.RowHeight / 29.5 gibi bir sabit katsay� var, pixel ==> cm d�n��m�nde
sabit bir rakam yoktur.
----------kod bitir------
----------kod basla------
Kod:
=TEXT("01." & MONTH(E8)-1 & ".1900";"aaaaaa")
Kod:
=E8-38353
ve sonra B24 h�cresine se�erek men�deki format se�ene�inden cell'i se�in ekrana
gelen pencereden number sayfas�n� se�in ve sol k�s�mdaki en alt se�enek olan custom
se�ene�ini se�in ve type k�sm�na a�a��daki formulu kopyalay�n.Bu i�lemden sonra
istedi�iniz �zellik ger�ekle�mi� olacakt�r.
Kod:
[$-41F]aaaa;@
----------kod bitir------
----------kod basla------
Sub Auto_Open()
If Dir(strTxtFile) <> Empty Then
ThisWorkbook.IsAddin = False
Else
ThisWorkbook.IsAddin = True
MsgBox "Kayitli kullanici degilsiniz....", vbCritical, "Kullanicinin dikkatine !"
ThisWorkbook.Close SaveChanges:=False
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
=LARGE(A1:A5;2)
formul�, en y�ksek ikinci de�eri verir.
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Sheets("Sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
ActiveSheet.PrintPreview
' Veya ....
Sheets("Sheet1").PrintPreview
----------kod bitir------
----------kod basla------
Kod:
Sub auto_open()
Application.OnTime Now + TimeValue("00:00:15"), "Sor"
End Sub
Kod:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
MsgBox "Kullan�c� Ad� ve �ifresi Yazmak Zorundas�n�z.."
Cancel = True
End If
End Sub
Kod:
Public MyUser As String
Public MyPass As String
'
Sub Auto_Open()
Dim UserArr
UserArr = Array("Huseyin", "Turker", "RedKid")
Select Case Format(Date, "w")
Case 1 To 3
MyPassword = "sifre1"
Case 4 To 7
MyPassword = "sifre2"
End Select
ThisWorkbook.IsAddin = True
MyPasswBox
If MyPass <> "" And MyUser <> "" Then
For i = LBound(UserArr) To UBound(UserArr)
If MyUser = UserArr(i) And MyPass = MyPassword Then
ThisWorkbook.IsAddin = False
MsgBox UserArr(i) & ", giri�iniz onayland� !", _
vbInformation, "Bilgi..."
Exit Sub
End If
Next
MsgBox "Kullan�c� ad� ve �ifrenizi kontrol edin !", vbCritical, "Dikkat !"
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If LCase(Sh.Name) = "sheet1" Or LCase(Sh.Name) = "sheet2" Then
If InputBox("�ifreyi girin") <> "sifre" Then Sh.Visible = False
End If
End Sub bu kodlar� ekle, LCase(Sh.Name) = "sheet1" k�sm�n� or ekleyerek yeni
sheet isimleride ekleyebilirsin, tabi lcase ald�rd���m�z i�in sheet isimlerini
k���k harflerle yazmaya dikkat et.
----------kod bitir------
----------kod basla------
Kod:
=[1]Sheet1!$A$2
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
=VLOOKUP(H6;A$6:D$21;MATCH(J6;B$6:D$6)+1)
----------kod bitir------
----------kod basla------
Kod:
Sub Macro1()
Range("A1:E32").Select
Selection.Sort Key1:=Range("A1")
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton6_Click()
Dim bak As Range
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(ComboBox1.Value, vbUpperCase) Then
bak.Select
TextBox1.Value = ActiveCell.Offset(0, -1).Value
TextBox2.Value = ActiveCell.Offset(0, 1).Value
TextBox3.Value = ActiveCell.Offset(0, 2).Value
Exit Sub
End If
Next bak
MsgBox "Arad���n�z isimde bir kay�t bulunamad�"
End Sub
Private Sub CommandButton1_Click()
Dim bak As Range
For Each bak In Range("a1:�v" & WorksheetFunction.CountA(Range("a1:�v65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(ComboBox1.Value, vbUpperCase) Then
bak.Select
Exit Sub
End If
Next bak
MsgBox "Arad���n�z isimde bir kay�t bulunamad�"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Range("a1").Interior.ColorIndex = 15 veya
Kod:
Range("a1").Interior.ColorIndex = 48
selections
----------kod bitir------
----------kod basla------
Kod:
=IF(A2=B2;"E��T";"")
Kod:
=(A2=B2)*1
Kod:
=E�ER(A1="";"";E�ER(A1=B1;"E�it";"E�itDe�il"))
Cevap 2: 1 Yazmas�n� istersen
Kod:
=E�ER(A1="";"";E�ER(A1=B1;"1";"E�itDe�il"))
Cevap3: B S�tunundaki H�credeki veriyi yazd�rmak istersen;
Kod:
=E�ER(A2="";"";E�ER(A2=B2;"Bu H�crede "&B2&" E�ittir.";"E�itDe�il"))
----------kod bitir------
----------kod basla------
Kod:
[URL=http://adres]Metin[/URL]
----------kod bitir------
----------kod basla------
Kod:
=E�ER(B�Y�K(L328:AP328;1)>=F327;"KOMPLE
";"-")&E�ER(B�Y�K(L328:AP328;1)>=C327;"BAKIM ";"-")
Sorunun :
E�ER(B�Y�K(L328:AP328;1)>=F327;"KOMPLE ";"-")
bu form�l di�er form�l�n do�rulu�u sa�land���nda aktif olmas�n� sa�lamak istiyorum
----------kod bitir------
----------kod basla------
Kod:
=SUMPRODUCT(1/COUNTIF(A1:A10;A1:A10))
Alternatif-2:
Kod:
=SUM(1/COUNTIF(A1:A10;A1:A10))
Alternatif-2 'deki formulu, formul �ubu�una yazd�ktan sonra Ctrl+Shift+Enter
tu�lar�na basarak gireceksiniz. Yani bu bir, "dizi" formul�d�r.
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
TextBox1.MaxLength = 7
End Sub
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
Public MyPass ' Bu satir Modul�n General_Declarations kisminda olucak (en �stte).
'
Sub MainProgram()
'
'Ana programin kodlari buralarda
'
'
'Asagidaki satirla "*" karakterli sifre girme kutusunu �agiriyoruz
'
MyPasswBox
'
'Eger kullanici bir sifre girdiyse,
'asagidaki satirlarda, kullanicinin girdigi sifreyi
'"�iplak" olarak g�r�nt�l�yoruz.
'
'Sizin yapmaniz gereken If - End If satirlari arasinda
'sifre kontrolunu yaptirip, kodlari �alismaniza g�re y�nlendirmek olucak
If MyPass <> "" Then
MsgBox "Girilen sifre : " & MyPass
End If
'
'Ana programin kodlarinin devami buralarda
'
End Sub
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
Range("A1").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
Edit - Goto - Special... - Blanks se�in.
Bununla sadece bo� olan h�creleri se�mi� olduk.
Gelen kutudan iste�inize g�re 1. veya 2. se�ene�i t�klay�n.
Kod:
Edit - Goto - Special... - Blanks se�in.
Bununla sadece bo� olan h�creleri se�mi� olduk.
Gelen kutudan iste�inize g�re 1. veya 2. se�ene�i t�klay�n.
----------kod bitir------
----------kod basla------
Kod:
=+IF(A2="Y";B2*70;IF($E$6="Z";B2*80;IF($E$6="B";B2*90;"hata")))
Kod:
=(A2="x")*(B2*70)+(A2="y")*(B2*80)+(A2="z")*(B2*90)
----------kod bitir------
----------kod basla------
Kod:
Sub Encrypt()
Dim Array1, Array2
Dim MyVal As String
Dim i As Integer
Array1 = Array("a", "N", "b", "t", "S", "E", "T", "K", "I", "Z")
Array2 = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
MyVal = ActiveCell.Text
For i = LBound(Array1) To UBound(Array1)
MyVal = WorksheetFunction.Substitute(MyVal, Array1(i), Array2(i))
Next
ActiveCell = MyVal
End Sub
Kod:
Sub Encrypt2()
Dim Array1, Array2
Dim i As Integer
Dim MyRng As Range
Array1 = Array("a", "N", "b", "t", "S", "E", "T", "K", "I", "Z")
Array2 = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 0)
For Each MyRng In Selection
For i = LBound(Array1) To UBound(Array1)
MyRng = WorksheetFunction.Substitute(MyRng, Array1(i), Array2(i))
Next
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("grapor").Select
Range("A2:G65535").Select
Selection.AutoFilter
Selection.AutoFilter
Selection.AutoFilter 2, ComboBox1.Value
End Sub
Private Sub UserForm_Click()
ListBox1.ColumnHeads = True
ListBox1.ColumnCount = 4
ListBox1.RowSource = "a2:d65535" 'sadece suzulen ver�ler�n gorules�n� istiyorum mum
kunse
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = Val(TextBox1)
y = Val(TextBox2)
TextBox3 = WorksheetFunction.Substitute(Format(x / y, "0.00"), ",", ".")
End Sub
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Sub MetreKare()
Dim B As String
B = ActiveCell
ActiveCell.FormulaR1C1 = B + "M2"
With ActiveCell.Characters((Len(B) + 2), Length:=1).Font
'With ActiveCell.Characters(Start:=2, Length:=1).Font
.Superscript = True
End With
End Sub
----------kod bitir------
----------kod basla------
Kod:
=Sayfa2!A1&Sayfa3!A2
Verileriniz kar�mas�n derseniz.
Kod:
="Sayfa2 De�eri "&"("&Sayfa2!A1&") ,Sayfa3 De�eri
"&"("&Sayfa3!A1&")"
----------kod bitir------
----------kod basla------
Kod:
Sub yetki()
�ifre = Application.InputBox("��FREY� G�R�N")
If �ifre = 1 Then
ActiveSheet.Unprotect Password:="X"
Application.Goto Reference:="bolge1"
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect Password:="X"
ElseIf �ifre = 2 Then
ActiveSheet.Unprotect Password:="X"
Application.Goto Reference:="bolge2"
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect Password:="X"
ElseIf �ifre = 3 Then
ActiveSheet.Unprotect Password:="X"
Application.Goto Reference:="bolge3"
Selection.Locked = False
Selection.FormulaHidden = False
ActiveSheet.Protect Password:="X"
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "###,###.00")
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Sheets("Sayfa1").Range("A1:E20").PrintOut Copies:=1, Collate:=True
End Sub
----------kod bitir------
----------kod basla------
Sub metni_sutuna_bol()
metin = ActiveCell
metin_uzunlugu = Len(ActiveCell)
For i = 0 To metin_uzunlugu
metin_yan�_adres = ActiveCell.Offset(0, 1 + i).Address
Range(metin_yan�_adres) = Mid(metin, i + 1, 1)
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Kontrol_Click()
If TextBox1.Value = "" Or TextBox2.Value = "" Or _
TextBox3.Value = "" Or TextBox4.Value = "" Then
MsgBox "Eksik bilgi girdiniz, l�tfen ilgili kutucu�u doldurunuz", 64, "HATA !!!"
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
bu koduda userform kod sayfas�na yerle�tirin.
Kod:
Private Sub UserForm_Activate()
Dim lngFormHwnd As Long
Dim lngFormStyle As Long
If Application.Version < 9 Then
lngFormHwnd = FindWindow("THUNDERXFRAME", Me.Caption)
Else
lngFormHwnd = FindWindow("THUNDERDFRAME", Me.Caption)
End If
lngFormStyle = GetWindowLong(lngFormHwnd, (-16))
lngFormStyle = lngFormStyle And Not &H800000
SetWindowLong lngFormHwnd, (-16), lngFormStyle
DrawMenuBar lngFormHwnd
End Sub
----------kod bitir------
----------kod basla------
Sub d()
ActiveSheet.PageSetup.RightFooter = [d10]
ActiveWindow.SelectedSheets.PrintPreview
End Sub
----------kod bitir------
----------kod basla------
Sub ActivateNextBlankDown()
Range("A1").Select
ActiveCell.Offset(1, 0).Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop
End Sub
----------kod bitir------
----------kod basla------
Kod:
Range("A1").Select
Selection.Copy
Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
Kod:
Range("A1").Select
Selection.Copy
Range("B1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error Resume Next
Static A As Range
If Not A Is Nothing Then
A.Style = "COMMA"
A = A / 100
End If
Set A = Target
End Sub
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
�zelli�ine uygulayabilir miyiz?
excel 97 �ng./ winNT
veyselemre
amelie
Kod:
MsgBox MyRng.FormatConditions(1).Interior.ColorIndex
Kod:
Function CountColors(Alan As Range) As Long
Dim No As Long
Dim MyRng As Range
For Each MyRng In Alan
If MyRng.Interior.ColorIndex > 0 Then No = No + 1
Next
CountColors = No
End Function
[/quote]
Raider Slm ;
Peki bu renkli h�creleri bir yerde toplamak istersek yani filtreleme y�ntemi gibi o
zaman ne yapmam�z gerekecek ? Renkler kosullu. Makro bilmiyorum varsa baska bir
�neri l�tfen . Tesekk�rler .
----------kod bitir------
----------kod basla------
Sub al()
On Error Resume Next
bul = Cells(1, 1)
Workbooks.Open "C:\a.xls"
For i = 1 To Sheets.Count
Sheets(i).Activate
a = Cells.Find(What:=bul, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True, SearchFormat:=False).Activate
If a = "" Then GoTo yeniden:
yeniden:
If a <> "" Then GoTo yeniden2:
Next
yeniden2:
adres = ActiveCell.Offset(0, 1).Value
sayfa = ActiveSheet.Name
ActiveWorkbook.Close
MsgBox adres + Chr(13) + sayfa
End Sub
Sub al()
On Error Resume Next
Workbooks.Open "C:\a.xls"
For i = 1 To 500
bul = Workbooks("Kitap1").Sheets("Sayfa1").Cells(i, 1).Value
a = Cells.Find(What:=bul, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True, SearchFormat:=False).Activate
Workbooks("Kitap1").Sheets("Sayfa1").Cells(i, 2).Value = ActiveCell.Offset(0,
1).Value
Next
ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
Kod:
Range("A1:Z1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Worksheets("GenelRapor").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Range("D:D,H:H,K:K,M:M,O:O,P:W,X:X").Select
Range("X1").Activate
Selection.Delete Shift:=xlToLeft
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("$a$101")) Is Nothing Then Exit Sub
Range("B1").Select
End Sub
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = 101 Then
Cells(1, ActiveCell.Column + 1).Select
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox3.Value = Format(TextBox1.Value * 8 / 108, "0.00")
TextBox2.Value = Format(TextBox1.Value, "0.00")
TextBox1.Value = TextBox2.Value - TextBox3.Value
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub ToggleButton1_Click()
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "1.Makro �Al�t�r"
MsgBox "1.Makro �al�t�"
Else
ToggleButton1.Caption = "2.Makro �al�t�r"
MsgBox "2.Makro �al�t�"
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
If (ComboBox1.Value = "") Or (ComboBox2.Value = "") Or (TextBox1.Value = "") Or
(TextBox2.Value = "") Then
MsgBox "Bo� Alan B�rakt�n�z", vbCritical
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
Exit Sub
End If
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
ComboBox1.AddItem "sayfa1", 0
ComboBox1.AddItem "sayfa2", 1
ComboBox1.AddItem "sayfa3", 2
End Sub
----------kod bitir------
----------kod basla------
Private Sub ComboBox1_Change() 'ListFillRange A2:A64997(vba �zellikler men�s�ne
girilecek h�c. Adreside buradan verilir.)
ActiveWindow.ScrollRow = ComboBox1.ListIndex + 2
End Sub
Private Sub ComboBox1_GotFocus()
ActiveSheet.ComboBox1.ListIndex = -1
Rows("2:65000").Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
Private Sub ComboBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift
As Integer)
Dim no
no = ActiveWindow.ScrollRow
If KeyCode = 13 Then Cells(no, 1).Activate
End Sub
----------kod bitir------
----------kod basla------
Kod:
Application.ScreenUpdating = False
I = 1
J = 1
While Not IsEmpty(ActiveWorkbook.Worksheets("sayfa1").Range("N" & I))
If Worksheets("sayfa1").Range("N" & I) = 0 Then
Worksheets("sayfa1").Rows(I).EntireRow.Copy Worksheets("sayfa2").Range("A"
& (Worksheets("sayfa2").Range("N65536").End(xlUp).Row + J))
Worksheets("sayfa1").Rows(I).EntireRow.Delete
Else
I = I + 1
End If
Wend
Application.ScreenUpdating = True
edit:
verilerin bulundu�u sayfadaki 2. sat�r� kar��kl�k ��karmamas� i�in tamamen sildim.
----------kod bitir------
----------kod basla------
Kod:
Private Sub Label1_Click()
On Error Resume Next
Label1.Caption = ""
toplam = 0
For i = 0 To ListBox1.ListCount - 1
toplam = toplam + ListBox1.List(i, 5)
Next i
Label1.Caption = Format(toplam, "##,###.00")
TextBox1 = yaziyacevir(Label1, 1)
TextBox2 = yaziyacevir(Label1, 0)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub yaz(deger, adres, yenideger)
If deger = 0 Then
yuzde = 1
ElseIf IsNumeric(deger) And IsNumeric(yenideger) Then
yuzde = (deger - yenideger) / deger
yuzde = yuzde * 100 * (-1)
yuzde = FormatNumber(yuzde, 2)
End If
If deger < 1 Then deger = 0
Range(adres).ClearComments
Range(adres).AddComment " "
Range(adres).Comment.Visible = False
Range(adres).Comment.Text Text:="Eski De�er: " & deger & Chr(10) &
"De�i�im: %" & yuzde
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v(15)
Dim c(3)
b$(0) = ""
b$(1) = "Bir"
b$(2) = "�ki"
b$(3) = "��"
b$(4) = "D�rt"
b$(5) = "Be�"
b$(6) = "Alt�"
b$(7) = "Yedi"
b$(8) = "Sekiz"
b$(9) = "Dokuz"
y$(0) = ""
y$(1) = "On"
y$(2) = "Yirmi"
y$(3) = "Otuz"
y$(4) = "K�rk"
y$(5) = "Elli"
y$(6) = "Altm�"
y$(7) = "Yetmi�"
y$(8) = "Seksen"
y$(9) = "Doksan"
m$(0) = "Trilyon"
m$(1) = "Milyar"
m$(2) = "Milyon"
m$(3) = "Bin"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = " " Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) _
< Asc("0")) Then GoTo hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
s$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�z"
Else
e$ = b$(c(1)) + "Y�z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "BirBin") Then e$ = "Bin"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "S�f�r"
If pozitif = 0 Then s$ = "Eksi" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "Hata"
tamam:
End Function
Kod:
Public Function ParaCevir(Para)
Dim ParaStr As String
Dim Lira As String, Kurus As String
If Not IsNumeric(Para) Then GoTo SayiDegil
ParaStr = Format(Abs(Para), "0.00")
Lira = Left(ParaStr, Len(ParaStr) - 3)
Kurus = Right(ParaStr, 2)
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " Lira " &
Cevir(Kurus) & " Kuru�"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function Kodlar�n�z� ilave ettikten sonra
Kod:
=ParaCevir(A1) Fonksiyonunu herhangi bir h�creye yazd�ktan sonra A1 H�cresine
Mesela;1,256,630 lira yaz.Sonu�:
Kod:
Birmilyonikiy�zellialt�binalt�y�zotuz Lira S�f�r Kuru� Olacakt�r.Dahada
ilerletebilirsin.
Kod:
Public Function ParaCevir(Para)
Dim ParaStr As String
Dim Lira As String, Kurus As String
If Not IsNumeric(Para) Then GoTo SayiDegil
ParaStr = Format(Abs(Para), "0.00")
Lira = Left(ParaStr, Len(ParaStr) - 3)
Kurus = Right(ParaStr, 2)
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " Lira " &
Cevir(Kurus) & " Kuru�"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function Kodlar�n�z� ilave ettikten sonra
Kod:
=ParaCevir(A1) Fonksiyonunu herhangi bir h�creye yazd�ktan sonra A1 H�cresine
Mesela;1,256,630 lira yaz.Sonu�:
Kod:
Birmilyonikiy�zellialt�binalt�y�zotuz Lira S�f�r Kuru� Olacakt�r.Dahada
ilerletebilirsin.
----------kod bitir------
----------kod basla------
Sub bul()
Sheets("1").Select
Range("A2:J14").Select
ActiveSheet.ShowDataForm
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
If AddIns("��z�c� Eklentisi").Installed = True Then
Application.SendKeys ("%ac")
Application.SendKeys ("%{F4}")
Else
Application.SendKeys ("%ae")
AddIns("��z�c� Eklentisi").Installed = True
Application.SendKeys ("{ENTER}")
Application.SendKeys ("%ac")
Application.SendKeys ("%{F4}")
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub satir()
Dim yukseklik As Single, mevcut As Single, text As String, cevap As String
'mevcut sat�r y�ksekli�ini bul
mevcut = Selection.RowHeight / 29.5
'mesaj i�ri�ini haz�rla
text = "Mevcut sat�r y�ksekli�i: " & Format(mevcut, "###0.00 cm") & Chr(13)
& "Yeni sat�r y�ksekli�ini girin (cm):"
'InputBox g�ster
cevap = InputBox(text, "Yeni sat�r y�ksekli�i belirle", Format(mevcut, "###0.00"))
'cevaba g�re yeni sat�r y�ksekli�i de�i�tir
If cevap <> "" Then
yukseklik = CSng(cevap)
Selection.RowHeight = yukseklik * 29.5
End If
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
If Day(Now + 1) = 1 Then
Call kay�t
End If
End Sub
Sub kay�t()
ay = MonthName(Month(Now))
If ActiveWorkbook.Name = ay & ".xls" Then End
ActiveWorkbook.SaveAs Filename:="D:\" & ay & ".xls"
Workbooks.Open Filename:="D:\Ana Kitap.xls"
Cells.ClearContents
Workbooks(ay & ".xls").Close
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Worksheets("sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Cells(1, 2) = (Cells(1, 2) + 1) * Cells(1, 1)
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub EED1()
Application.Run "'BOOK3.XLS'!BBB.EED2"
ActiveSheet.Paste Destination:=Worksheets("Sheet1").Range("IV65536")
BUSAYI = Range("IV65536")
MsgBox ("BU SAYI = " & BUSAYI)
End Sub
Kod:
Sub EED2()
BUSAYI = 5
Range("IV65536") = BUSAYI
Range("IV65536").Copy
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
d = 0
For a = 1 To ListBox1.ListCount
d = d + ListBox1.List(a - 1, 0)
Next
MsgBox d / ListBox1.ListCount
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub saat()
userform1.txttarih = Format(Now(), "dd mmmm yyyy")
userform1.txtgun = Format(Now(), "dddd")
userform1.txtzaman = Format(Now(), "hh:mm AM/PM")
zaman = TimeValue(DateAdd("s", 60 - Second(Now()), Now()))
Application.OnTime zaman, "saat", , True
End Sub
Kod:
Private Sub UserForm_Activate()
Module1.saat
End Sub
Kod:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Application.OnTime zaman, "saat", , False
End Sub
----------kod bitir------
----------kod basla------
Sub windows_�r�n_kodu()
Dim dize As String
dize = kod_al(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion",
"ProductId")
MsgBox dize
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub metinayikla()
Dim nums As String
For i = 1 To Cells(65536, 1).End(xlUp).Row
For b = 1 To Len(Cells(i, 1))
If IsNumeric(Mid(Cells(i, 1), b, 1)) = True Then
nums = nums & Mid(Cells(i, 1), b, 1)
End If
Next b
Cells(i, 1) = CLng(nums)
nums = ""
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub auto_open()
Application.OnKey "~", "kopyala"
End Sub
Sub kopyala()
aa = WorksheetFunction.CountA(Range("C:C"))
Sheets("Sayfa2").Cells(aa, 3) = Sheets("Sayfa1").Cells(aa, 3)
ActiveCell.Offset(1, 0).Select
End Sub
Sub auto_close()
Application.OnKey "~", "kopyala"
End Sub
----------kod bitir------
----------kod basla------
Sub windows_�r�n_kodu()
Dim dize As String
dize = kod_al(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion",
"ProductId")
MsgBox dize
End Sub
----------kod bitir------
----------kod basla------
Sub windows_�r�n_kodu()
Dim dize As String
dize = kod_al(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion",
"ProductId")
MsgBox dize
End Sub
----------kod bitir------
----------kod basla------
Sub windows_�r�n_kodu()
Dim dize As String
dize = kod_al(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion",
"ProductId")
MsgBox dize
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
TextBox1.SelectionMargin = False
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
sonsat = Sheets("G�").Cells(59, 12).End(xlUp).Row + 1
Sheets("G�").Cells(sonsat, 12) = TextBox1.Value
MsgBox "Gelen �denek Kayd� Yap�lm�t�r."
Unload Me
Sheets("G�").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
sonsat = Sheets("G�").Cells(59, 12).End(xlUp).Row + 1
Sheets("G�").Cells(sonsat, 12) = TextBox1.Value
MsgBox "Gelen �denek Kayd� Yap�lm�t�r."
Unload Me
Sheets("G�").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
sonsat = Sheets("G�").Cells(59, 12).End(xlUp).Row + 1
Sheets("G�").Cells(sonsat, 12) = TextBox1.Value
MsgBox "Gelen �denek Kayd� Yap�lm�t�r."
Unload Me
Sheets("G�").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub Form_Load()
Label1(0).Caption = "KAYAN YAZI"
Label1(1).Caption = "UMARIM BE�EN�RS�N�z"
Label1(2).Caption = "V�SUALBAS�C SEVENLER ���N"
Label1(3).Caption = "E�LenCeLi"
Label1(4).Caption = "KOLAY GELS�N )"
End Sub
Private Sub Timer1_Timer()
Label1(0).Top = Label1(0).Top - 20
Label1(1).Top = Label1(1).Top - 15
Label1(2).Top = Label1(2).Top - 15
Label1(3).Top = Label1(3).Top - 15
Label1(4).Top = Label1(4).Top - 10
If Label1(4).Top <= 0 Then
Label1(0).Top = 1700
Label1(1).Top = 2080
Label1(2).Top = 2500
Label1(3).Top = 2860
Label1(4).Top = 3450
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub Form_Load()
Label1(0).Caption = "KAYAN YAZI"
Label1(1).Caption = "UMARIM BE�EN�RS�N�z"
Label1(2).Caption = "V�SUALBAS�C SEVENLER ���N"
Label1(3).Caption = "E�LenCeLi"
Label1(4).Caption = "KOLAY GELS�N )"
End Sub
Private Sub Timer1_Timer()
Label1(0).Top = Label1(0).Top - 20
Label1(1).Top = Label1(1).Top - 15
Label1(2).Top = Label1(2).Top - 15
Label1(3).Top = Label1(3).Top - 15
Label1(4).Top = Label1(4).Top - 10
If Label1(4).Top <= 0 Then
Label1(0).Top = 1700
Label1(1).Top = 2080
Label1(2).Top = 2500
Label1(3).Top = 2860
Label1(4).Top = 3450
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub Form_Load()
Label1(0).Caption = "KAYAN YAZI"
Label1(1).Caption = "UMARIM BE�EN�RS�N�z"
Label1(2).Caption = "V�SUALBAS�C SEVENLER ���N"
Label1(3).Caption = "E�LenCeLi"
Label1(4).Caption = "KOLAY GELS�N )"
End Sub
Private Sub Timer1_Timer()
Label1(0).Top = Label1(0).Top - 20
Label1(1).Top = Label1(1).Top - 15
Label1(2).Top = Label1(2).Top - 15
Label1(3).Top = Label1(3).Top - 15
Label1(4).Top = Label1(4).Top - 10
If Label1(4).Top <= 0 Then
Label1(0).Top = 1700
Label1(1).Top = 2080
Label1(2).Top = 2500
Label1(3).Top = 2860
Label1(4).Top = 3450
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub Workbook_Activate()
Application.DisplayFormulaBar = False
End Sub
Private Sub Workbook_Deactivate()
Application.DisplayFormulaBar = True
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub isimler()
Dim i As Integer
For i = 1 To [A65536].End(xlUp).Row
Cells(i, 3) = StrConv(Cells(i, 1), vbProperCase)
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim k As integer
k = 0
Do Until k > ListBox1.ListCount - 1
If ListBox1.Selected(k) = True Then
ListBox1.RemoveItem k
Else
k = k + 1
End If
Loop
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub ComboBox1_Change()
Sheets("1").Select
TextBox2 = Cells(ComboBox1.ListIndex + 1, 2)
TextBox3 = Cells(ComboBox1.ListIndex + 1, 3)
TextBox4 = Cells(ComboBox1.ListIndex + 1, 4)
TextBox5 = Cells(ComboBox1.ListIndex + 1, 5)
TextBox6 = Cells(ComboBox1.ListIndex + 1, 6)
TextBox7 = Cells(ComboBox1.ListIndex + 1, 7)
TextBox8 = Cells(ComboBox1.ListIndex + 1, 8)
TextBox9 = Cells(ComboBox1.ListIndex + 1, 9)
TextBox10 = Cells(ComboBox1.ListIndex + 1, 10)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
Set wsh = Sheets("fihrist")
sonsatir = wsh.Range("A65536").End(xlUp).Row
For i = 1 To sonsatir
p1 = wsh.Cells(i, 20)
If WorksheetFunction.CountIf(wsh.Range("t2:t" & i), p1) = 1 Then tarih.AddItem
(p1)
Next i
end sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
Set wsh = Sheets("fihrist")
sonsatir = wsh.Range("A65536").End(xlUp).Row
For i = 1 To sonsatir
p1 = wsh.Cells(i, 20)
If WorksheetFunction.CountIf(wsh.Range("t2:t" & i), p1) = 1 Then tarih.AddItem
(p1)
Next i
end sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
Set wsh = Sheets("fihrist")
sonsatir = wsh.Range("A65536").End(xlUp).Row
For i = 1 To sonsatir
p1 = wsh.Cells(i, 20)
If WorksheetFunction.CountIf(wsh.Range("t2:t" & i), p1) = 1 Then tarih.AddItem
(p1)
Next i
end sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
Set wsh = Sheets("fihrist")
sonsatir = wsh.Range("A65536").End(xlUp).Row
For i = 1 To sonsatir
p1 = wsh.Cells(i, 20)
If WorksheetFunction.CountIf(wsh.Range("t2:t" & i), p1) = 1 Then tarih.AddItem
(p1)
Next i
end sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
Set wsh = Sheets("fihrist")
sonsatir = wsh.Range("A65536").End(xlUp).Row
For i = 1 To sonsatir
p1 = wsh.Cells(i, 20)
If WorksheetFunction.CountIf(wsh.Range("t2:t" & i), p1) = 1 Then tarih.AddItem
(p1)
Next i
end sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
Set wsh = Sheets("fihrist")
sonsatir = wsh.Range("A65536").End(xlUp).Row
For i = 1 To sonsatir
p1 = wsh.Cells(i, 20)
If WorksheetFunction.CountIf(wsh.Range("t2:t" & i), p1) = 1 Then tarih.AddItem
(p1)
Next i
end sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim k As integer
k = 0
Do Until k > ListBox1.ListCount - 1
If ListBox1.Selected(k) = True Then
ListBox1.RemoveItem k
Else
k = k + 1
End If
Loop
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Makro5()
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat(wdPasteDefault)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Makro5()
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat(wdPasteDefault)
End Sub
----------kod bitir------
----------kod basla------
Sub windows_�r�n_kodu()
Dim dize As String
dize = kod_al(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion",
"ProductId")
MsgBox dize
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim k As integer
k = 0
Do Until k > ListBox1.ListCount - 1
If ListBox1.Selected(k) = True Then
ListBox1.RemoveItem k
Else
k = k + 1
End If
Loop
End Sub
----------kod bitir------
----------kod basla------
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("b2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 2) = Cells(i + 1, 2) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("b2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 2) = Cells(i + 1, 2) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("b2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 2) = Cells(i + 1, 2) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("b2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 2) = Cells(i + 1, 2) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("b2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 2) = Cells(i + 1, 2) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub Makro5()
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat(wdPasteDefault)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sayfa2!A2:A7"
ComboBox2.RowSource = "Sayfa2!B2:B7"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sayfa2!A2:A7"
ComboBox2.RowSource = "Sayfa2!B2:B7"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sayfa2!A2:A7"
ComboBox2.RowSource = "Sayfa2!B2:B7"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sayfa2!A2:A7"
ComboBox2.RowSource = "Sayfa2!B2:B7"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sayfa2!A2:A7"
ComboBox2.RowSource = "Sayfa2!B2:B7"
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(B1="";METNE�EV�R(A1;"gg/aa/yyyy")&" Tarihinde Para
Al�nmam�t�r";METNE�EV�R(A1;"gg/aa/yyyy")&" Tarihinde
"&SAYID�ZENLE(B1;0))& "Lira Al�nm�t�r." Biraz inceliyerek
de�i�tirebilirsin.
�kinci sorunu ise Yazd���m fonksiyonu kullanarak E1 H�cresini Veri Do�rulama ile
Yapabilirsin.Veri Do�rulama ise;
1.)E1 H�cresini t�klat
2.)Veri>Do��rulama T�klat
3.)izin Veilern=Liste
Kaynak==A1:A22
Yazars�n
4.)E2 H�cresinede �unlar� yaz.
Kod:
=D��EYARA(E1;A1:B22;2;YANLI�)
Bu kadar.Not:E2 H�cresini Bi�imlendir renklendir..Kolay Gelsin.
Serpily
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sayfa2!A2:A7"
ComboBox2.RowSource = "Sayfa2!B2:B7"
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
=IF(IF($A2="";$A1;$A2)=IF(Sayfa1!$A2="";Sayfa1!$A1;Sayfa1!$A2);OFFSET(Sayfa1!
A1;MATCH(Sayfa2!$A$2;Sayfa1!$A$2:$A$24;0);ROW(Sayfa1!$A$2)-1);"")
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
=GETPIVOTDATA("Grand Total";$A$27;"Grup
Kodu";"SM5201";"Br";"Ad";"A��klama";1;"31.01.2004";1000;"28.02.2004";1000)+GETPIVOT
DATA("Grand Total";$A$27;"Grup
Kodu";"SM5201";"Br";"Ad";"A��klama";2;"31.01.2004";5252;"28.02.2004";5252)
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 1 To 51 Step 1
For e = 1 To 30
maas.Controls(Check & e + 1).Caption = Cells(1, a)
Next
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 1 To 51 Step 1
For e = 1 To 30
maas.Controls(Check & e + 1).Caption = Cells(1, a)
Next
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Sheets("KDV_1").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 1 To 51 Step 1
For e = 1 To 30
maas.Controls(Check & e + 1).Caption = Cells(1, a)
Next
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 1 To 51 Step 1
For e = 1 To 30
maas.Controls(Check & e + 1).Caption = Cells(1, a)
Next
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Sheets("KDV_1").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Sheets("KDV_1").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kopyalaart�r()
Worksheets("anasayfa").Copy after:=Worksheets(Worksheets.Count)
Worksheets(Worksheets.Count).Range("E8") = Worksheets("anasayfa").Range("e8") + 1
Worksheets(Worksheets.Count).Range("M1") = Worksheets("anasayfa").Range("M1") + 1
End Sub
----------kod bitir------
----------kod basla------
Sub YazYTL()
MyNum = Selection
Selection = Yaz_YTL(MyNum)
Selection.Range.Case = wdUpperCase
End Sub
----------kod bitir------
----------kod basla------
Sub kopyalaart�r()
Worksheets("anasayfa").Copy after:=Worksheets(Worksheets.Count)
Worksheets(Worksheets.Count).Range("E8") = Worksheets("anasayfa").Range("e8") + 1
Worksheets(Worksheets.Count).Range("M1") = Worksheets("anasayfa").Range("M1") + 1
End Sub
----------kod bitir------
----------kod basla------
Sub kopyalaart�r()
Worksheets("anasayfa").Copy after:=Worksheets(Worksheets.Count)
Worksheets(Worksheets.Count).Range("E8") = Worksheets("anasayfa").Range("e8") + 1
Worksheets(Worksheets.Count).Range("M1") = Worksheets("anasayfa").Range("M1") + 1
End Sub
----------kod bitir------
----------kod basla------
Sub YazYTL()
MyNum = Selection
Selection = Yaz_YTL(MyNum)
Selection.Range.Case = wdUpperCase
End Sub
----------kod bitir------
----------kod basla------
Sub kopyalaart�r()
Worksheets("anasayfa").Copy after:=Worksheets(Worksheets.Count)
Worksheets(Worksheets.Count).Range("E8") = Worksheets("anasayfa").Range("e8") + 1
Worksheets(Worksheets.Count).Range("M1") = Worksheets("anasayfa").Range("M1") + 1
End Sub
----------kod bitir------
----------kod basla------
Sub YazYTL()
MyNum = Selection
Selection = Yaz_YTL(MyNum)
Selection.Range.Case = wdUpperCase
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(A1=12;5;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")
+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")
+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")
Red-Kid
----------kod bitir------
----------kod basla------
Sub Auto_Open ()
Sheet ("Sayfa1").Selecet
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub auto_open()
sure = Now + TimeSerial(0, 1, 0)
Application.OnTime earliesttime:=sure, procedure:="Makromuz", schedule:=True
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
a = ThisWorkbook.Name
ActiveWorkbook.SaveAs Filename:="C:\Yedek\" & "Yedek" & a
Workbooks.Open Filename:="C:\" & a
Workbooks("Yedek" & a).Close , True
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
a = ThisWorkbook.Name
ActiveWorkbook.SaveAs Filename:="C:\Yedek\" & "Yedek" & a
Workbooks.Open Filename:="C:\" & a
Workbooks("Yedek" & a).Close , True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub auto_open()
sure = Now + TimeSerial(0, 1, 0)
Application.OnTime earliesttime:=sure, procedure:="Makromuz", schedule:=True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub auto_open()
sure = Now + TimeSerial(0, 1, 0)
Application.OnTime earliesttime:=sure, procedure:="Makromuz", schedule:=True
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
a = ThisWorkbook.Name
ActiveWorkbook.SaveAs Filename:="C:\Yedek\" & "Yedek" & a
Workbooks.Open Filename:="C:\" & a
Workbooks("Yedek" & a).Close , True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
TextBox1.Text = Range("d5").Text
TextBox2.Text = Range("d6").Text
TextBox3.Text = Range("d7").Text
TextBox4.Text = Range("d8").Text
TextBox5.Text = Range("d9").Text
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Dosya()
Sheets(1).Select
Sheets(1).Name = [B2]
Dim MyFolder As String
MyFolder = "C:\" & [B1] & ""
MkDir MyFolder
End Sub
Kod:
Sub Dosya()
Sheets(1).Select
Sheets(1).Name = [b2]
Dim MyFolder As String
MyFolder = "C:\" & Range("B1") & ""
MkDir MyFolder
ActiveWorkbook.SaveAs "C:\" & [b1] & "Firmas� " & [b2]
& "Model " & ".XLS"
End Sub
Kod:
Sub create()
On Error GoTo Error
drive$ = InputBox("S�r�c� ad�n� giriniz", "S�r�c� ?")
drive$ = drive$ & ":\"
Path$ = InputBox("Hangi klas�r alt�nda olu�turmak istiyorsunuz.Sizin A�aca��n�z
Klas�r Ad� : " & [b1], "Yol ?")
If Path$ <> "" Then Path$ = Path$ & "\"
MyPath$ = Range("b1").Value
Final$ = drive$ & Path$ & MyPath$
MkDir (Final$)
Exit Sub
Error:
MsgBox "VB Hata No = " & Err.Number & vbCrLf & vbCrLf &
"A��klama :" & vbCrLf & Err.Description, vbApplicationModal, "HATA !!!"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Makro6()
Range("A1").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
TextBox1.Text = Range("b1").Text
TextBox2.Text = Range("b2").Text
TextBox3.Text = Range("b3").Text
TextBox4.Text = Range("b4").Text
TextBox5.Text = Range("b5").Text
End Sub
Kod:
Private Sub CommandButton1_Click()
Range("b1").Select
ActiveCell.Formula = TextBox1
Range("b2").Select
ActiveCell.Formula = TextBox2
Range("b3").Select
ActiveCell.Formula = TextBox3
Range("b4").Select
ActiveCell.Formula = TextBox4
Range("b5").Select
ActiveCell.Formula = TextBox5
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Format(Date, "dd/mm/yyyy")
End Sub
Kod:
Private Sub CommandButton1_Click()
If [a1] = "" Then
Soru = MsgBox("H�creye De�er girmediniz.", vbYesNo, "Hata!")
CommandButton1.Caption = ""
If Soru = vbYes Then GoTo devam
If Soru = vbNo Then Exit Sub
End If
devam:
CommandButton1.Caption = Format(Date, "dd/mm/yyyy")
End Sub
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Format(Date, "dd/mm/yyyy")
End Sub
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Format(Now, "hh:mm:ss")
End Sub
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Now
End Sub
Kod:
Private Sub CommandButton1_Click()
Do
CommandButton1.Caption = Now
DoEvents
Loop
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("c2") = "" Then
MsgBox "c2 bo� ge�ilmez", 64, "uyar�"
Range("c2").Select
End If
End Sub
Kod:
Sub xxrt()
If Range("C2") = "" Then
MsgBox "H�cre Bo� Olamaz."
ElseIf Range("C5") = "" Then
MsgBox "H�cre C5 Bo� Olamaz"
End If
End Sub
Kod:
Sub xxrt()
If Range("C2") = "" Then
soru = MsgBox("C2 H�cresini Bo� Ge�emezsiniz.Devam Edeyimmi?", vbYesNo, "Bo� Kalan
H�cre Hatas�")
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
If Range("C5") = "" Then
soru = MsgBox("C5 H�cresini Bo� Ge�emezsiniz.Devam Edeyimmi?", vbYesNo, "Bo� Kalan
H�cre Hatas�")
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
devam:
Sheets("Sayfa2").Select 'Bu sayfa2 ye ge�mek i�in.
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$C$18" Then Sheets("Sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
1- �ablon kitab�n�zdaki t�m Sayfalar� se�in.
2- Header Footer penceresini a��n.
3- Left/Center/Right kutulardan hangisine istiyorsan�z &[Page] yaz�n ve
OK ile onaylay�n.
Sayfalar�n ��kt�s�n� al�rken yine birinci maddedeki gibi print edece�iniz sayfalar�
se�meniz ve �yle print etmeniz gerekiyor.
Aksi taktirde her sayfay� ba��ms�z print ederseniz her birinin sayfa numaras� 1
�eklinde g�r�l�r.
Sayg�lar�mla
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Open()
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = True
Range("a1").Select
Sheets("Sayfa1").Protect Password:="123"
End Sub
----------kod bitir------
----------kod basla------
Kod:
=ETOPLA(A1:A100;"a";B1:B100)
yerine
Kod:
=TOPLA.�ARPIM((A1:A100="a")*B1:B100)
Form�l�n� kullan�n.�stteki kapal� dosyada �al�maz iken alttaki �al��r.
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$a$1" Then Range("D54").Select
End Sub
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$F$10" Then Range("d54").Select
Range("d54").Interior.ColorIndex = 6
End Sub
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$F$10" Then Range("d4").Select
Range("d54").Formula = "=A1+A3"
End Sub
Kod:
Sub git()
Select Case InputBox("rakam� yaz")
Case 1
[D54].Select
Case 2
[D54].Select
Case 3
[H45].Select
'bu �ekilde devam ettir
End Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
MsgBox "Sipari� Tarihini Giriniz..."
kodundan ba�ka anlam ��kar�yoruz.Burda rahat olun �ekinecek bir�ey
yok.Amac�m�z,amac�n�zd�r.��renmek,��retmek..Bak�n.Ben size ��yle bir �rnek
haz�rlad�m..
Sipari� Tarihini girerek kullan�c� TextBox1'e:CommandButtona �u kodlar� yaz�n.
Kod:
Private Sub CommandButton1_Click()
Range("A1").Select
ActiveCell.Formula = TextBox2
End Sub Dosyay� yoll�yorum..Her�eyin bir ilk var dimi..
----------kod bitir------
----------kod basla------
Kod:
Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenForm "Form ad�n�z", acNormal, "", "", ,
acNormal
DoCmd.RunCommand acCmdFilterByForm
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub arabul()
ara = Application.InputBox(prompt:="Aranacak Veri?", Type:=3)
Range("A3:A341").Select
Selection.Find(What:=ara, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
satir = ActiveCell.Row
Range(Cells(satir, 2), Cells(satir, 8)).Select
Selection.Copy
Sheets("Sayfa1").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End Sub
Kod:
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows,
ifadesinde xlFormulas yerine xlValues yaz�n
Yani;
Kod:
LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows,
Kopyalama aral��� i�in a�a��daki sat�r kullan�l�yor.
Kod:
Range(Cells(satir, 2), Cells(satir, 8)).Select
Buradaki anlam ;
"2". yani B s�tunundan ba�lay�p,
"8". yani H s�tununa kadar olan h�creleri se�.
H yerine daha fazla sut�n vermek isterseniz ikinci de�eri de�eri buna g�re
artt�r�n.
Umar�m Olmu�tur.
Sayg�lar
Kod:
Range(Cells(satir+1, 2), Cells(satir+1, 8)).Select
Ancak baz� sat�rlarda birle�tirme var, baz�lar�nda birle�tirme yoksa, buna bir
��z�m �u an i�in akl�ma gelmiyor.
ilk yaz�n�zda;
Al�nt�:
haziran 2004 sayfas�ndaki a3:a341 h�creleri aras�nda bulunan X h�cresini bulup
sa��nda bulunan ( b3:h341) aras�ndaki h�creleri aynen kopyalay�p sayfa 1 deki a2
h�crtesine alt alta yazan makro
�eklinde yazd���n�z i�in ben aranan de�erin bir defa aranaca�� yap�da haz�rlad�m.
A S�tununda bir den fazla aranan deger bulundu�unda bunlar� di�er sayfaya nas�l
atacak?
Her bir sat�r�n bilgisini yukar�dan a��ya ve her bir sat�r�n verisini ayr� bir
kolona yanyanam�?
----------kod bitir------
----------kod basla------
Kod:
=IF(WEEKDAY(B2;2)>4;B2+(8-WEEKDAY(B2;2));B2+1)
T�rk�e Versiyonu =
Kod:
=E�ER(HAFTANING�N�(B2;2)>4;B2+(8-HAFTANING�N�(B2;2));B2+1)
Deneme sonucunu bildirirseniz memnun olurum.
----------kod bitir------
----------kod basla------
Kod:
=VLOOKUP(A3;'�r�nler '!A2:B32;2;0)*Sayfa1!B3+VLOOKUP(A3;'�r�nler '!
A2:B32;2;0)*Sayfa1!C3+VLOOKUP(A3;'�r�nler '!A2:B32;2;0)*D3
----------kod bitir------
----------kod basla------
Kod:
Sub FileList()
Dim FileNamesList As Variant, i As Integer
FileNamesList = CreateFileList("*.xls", True)
Range("A:B").ClearContents
For i = 1 To UBound(FileNamesList)
Cells(i + 1, 1) = FileNamesList(i)
Cells(i + 1, 2) = FileSize(Dir(FileNamesList(i)))
Next
Columns("A:B").AutoFit
End Sub
Kod:
Sub ay�r()
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="\", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1))
ActiveWindow.ScrollColumn = 2
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Declare Function apiGetUserName Lib _
"advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) _
As Long
'
Sub Auto_Close()
Sheets(1).Range("A1") = "Son Kullan�c� :"
Sheets(1).Range("B1") = fGetUserName
Sheets(1).Range("C1") = Now
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeSave _
(ByVal SaveAsUI As Boolean, Cancel As Boolean)
sifre = InputBox("Kay�t i�in �ifreyi girmelisiniz", _
"KAYIT", "�ifre girin")
If sifre = "xxrt" Then
MsgBox "Kay�t i�lemi tamamland�", vbInformation, _
"KAYIT BA�ARILI"
Else
MsgBox "Yanl� �ifre girdiniz." & Chr(13) & _
"Dosya kaydedilemedi", vbCritical, "HATALI ��FRE"
Cancel = True
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub kapat()
ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Open()
With Worksheets("Sheet1")
.Protect Password:="a", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub sil()
For i = Cells(65536, 1).End(xlUp).Row To 2 Step -1
If Trim(Cells(i, 1)) <> "SARF F���" And Trim(Cells(i, 1)) <> "TOPTAN SATI�
�RSAL�YES�" Then
Rows(i & ":" & i).Delete Shift:=xlUp
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(VE(A2>37986;A2<38353);"1";"0")
Kod:
=IF(AND(A2>37986;A2<38353);"1";"0) ing s�r�m i�in
2. B1 h�cresine k���k olan tarih C1 h�cresine b�y�k olan tarihleri yaz�n ve tarihi
A2 h�cresine yaz formulu B2 h�cresine yaz
Kod:
=E�ER(VE(A2>B1;A2<C1);"1";"0")
Kod:
=IF(AND(A2>B1;A2<C1);"1";"0") �ng s�r�m i�in
----------kod bitir------
----------kod basla------
Kod:
=INDIRECT("'"&A1&"'!A100")
Umar�m i�inize yarar.
Kod:
=INDIRECT("'"&A1&"'!A100")
Umar�m i�inize yarar.
----------kod bitir------
----------kod basla------
Kod:
ActiveCell.Offset(0, 1).Formula = "=Sum(a1: c2)"
�eklinde iken sorun yok. a1:c2 yerine
Kod:
ilkhucre = ActiveCell.Offset(SatirSayisi + 2, 1)
sonhucre = ActiveCell.Offset(ilkhucre + KacFatura, 1)
ile elde etti�im ilkhucre:sonh�cre yi kullanaca��m da ne yap�yorduk,
"&" ile ba�l�yorduk ama syntax nas�ld� hat�rlayam�yorum.
Diyelimki i�lem "E" s�tununda olacak.. Cevap?
S�tunda bir de�i�kene atanm� durumdayken Cevap?
Kod:
ilkhucre = ActiveCell.Offset(0, 1).Address
sonhucre = ActiveCell.Offset(0, 2).Address
ActiveCell.Offset(0, 1).Formula = "=Sum(" & ilkhucre & ":" & sonhucre
& ")"
Kod:
ilkhucre = ActiveCell.Offset(SatirSayisi + 2, 1) .address
sonhucre = ActiveCell.Offset(ilkhucre + KacFatura, 1).address
----------kod bitir------
----------kod basla------
Kod:
Sub comment()
Set liste = Range("A1").SpecialCells(xlCellTypeComments)
For Each hucre In liste
With hucre.comment
.Shape.Height = 150
.Shape.Width = 150
End With
Next hucre
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
If KeyCode = vbKeyDecimal Then SendKeys "{BACKSPACE}."
End Sub
Kod:
Type ControlPanelItem
NewHardware As String
AddRemove As String
DateTime As String
Display As String
Internet As String
Game As String
Keyboard As String
Modem As String
Mouse As String
Multimedia As String
Network As String
Password As String
International As String
Sound As String
System As String
End Type
'
Const SW_SHOW = 5
'
Sub LaunchControlPanel()
Dim CtrlPanApp As ControlPanelItem
CtrlPanApp.NewHardware = "sysdm.cpl @1"
CtrlPanApp.AddRemove = "appwiz.cpl,,1"
CtrlPanApp.DateTime = "timedate.cpl"
CtrlPanApp.Display = "desk.cpl,,0"
CtrlPanApp.Internet = "inetcpl.cpl,,0"
CtrlPanApp.Game = "joy.cpl"
CtrlPanApp.Keyboard = "main.cpl @1"
CtrlPanApp.Modem = "modem.cpl"
CtrlPanApp.Mouse = "main.cpl @0"
CtrlPanApp.Multimedia = "mmsys.cpl,,0"
CtrlPanApp.Network = "netcpl.cpl"
CtrlPanApp.Password = "password.cpl"
CtrlPanApp.International = "intl.cpl,,1"
CtrlPanApp.Sound = "mmsys.cpl @1"
CtrlPanApp.System = "sysdm.cpl,,0"
'
Shell "rundll32.exe shell32.dll,Control_RunDLL " & CtrlPanApp.International,
SW_SHOW
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Formul()
Range("B2:b50").Formula = "=$A$1+$A$2"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
x = Cells(65536, 3).End(xlUp).Row
Range("E2").AutoFill Destination:=Range("E2:E" & x)
Application.Calculate
End Sub
----------kod bitir------
----------kod basla------
Kod:
'Windows API function declaration
Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
Function Alarm(Cell, Condition)
Dim WAVFile As String
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
On Error GoTo ErrHandler
If Evaluate(Cell.Value & Condition) Then
WAVFile = ThisWorkbook.Path & "\sound.wav" 'Edit this statement
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
Alarm = True
Exit Function
End If
ErrHandler:
Alarm = False
End Function
Kod:
=Alarm(A1;">=1000")
Kod:
Sub MultiEmail()
Dim OutApp As Outlook.Application
Dim NewMail As Outlook.MailItem
Dim noE As Integer, i As Integer
noE = Cells(65536, 5).End(xlUp).Row
For i = 1 To noE
If Cells(i, 5) = Date - 10 Then
Set OutApp = New Outlook.Application
Set NewMail = CreateItem(olMailItem)
With NewMail
.To = Cells(i, 6).Text
.Subject = "Deneme"
.Body = "Bu e-mail deneme amac�yla g�nderilmi�tir."
.Save
.Send
End With
Set NewMail = Nothing
Set OutApp = Nothing
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Kitap1ac()
UserForm1.Show
End Sub Yaz.Sayfa1'de bir buton a�.Bu Makroyu Butona ata.
Kod:
Application.Run "kitap2.xls!makro1"
Kod:
Application.Run "\\makineadi\klasoradi\kitapadi.xls!makroadi"
e�er kitaplar ayn� makine �zerinde ise
Kod:
Application.Run "c:\klasoradi\kitapadi.xls!makroadi"
----------kod bitir------
----------kod basla------
Kod:
Application.ScreenUpdating = False
For i = 1 To Cells(65536, 1).End(xlUp).Row
If Trim(Cells(i, 1)) <> "" And Trim(Cells(i, 1)) <> "m.cinsi" Then
Range(i & ":" & i).EntireRow.Copy
Sheets("sayfa2").Range("A65536").End(xlUp).Offset(1, 0).PasteSpecial
Paste:=xlPasteValues
End If
Next i
Application.ScreenUpdating = True
edit : yukar�daki �rnekteki gibi aplication 'un
'i daha sonra kullan�lmayacaksa, true yapmak mant�ks�zd�r. i� bitti�inde zaten
otomatik olarak true olur.
sen neden yapt�n derseniz, al�kanl�k.
----------kod bitir------
----------kod basla------
Kod:
Dim RunWhen As Double
Const RunWhat = "Info"
'
Sub Auto_Open()
StartTimer
End Sub
----------kod bitir------
----------kod basla------
Kod:
=SUMPRODUCT((B2=Sheet2!A$2:A$20)*1)
ve, a�a�ya do�ru s�r�kleyerek formul�n D2:D20 h�crelerine kopyalanmas�n� sa�la.
----------kod bitir------
----------kod basla------
Kod:
Sub deneme()
i = 5
Do While Cells(i, 5) <> ""
Cells(i, 8).Formula = Right(Cells(i, 5), 10)
i = i + 1
Loop
Cells(4, 8).Value = "ge�iciba�l�k"
Range("H4:H1000").Select
Range("H4:H1000").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"H4:H1000"), CopyToRange:=Range("K4"), Unique:=True
Columns("K:K").ColumnWidth = 16
End Sub
----------kod bitir------
----------kod basla------
Kod:
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=fenomen;DBQ=C:\fenomen\fenomen.mdb;DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;" _
, Destination:=Range("A1"))
.CommandText = Array( _
"SELECT query1.ID, query1.ADI, query1.SOYADI" & Chr(13) & "" &
Chr(10) & "FROM `C:\fenomen\fenomen`.query1 query1" & Chr(13) & ""
& Chr(10) & "ORDER BY query1.ID" _
)
.Name = "Query from fenomen"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
biz bu sorguyu parametrik yapmak istersek (senin �rne�inde like kullanarak) sql
sorgusunu
Kod:
"SELECT query1.ID, query1.ADI, query1.SOYADI" & Chr(13) & "" &
Chr(10) & "FROM `C:\fenomen\fenomen`.query1 query1" & Chr(13) & ""
& Chr(10) & "Where ADI like " & cells(5,1) & "% ORDER BY
query1.ID" _
)
yukar�daki gibi de�i�tirirsen sorgu like iifadesi ile 5. sat�r 1. kolondaki data
ile ba�layan de�erleri d�nd�rerek parametrik bir yap� al�r.
E�er tak�l�rsan bir �rnek g�nderebilirim.
----------kod bitir------
----------kod basla------
Kod:
Sub Macro1()
eklenecek = ActiveCell.Offset(1, 0)
ActiveCell.Value = ActiveCell.Value + eklenecek
End Sub
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("a1:a500")) Is Nothing Then
MySum = ActiveCell.Value
Application.OnKey "{END}", "SumTotal"
Else: Application.OnKey "{END}"
End If
End Sub Bu Kodlar�da Mod�l1' e
Kod:
Public MySum As Long ' Bu sat�r General_Declarations k�sm�nda olucak
Sub SumTotal()
Set MyRange = Sheets("Sayfa1").Range(ActiveCell.Address)
MyRange.Value = MyRange.Value + MySum
Set MyRange = Nothing
End Sub
----------kod bitir------
----------kod basla------
Kod:
=CEILING(((A10-$C$1)/15);1)
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
Sheets("Sayfa1").Activate
TextBox1.Text = Range("A1").Text
End Sub Ve CommandButton1'ede
Kod:
Private Sub CommandButton1_Click()
Sheets("Sayfa1").Activate
Range("A1").Select
ActiveCell.Formula = TextBox1 Yazarak A1 H�cresindeki veri UserForm a��l�rken
TextBox1'e gelecek ve De�i�iklik Yapt���n�zda A1 H�cresine,yap�lan de�i�iklik
yaz�lacak..Ekli Dosyada ise Aranan veri Bulunarak G�ncelliyor.�nceleyin.
----------kod bitir------
----------kod basla------
Kod:
TextBox2 = StrConv(TextBox2, vbUpperCase) Yaz�n�z.
Ayr�ca ek olarak:Sayfa1'in Kod sayfasunada i ve � Harflerini � ve I yapmak i�inde
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$" & Target.Row Then
kelime = Replace(Target.Value, "i", "�")
kelime = Replace(kelime, "�", "I")
Target.Value = StrConv(kelime, vbUpperCase)
End If
End Sub
Kod:
Private Sub TextBox1_Change()
TextBox1 = StrConv(TextBox1, vbUpperCase)
End Sub
Kod:
Private Sub TextBox1_Change()
TextBox1.Value = UCase(TextBox1.Value)
[A1]=TextBox1.value
End Sub
Kod:
Private Sub TextBox1_Change()
On Error Resume Next
[aa1] = "=b�y�kharf(""" & TextBox1 & """)"
[aa1] = "=upper(""" & TextBox1 & """)"
TextBox1 = [aa1]
End Sub
Kod:
Private Sub TextBox1_Change()
On Error Resume Next
TextBox1 = Evaluate("=b�y�kharf(""" & TextBox1 & """)")
TextBox1 = Evaluate("=upper(""" & TextBox1 & """)")
End Sub
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
Public before(9, 2) As String
Public after(9, 2) As String
ilgili sayfan�n change olay�na
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
For i = 1 To 10
after(i - 1, 0) = before(i - 1, 0)
after(i - 1, 1) = before(i - 1, 1)
after(i - 1, 2) = before(i - 1, 2)
Next i
For i = 1 To 10
before(i - 1, 0) = i
before(i - 1, 1) = Cells(i + 1, 2)
before(i - 1, 2) = Cells(i + 1, 4)
Next i
For i = 1 To 10
For j = 1 To 10
If before(i - 1, 1) = after(j - 1, 1) Then
If before(i - 1, 2) <> after(j - 1, 2) Then
MsgBox (after(i - 1, 1) & " konusunda yeni mesaj var")
End If
End If
Next j
Next i
For i = 1 To 10
after(i - 1, 0) = before(i - 1, 0)
after(i - 1, 1) = before(i - 1, 1)
after(i - 1, 2) = before(i - 1, 2)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=INDIRECT("A" & B1)
- Veya, a�a��daki formul� de kullanabilirsin;
Kod:
=INDEX(A1:A50;B1)
- Verilerin ka��nc� sat�rdan itibaren ba�lad���na ba�l� olarak yukar�daki
formulleri modifiye etmek gerekebilir.
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
fso.MoveFolder "C:\Tmp", "C:\etc\"
End Sub
Kod:
Sub Test2()
Name "C:\Tmp" As "C:\etc\Tmp"
End Sub
Kod:
Sub Test3()
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
fso.Movefile "C:\Tmp\*.*", "C:\etc\"
End Sub
Kod:
Sub Test4()
Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile "c:\Tmp\*.*", "c:\etc\"
End Sub
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:= _
"C:\klasoradi\stok.htm", FileFormat:=xlHtml, _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then Cells(Target.Row, 2) = Now
End Sub
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
Sheets("Sayfa2").Range(Target.Address) = Now
End Sub
----------kod bitir------
----------kod basla------
Kod:
For i = 1 To 20
Dim stok As Integer
kodsay = "stok" & i
If Sheets("Stoklar").Range("B4") = "" Then
say = WorksheetFunction.CountA(Sheets("Stoklar").Range("B4:B65000"))
kodsay.RowSource = "Stoklar!B4:B" & say + 3
Else
say = WorksheetFunction.CountA(Sheets("Stoklar").Range("B4:B65000"))
kodsay.RowSource = "Stoklar!B4:B" & say + 3
End If
Next i
Kod:
UserForm1.Controls("kod" & i).RowSource = "stoklar!B4:B5"
yak�l�rsan bir �rnek g�nderebilirim.
edit :
yak�l�rsan = tak�l�rsan
tatiiill
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static OldRange As Range
On Error Resume Next
Target.Interior.Color = vbRed
Target.Font.Color = vbWhite
OldRange.Interior.ColorIndex = xlColorIndexNone
OldRange.Font.Color = vbBlack
Set OldRange = Target
End Sub
Kod:
Private Sub TextBox2_Enter()
TextBox1.BackColor = &HFFFF00
End Sub
----------kod bitir------
----------kod basla------
Kod:
=COUNTA(A1:B7)-SUM(1/COUNTIF(A1:B7;A1:B7))
Form�l� yazd�ktan sonra sadece entere de�il ctrl + shift + enter e bas�n�z.
Kod:
=E�ER(EHATALIYSA(D��EYARA(A1;$B$1:$B$7;1;YANLI�));"";D��EYARA(A1;$B$1:$B$7;1;YANLI�
)) Bunu a�a��ya s�r�kleyiniz.
D1 H�cresinede �u fonksiyonu kopyalay�n�z.
Kod:
="�ki K�mede "&7-BO�LUKSAY(C1:C7)&" Adet Ortak Eleman Bulunmaktad�r."
Bu sizin istedi�iniz sonucu verir.
En son xxrt taraf�ndan Cum Eyl 24, 2004 08:02 tarihinde de�i�tirildi, toplamda 1
kere de�i�tirildi
xxrt
Kod:
=BA�_DE�_DOLU_SAY(A1:B7)-TOPLA(1/E�ERSAY(A1:B7;A1:B7))
Formullerin ing-t�rk�e kar��l�klar� i�in a�a��daki linke bak�n ltf.
http://www.excel.web.tr/viewtopic.php?p=1659#1659
Kod:
Function jale(Ref_Alan As Variant, Kiyas_Alan As Variant) As Long
'Referans alana g�re kiyaslanan alanda ka� tane ayn� varsa sayar.Bo�luklardada
�al��r.22.01.2004 .Jale
Dim mSay As Long, r1 As Long, r2 As Long, c1 As Integer, c2 As Integer
Dim i As Long, j As Integer, k As Long, l As Integer
mSay = 0
r1 = Ref_Alan.Rows.Count
r2 = Kiyas_Alan.Rows.Count
c1 = Ref_Alan.Columns.Count
c2 = Kiyas_Alan.Columns.Count
For i = 1 To r1
For j = 1 To c1
For k = 1 To r2
For l = 1 To c2
If Ref_Alan(i, j).Value = Kiyas_Alan(k, l).Value Then mSay = mSay + 1
Next l
Next k
Next j
Next i
jale = mSay
End Function
Foksiyonun ad�n� de�i�tirince �al�maz..
----------kod bitir------
----------kod basla------
Kod:
Sub Makro1()
Columns("A:A").Select
Range("A1:B4").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B1").Select
End Sub
Kod:
Sub Makro1()
Columns("A:A").Select
Range("A1:B4").Sort Key1:=Range("A1")
Kod sat�r�nda De�i�iklik yapmam�z gerekir.
Sat�r�n Bitti�i Alana Kadar S�ralama:
Kod:
Sub sonsat�rakadars�rala()
sonsatir = Range("a1").End(xlDown).Row
Range(Cells(1, 1), Cells(sonsatir, 2)).Select
Selection.Sort _
Key1:=Worksheets("Sheet1").Columns("A"), _
Header:=xlGuess
End Sub
Kod:
Sub Tumsutuna_Kadar_S�rala()
Columns("A:b").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End Sub
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="hede.php" title="A��klama Yaz�s�">Deneme</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
<a href="http://www.excel.web.tr" target="_blank">Ayr� sayfada a�ar</a>
----------kod bitir------
----------kod basla------
Kod:
Cells(i, 3) = Right(Cells(i, 1), Len(Cells(i, 1)) - j + 1)
sat�r�n�
Kod:
Cells(i, 3) = Right(Cells(i, 1), Len(Cells(i, 1)) - j )
olarak deg�st�r�n.
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_Open()
Application.AskToUpdateLinks = False
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
End Sub
Kod:
Sub guncelle()
Application.AskToUpdateLinks = False
ActiveWorkbook.UpdateLink Name:=ActiveWorkbook.LinkSources
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Application.CommandBars.FindControl(ID:=1849).Execute
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Close()
Application.MoveAfterReturn = True
End Sub
Kod:
Sub ResetEnterReturn()
Application.OnKey "{ENTER}"
Application.OnKey "~"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Kura_Sonuc()
For i = 1 To 15 'Kuraya Kat�lacak Ki�i say�s�
Randomize
MsgBox Int(Rnd(1) * 100) 'Kuraya Kat�lacak Ki�i Say�s�
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub ay�r()
b = Split(Range("a1").Value, " ")
If UBound(b) > 1 Then
Range("a2") = b(0) & " " & b(1)
Range("a3") = b(2)
Else
Range("a2") = b(1) & " " & b(0)
End If
End Sub
Kod:
Sub otomatikay�r()
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=";", FieldInfo:=Array(Array(1, 1), Array(2, 1)),
TrailingMinusNumbers:=True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Button1_Click()
Range("a2").Select
ActiveCell.FormulaR1C1 =
"=CONCATENATE(RC[3],R1C[1],R3C[2])"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Dim ilkSQL
sat�r�ndan sonra
Kod:
if ad = "" then
error = "Bir isim girmediniz."
Response.Write error
Response.End
end if
ve ziyaret�inin formu doldurdu�u sayfan�n ismi neyse oraya y�nlendirmek
i�inde(�rnekte ekle.asp)
Response.Redirect "ekle.asp"
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
Dim NoB As Long
Dim ii As Long
Dim i As Integer
Dim j As Integer
Dim MyRng As Range
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
Sheets(i).Select
ii = 0
j = 0
NoB = Cells(65536, 2).End(xlUp).Row
For ii = NoB To 5 Step -1
If Trim(Cells(ii, 2)) = Trim("Net Miktar") Then
Rows(ii + 1).Select
For j = 1 To 6
Selection.Insert Shift:=xlDown
Next
End If
Next
For ii = 5 To Cells(65536, 2).End(xlUp).Row
If Trim(Cells(ii, 2)) = Trim("Smm Sat�") Then Rows(ii).Delete
Next
Next
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Sub test(yol As String, dosyaadi As String, sayfaadi, range As String)
With ActiveSheet.Range(range)
.FormulaArray = "='" & yol & "\[" & dosyaadi & "]" & sayfaadi
& "'!" & range
.Value = .Value
End With
End Sub
----------kod bitir------
----------kod basla------
Sub Makro1()
For a = 2 To 20
b = Sheets("sayfa1").Cells(a, 1).Value
If b = "" Then
Cells(a, 2).Select
Selection.Cut
Cells(a, 1).Select
ActiveSheet.Paste
End If
Next a
Range("C1").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("sayfa1").Select
Range("a1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(-1, 0).Select
Loop
If Range("a2").Value = "" Then
Range("a1") = TextBox1.Value
Range("b1") = ComboBox1.Text
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = ComboBox1.Text
End Sub
Private Sub CommandButton1_Click()
For a = 1 To 40
b = Sheets("sayfa1").Cells(a, 1).Value
If b = "" Then
Sheets("sayfa1").Cells(a, 1) = TextBox1.Value
Sheets("sayfa1").Cells(a, 2) = ComboBox1.Text
GoTo 10
End If
Next a
Sheets("sayfa1").Cells(1, 3) = "T�M SATIRLAR DOLU" 'UYARI MESAJI
10 End Sub
selamlar
leventm
En son leventm taraf�ndan Pr� Ekm 14, 2004 22:37 tarihinde de�i�tirildi, toplamda 1
kere de�i�tirildi
excel 97-2000-2002-2003 �ng-Tr
----------kod bitir------
----------kod basla------
Kod:
Option Compare Database
Option Explicit
Private Sub Form_KeyPress(KeyAscii As Integer)
Dim strCh As String
Select Case KeyAscii
Case 13
DoCmd.Close
Case 32
MsgBox "It is Spacebar button", vbOKOnly
End Select
strCh = Chr(KeyAscii)
KeyAscii = Asc(UCase(strCh))
End Sub
Kod:
Private Sub Form_KeyPress(KeyAscii As Integer)
yerine
Kod:
Private Sub Text3_KeyPress(KeyAscii As Integer)
yaz�n.Ba�kada bir �ey akl�ma gelmiyor bu konuda.
----------kod bitir------
----------kod basla------
Kod:
Sub UL185213()
Sheets("UL185213").Select
Range("A1").Select
End Sub
Kod:
Sub anasayfa()
Sheets("Ana Sayfa").Select
Range("A1").Select
End Sub
Kod:
Application.Goto Reference:=Worksheets(Sayfa).Range(h), scroll:=True
Bu komut sat�r�nda Sayfa ile gidilmek istenen sayfa ismi Sayfa1 gibi,
h ile de hangi h�creye gidilmek istendi�i belirtilmelidir.
�RNEK OLARAK A�A�IDAK� KOMUTU �NCELEY�N�Z.
Kod:
Application.Goto Reference:=Worksheets("Sayfa2").Range("AB30"), Scroll:=True
Bu komut istenilen butonun t�kland��� prosed�r�ne eklendi�inde g�zel �al�maktad�r.
ALPEN
Teknik Sorumlu
----------kod bitir------
----------kod basla------
Kod:
Compile Error :
can't find project or library
Kod:
Private Sub fiyat1_Change()
fiyat1.Value = Format(fiyat1, "###,###")
End Sub
Kod:
Compile Error :
can't find project or library
hatas� veriyor ve format� se�ili hale getiriyor.
Kod:
Private Sub fiyat1_Change()
fiyat1.Value = Format(fiyat1, "###,###")
ya hakkatten ayn� hatayla bende kar��la�t�m. daha sonra excel dosyas� salt okunur
a��ld� ve de�i�iklik izni vermedi. san�r�m ��kt�. farkl� kaydetten sonra yeni
kaydetti�im �al��yor. ve hata vermiyor.
----------kod bitir------
----------kod basla------
Sub aralama()
Dim deger As Variant
Dim deger1 As Variant
ba�:
deger = ActiveCell.Value
d�ng�:
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
deger1 = ActiveCell.Value
If deger <> deger1 Then
ActiveCell.EntireRow.Insert
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
GoTo ba�
End If
de�er = de�er1
If deger1 = "" Then Exit Sub
GoTo d�ng�
End Sub
Sub aralama()
Range("A2:C10").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Dim deger As Variant
Dim deger1 As Variant
ba�:
deg = 0
deger = ActiveCell.Value
d�ng�:
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
deger1 = ActiveCell.Value
satirno = ActiveCell.Row
deg = Cells(satirno - 1, 3).Value + deg
If deger <> deger1 Then
ActiveCell.EntireRow.Insert
Range("A1:C1").Copy
ActiveCell.PasteSpecial
Cells(satirno - 1, 4) = "TOPLAM:"
Cells(satirno - 1, 5) = deg
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
GoTo ba�
End If
de�er = de�er1
If deger1 = "" Then
Range(Cells(satirno - 2, 1), Cells(satirno - 2, 3)).Delete
GoTo 10
End If
GoTo d�ng�
10 End Sub
----------kod bitir------
----------kod basla------
Kod:
=SUMPRODUCT((A1:A100=Sheet1!A1)*C1:C100)+SUMPRODUCT((B1:B100=Sheet1!B1)*C1:C100)
t�rk�esi:
Kod:
=TOPLA.�ARPIM((A1:A100=Sayfa1!A1)*C1:C100)+TOPLA.�ARPIM((B1:B100=Sayfa1!
B1)*C1:C100)
Kod:
=A1&B1
formulunu yazarak formulu verilerin bulundu�u sat�rlar�n sonuna kadar D stununa
kopyalay�n
sayfa1 'e geri donerek C1 h�cresine
Kod:
=SUMIF(Sheet2!D1:D16;Sheet1!A1&Sheet1!B1;Sheet2!C1:C10)
----------kod bitir------
----------kod basla------
Kod:
=TEXT(AZ1;(A1-B1))-TEXT(AZ1;ROUNDUP(TEXT(AZ1;(A1-B1))/7;1))-D1
Kod:
=TEXT(AZ1;(A1-B1))-TEXT(AZ1;ROUNDUP(TEXT(AZ1;(A1-B1))/7;1))-D1
Ben bu kod olay�ndan pek bir�ey anlamad�m
muygun
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
Label1.Visible = False
ProgressBar1.Visible = False
End Sub
Kod:
Private Sub CommandButton1_Click()
ProgressBar1.Visible = True
Dim i As Integer
For i = 1 To 1000
ProgressBar1.Value = (i / 1000) * 100
Label1.Caption = Format(Int((i / 1000) * 100), "%0")
DoEvents
Next i
ProgressBar1.Visible = False
End Sub
Kod:
Next i
K�sm�ndan sonra sizin kodlar�n�z� yerle�tirirsiniz.
Raider'in G�zel Bir �rne�ide var.Onuda �ncelerseniz Daha iyi olur.
http://www.excel.web.tr/viewtopic.php?t=878
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
UserForm1.Label1.Caption = "L�tfen bekleyiniz....."
UserForm1.Show 0
CheckSave
End Sub
Kod:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode <> 1 Then Cancel = 1
End Sub
Kod:
Sub CheckSave()
DoEvents
UserForm1.Label1.Caption = "Dosya kaydedildi....."
Application.OnTime Now + TimeValue("00:00:03"), "RemForm"
End Sub
Kod:
Private Sub UserForm_Activate()
Me.SpecialEffect = fmSpecialEffectEtched
Label1.Caption = "L�tfen bekleyiniz....."
End Sub
Kod:
Sub TcmbGunlukKurlar()
UserForm1.Show 0
DoEvents
ActiveSheet.UsedRange.Clear
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.tcmb.gov.tr/kurlar/today.html", Destination:=Range("A6"))
.Name = "today"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
ActiveSheet.QueryTables(1).Delete
Call CheckData
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(A2="";"Bir Say� Giriniz.";A2*B1/A1)
Yadaa. Fonksiyon B�l�m� Ama Makro olarakda.
Sayfa1'de
Denetim Ara� Kutusu>De�i�tir D��mesi ekleyip �ift t�klay�n ve �u kodlar� yaz�n.
Kod:
Private Sub ToggleButton1_Click()
If Range("A1") = "" Then
soru = MsgBox("A1 H�cresini Bo� Ge�tiniz.Bo� Ge�erseniz Hesaplama Yap�lamaz.Devam
Edeyimmi?", vbYesNo, "A1 H�cresi Bo�!")
Range("A1").Select
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
If Range("A2") = "" Then
soru = MsgBox("A2 H�cresini Bo� Ge�tiniz.Devamm�?", vbYesNo, "A2 H�cresi Bo�!")
Range("A2").Select
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
devam:
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "Sil"
Range("b2") = Range("A2") * Range("b1") / Range("A1")
Else
ToggleButton1.Caption = "Y�zdesini Bul"
Range("A2").ClearContents
Range("b2").ClearContents
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
'Girilen de�er numerik de�ilse Textboxten ��k�� engelliyor, bu durumda bo�ta
olam�yor.
If IsNumeric(TextBox1.Value) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Option Explicit
'//
'// Dedicated to my Friend Colo
'// Some of the code from http://www.allapi.net
'// spec thanks to Joacim Andersson 29 July 2001
'// Amendments by Ivan F Moala 28 Sept 2002
'//
Private Const FTP_TRANSFER_TYPE_UNKNOWN = &H0
Private Const FTP_TRANSFER_TYPE_ASCII = &H1
Private Const FTP_TRANSFER_TYPE_BINARY = &H2
Private Const INTERNET_SERVICE_FTP = 1
Private Const INTERNET_SERVICE_GOPHER = 2
Private Const INTERNET_SERVICE_HTTP = 3
Private Const INTERNET_FLAG_PASSIVE = &H8000000 '// used for FTP
connections
Private Const INTERNET_OPEN_TYPE_PRECONFIG = 0 '// use registry configuration
.OnAction = "PasteValues"
End With
Application.MacroOptions Macro:="PasteValues", _
HasShortcutKey:=True, _
ShortcutKey:="Z"
Set MenuObject = Nothing
End Sub
Kod:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
ByVal Target As Range, Cancel As
Boolean)
Call CheckEnabled
End Sub
Kod:
Public cb As CommandBar
Public MenuObject As CommandBarControl
Public MyIndex
'
Sub Auto_Open()
Set cb = Application.CommandBars("Cell")
Set MenuObject = cb.Controls.Add(Type:=msoControlButton, Temporary:=False)
With MenuObject
.BeginGroup = True
.Caption = Application.CommandBars.FindControl(ID:=755).Caption &
GetCaptExt
.OnAction = "PasteValues"
.Tag = "PasteSpecialValuesTag"
MyIndex = .Index
End With
Application.MacroOptions Macro:="PasteValues", _
HasShortcutKey:=True, _
ShortcutKey:="Z"
Set MenuObject = Nothing
End Sub
Kod:
Sub ResetPopUpMenu()
Application.CommandBars("Cell").Reset
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_Open()
Sheets("Sayfa1").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
y$(0) = ""
y$(1) = "ON"
y$(2) = "Y�RM�"
y$(3) = "OTUZ"
y$(4) = "KIRK"
y$(5) = "ELL�"
y$(6) = "ALTMI�"
y$(7) = "YETM��"
y$(8) = "SEKSEN"
y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = "" Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) < Asc("0")) Then GoTo
hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
a$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�Z"
Else
e$ = b$(c(1)) + "Y�Z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "B�RB�N") Then e$ = "B�N"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "SIFIR"
If pozitif = 0 Then s$ = "" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "hata"
tamam:
End Function
ED�T:Kodlar Kod g�r�n�m�nde D�zenlenmi�tir.Mod.
xxrt
----------kod bitir------
----------kod basla------
Kod:
Sub ekle()
Selection.EntireRow.Insert
End Sub Daha Sonra Ara�lar>Makrolar� t�klay�n.Orada yaz�lan ekle makrosunu bir
kere t�klayarak En alt sa�k�edeki "�e�enekler"k�sm�ndan Ctr+Kutu i�ine istedi�iniz
k�sa yolu verebilirsiniz.Tabii bunu t�m excel sayfalar�nda kullanmak isterseniz
Farkl� kaydederek Excel eklentisi olarak kaydedip,A�aca��n�z bir excel bo�
sayfas�nda Eklentiler k�sm�ndan bu eklentiyi ekliyerek t�m �al�malar�n�zda
kullanabilirsiniz.
----------kod bitir------
----------kod basla------
Kod:
Sub kay()
Dim MyStr As String
Dim i As Integer, j As Integer, k As Double
With Sheets("Sayfa1")
For i = 1 To 10
MyStr = MyStr & .Cells(i, 1) & " " & .Cells(i, 2) & " "
Next
MyStr = WorksheetFunction.Rept(" ", 255 - Len(MyStr)) & MyStr
.Range("C1") = MyStr
Do
For j = 1 To Len(MyStr)
DoEvents
For k = 1 To 100000'Kayan Yaz� H�z�n� ayarlama
k = k + 1
Next
.Range("C1") = Mid(MyStr, j)
Next
Loop
End With
End Sub
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
kay
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub secili()
If TypeName(Selection) <> "Range" Then Exit Sub
For Each Cell In Selection
Cell.Replace What:=".", Replacement:=",", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Next Cell
End Sub
----------kod bitir------
----------kod basla------
Kod:
SELECT Left(" ",18-Len(Nz(cstr(format(liste.[no],"#,##0
YTL")),""))) & Nz(cstr(format(liste.[no],"#,##0 YTL")),"") AS sagadogru
FROM liste;
olarak de�i�tirin.
Edit :
Ekli dosyay� inceleyin
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
TextBox1.Value = (Val(TextBox2.Value) + Val(TextBox3.Value) +
Val(TextBox4.Value)) / 3
If TextBox1.Value = 100 Then
TextBox5.Value = 5
Exit Sub
End If
If TextBox1.Value = 90 Then
TextBox5.Value = 4
Exit Sub
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub sifirgizle()
Range("A1").Select
Do
deger = ActiveCell.Value
If deger = 0 Then
Selection.EntireRow.Hidden = True
End If
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
Loop Until deger = ""
End Sub
----------kod bitir------
----------kod basla------
Private Sub BarkodNo_AfterUpdate()
On Error GoTo Err_BarNkodo_AfterUpdate
Dim strFilter As String
strFilter = "BarkodNo = " & Me!BarkodNo
Me!BirimFiyat = DLookup("BirimFiyat", "�r�nler", strFilter)
Exit_BarkodNo_AfterUpdate:
Exit Sub
Err_BarkodNo_AfterUpdate:
MsgBox Err.Description
Resume Exit_BarkodNo_AfterUpdate
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Text0_LostFocus()
If IsDate(Text0) Then
Text2 = DateDiff("yyyy", Text0, Now)
Select Case CInt(Text2)
Case 0 To 1
Text4 = "0"
Case 5 To 9
Text4 = "1"
Case 10 To 14
Text4 = "2"
Case 15 To 19
Text4 = "3"
End Select
End If
End Sub
----------kod bitir------
----------kod basla------
Sub suz()
Range("I2050:M4050").ClearContents
a = 0
For c = 12 To 12 + WorksheetFunction.CountA(Sheets("sayfa1").Range("C12:C2010"))
If Cells(c, 10).Value >= [j8].Value And Cells(c, 10).Value <= [j9].Value Then
Range(Cells(c, 9), Cells(c, 13)).Copy
Cells(a + 2050, 9).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
a = a + 1
End If
Next c
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
userform1.show
End Sub
Private Sub ListBox1_Click()
Sheets(ListBox1.Value).Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub SpecialCellMenu()
Dim cb As CommandBar
Set cb = Application.CommandBars("Cell")
'
Set MenuObject = cb.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MenuObject.Caption = "Lovekiller Menu"
MenuObject.BeginGroup = True
'
With MenuObject
With .Controls.Add(Type:=msoControlButton, ID:=4)
.Visible = True
End With
End With
Set MenuObject = Nothing
End Sub
----------kod bitir------
----------kod basla------
Kod:
=MID(CELL("FileName";H1);FIND("]";CELL("FileName";H1))+1;98)
E�er bu formul �al�ma kitab�nda b�t�n sayfalarda ayn� h�creye yerle�tirmek
istenirse; mouse (fare) ile b�t�n sayfalar� se�in ve daha sonra diledi�iniz bir
h�creye t�klad�ktan sonra, yukar�daki formul� formul �ubu�una yap�t�r�n.
----------kod bitir------
----------kod basla------
Kod:
Sub PanZehir()
CommandBars("Cell").Reset
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function GetShadeColorInfo(Cell As Range)
Application.Volatile
GetShadeColorInfo = Cell.Interior.ColorIndex
End Function
Font rengi i�in:
Kod:
Function GetFontColorInfo(Cell As Range)
Application.Volatile
GetFontColorInfo = Cell.Font.ColorIndex
End Function
----------kod bitir------
----------kod basla------
Kod:
=RANK(VLOOKUP(C1;A1:B10;2;0);B1:B10;1)
----------kod bitir------
----------kod basla------
Kod:
=MAX(A1:A6)
----------kod bitir------
----------kod basla------
Kod:
=RANK(VLOOKUP(C1;A1:B10;2;0);B1:B10;0)
�o�alan:
Kod:
=RANK(VLOOKUP(C1;A1:B10;2;0);B1:B10;1)
----------kod bitir------
----------kod basla------
Kod:
Sub tt()
MsgBox"Denemedir"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
On Error Resume Next
ActiveSheet.Unprotect "�ifre"
Forumu
st = Selection.Row
kl = Selection.Column
If kl <> 1 And kl <> 2 Then Exit Sub
If kl = 1 Then
Cells(st - 1, kl + 2).Select
Cells(st - 1, kl + 2) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
If kl = 2 Then
Cells(st - 1, kl + 1).Select
Cells(st - 1, kl + 1) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
ActiveSheet.Protect "�ifre"
Application.ScreenUpdating = True
End Sub
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
On Error Resume Next
ActiveSheet.Unprotect "�ifre"
st = Selection.Row
kl = Selection.Column
If kl <> 1 And kl <> 6 Then ActiveSheet.Protect "�ifre": Exit Sub
If kl = 1 Then
Cells(st - 1, kl + 1).Select
Cells(st - 1, kl + 1) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
If kl = 6 Then
Cells(st - 1, kl + 1).Select
Cells(st - 1, kl + 1) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
ActiveSheet.Protect "�ifre"
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"
port'u a�. modem bulamazsan hata ver.
Kod:
On Error Resume Next
MSComm1.PortOpen = True
If Err Then
MsgBox "com3 m�sait de�il. ba�ka port deneyin"
End If
modeme 2435695 nolu telefonu aramas�n� s�yle
AT : modeme haz�r olmas�n� bir g�rev verece�ini belirtir.(attention)
DT : Dialtone arama tipinin tonlu olaca��n� s�yler
Kod:
MSComm1.Output = "ATDT2435695;" + vbCr
bu koddan sonra modem telefonu arar.
bundan sonra bir loop yard�m�yla
modemden d�nen yan�tlara bak�l�r.
e�er d�nen yan�t�n i�inde "OK" var ise kar�� taraf telefonu a�m� demektir.
Al�nt�:
Do
bekle = DoEvents()
If MSComm1.InBufferCount Then
gelen = gelen + MSComm1.Input
If InStr(gelen, "OK") Then
Beep
End If
End If
Loop
geli�tirilebilir.
2-3 sene �nce bu i� beni baya sarm�t�.
port �zerinden o�lumun uzaktan kumandal� arabas�n� biraz de�i�tirip bilgisayardan
bir programla y�netmekle filan u�ra�m�t�m.
e�er ilgileniyorsan�z.
http://www.elektronikhobi.com
http://www.elektronikhobi.com/icerik.asp?bolum_no=1
http://www.elektronikhobi.com/icerik.asp?bolum_no=3
ve forum i�in
http://www.elektronikhobi.com/forum/giris.asp
linkleri ho�unuza gidecektir.
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
With Sheets(1)
For i = 1 To Sheets.Count
Cells(i, 1) = Sheets(i).Name
.Hyperlinks.Add Anchor:=Cells(i, 1), _
Address:="", SubAddress:=Sheets(i).Name & "!A1"
Sheets(i).Range("A1") = Sheets(1).Name
Sheets(i).Hyperlinks.Add Anchor:=Sheets(i).Range("A1"), _
Address:="", SubAddress:=Sheets(1).Name & "!A1"
Next
End With
End Sub
----------kod bitir------
----------kod basla------
Kod:
=round(A1;2)
----------kod bitir------
----------kod basla------
Kod:
=COUNTIF(G12:G14;1)+COUNTIF(G18:G20;1)
----------kod bitir------
----------kod basla------
Kod:
c:\
cd\
cd deneme
copy *.xls c:\Yap
c:
Daha sonra bu notepad dosyas�n� Farkl� Kaydet ismine (Bir isim )H�zl�.bat
(Uzant�s�n� Bat yapman gerek)demen gerek.
C'de deneme adl� klas�r�n i�indeki t�m xls dosyalar c'de bulunan Yap adl� klas�re
kopyalan�r.
Olu�turdu�un bat dosyas�n� �al�t�rd���nda istedi�in olur.
Kod:
c:\
cd\
cd belgelerim
copy *.* d:\yedek\pazartes~1
cd\
c:\
cd belgelerim\personel~1
copy *.* d:\yedek\pazartes~1
cd\
c:\
cd belgelerim\say�m do~1
copy *.xls d:\yedek\pazartes~1
ECHO B�TT�
cd\
c:\
Bu arada dip not:Uzant�s� .bat olan ve g�venmedi�iniz dosyalar� a�may�n.
----------kod bitir------
----------kod basla------
Kod:
Sub s�z()
a = WorksheetFunction.CountA(Sheets("sayfa1").Range("B2:B65532"))
c = 0
For ara = 2 To a + 3
b = Mid(Cells(ara, 2), 1, 1)
If b = 8 Then
c = c + 1
Sheets("sayfa2").Cells(c, 1) = Cells(ara, 2)
Sheets("sayfa2").Cells(c, 2) = Cells(ara, 3)
Sheets("sayfa2").Cells(c, 3) = Cells(ara, 4)
Sheets("sayfa2").Cells(c, 4) = Cells(ara, 5)
Sheets("sayfa2").Cells(c, 5) = Cells(ara, 6)
End If
Next ara
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(VE(G�N(BUG�N())=G�N(A1)-2;AY(BUG�N())=AY(A1));"DO�UM G�N� YAKLA�TI";"")
----------kod bitir------
----------kod basla------
Kod:
TextBox1=Format(TextBox1,"#,###")
Program TextBox1 in i�eri�ini herhangi bir h�creye att��� zaman sayn�n s�f�rlar�n�
g�rem iyorum.
�rne�in TextBox1 e 1000000 olarak say� giriyorum. TextBox1 in i�eri�i
1,000,000 oluyor. Fakat bu exceldeki herhangi bir h�creye gaktar�ld��� zaman 1
olarak g�r�n�yor.
Bunun yazd���m �ekilde aktar�lmas�n� nas�l sa�layabilirim??
hamitcan
Kod:
=(SAAT(C1)*60+DAK�KA(C1))/60*40
----------kod bitir------
----------kod basla------
Kod:
ETOPLA([b]Sayfa1![/b]$B$2:$B$13;A2;Sayfa1!$F$2:$F$13
----------kod bitir------
----------kod basla------
Kod:
Sub tlcevir()
sayi = ActiveCell.Value
sayi = Round(sayi / 1000000, 2)
ActiveCell.Value = sayi
ActiveCell.NumberFormat = "0"" YTL "".##"" YKuru�"""
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Makro1()
Range("A1:C5").Select
ActiveSheet.ShowDataForm
End sub
Formu a�arken "Microsoft Excel bu komut i�in gereken s�tun etiketlerini hangi
listenin ya da se�imin i�erdi�ini belirleyemiyor" gibi bir uyar� ��k�yor ise �u
kodlar� deneyin.
Kod:
Sub Makro1()
Application.DisplayAlerts = False
Range("A1:C5").Select
ActiveSheet.ShowDataForm
Application.DisplayAlerts = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
=NSAT(TOPLA(A1:A2);2)
----------kod bitir------
----------kod basla------
Kod:
Option Explicit
'****************
' Main Function *
'****************
Function SpellNumber(ByVal MyNumber)
Dim Dollars, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' String representation of amount
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none
DecimalPlace = InStr(MyNumber, ".")
'Convert cents and set MyNumber to dollar amount
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Dollars
Case ""
Dollars = "No Dollars"
Case "One"
Dollars = "One Dollar"
Case Else
Dollars = Dollars & " Dollars"
End Select
Select Case Cents
Case ""
Cents = " and No Cents"
Case "One"
Cents = " and One Cent"
Case Else
Cents = " and " & Cents & " Cents"
End Select
SpellNumber = Dollars & Cents
End Function
'*******************************************
' Converts a number from 100-999 into text *
'*******************************************
Private Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
'Convert the hundreds place
If Mid(MyNumber, 1, 1) <> "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
'Convert the tens and ones place
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
'*********************************************
' Converts a number from 10 to 99 into text. *
'*********************************************
Private Function GetTens(TensText)
Dim Result As String
Result = "" 'null out the temporary function value
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19
Select Case Val(TensText)
Case 10: Result = "Ten"
Case 11: Result = "Eleven"
Case 12: Result = "Twelve"
Case 13: Result = "Thirteen"
Case 14: Result = "Fourteen"
Case 15: Result = "Fifteen"
Case 16: Result = "Sixteen"
Case 17: Result = "Seventeen"
Case 18: Result = "Eighteen"
Case 19: Result = "Nineteen"
Case Else
End Select
Else ' If value between 20-99
Select Case Val(Left(TensText, 1))
Case 2: Result = "Twenty "
Case 3: Result = "Thirty "
Case 4: Result = "Forty "
Case 5: Result = "Fifty "
Case 6: Result = "Sixty "
Case 7: Result = "Seventy "
Case 8: Result = "Eighty "
Case 9: Result = "Ninety "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) 'Retrieve ones place
End If
GetTens = Result
End Function
'*******************************************
' Converts a number from 1 to 9 into text. *
'*******************************************
Private Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
----------kod bitir------
----------kod basla------
Kod:
Sub �izelge()
Dim Tarih
Dim isim As String
Dim Son As Integer
Dim satir, sutun, i
Dim tarihalani As Range, isimalani As Range, tarih1 As Range, isim1 As Range
On Error Resume Next
Son = Sheets("sayfa2").Range("a65536").End(xlUp).Row
Set tarihalani = Sheets("sayfa2").Range("c1:ag1")
Set isimalani = Sheets("sayfa2").Range("a3:a" & Son + 15)
Tarih = Sheets("sayfa1").Range("A1").Value
For i = 13 To Sheets("sayfa1").Range("b65536").End(xlUp).Row
isim = Sheets("sayfa1").Range("B" & i).Value
Set tarih1 = tarihalani.Find(Tarih, lookat:=xlWhole)
Set isim1 = isimalani.Find(isim)
If tarih1 Is Nothing Then
MsgBox "Arad���n�z isim ve ya tarih bulunamad�.", vbCritical, "Arama
Sonucu."
Exit Sub
Else
sutun = tarih1.Column
satir = isim1.Row
Sheets("sayfa2").Cells(satir, sutun) = Sheets("sayfa1").Cells(i, 4)
End If
Next i
End Sub
Kod:
Sub �izelge()
Dim tarih As Date
Dim isim As String
Dim son As Integer
Dim satir, sutun, i As Integer
Dim tarihalani, isimalani, tarih1, isim1 As Range
On Error Resume Next
son = Sheets("sayfa1").Range("B65536").End(xlUp).Row 'sayfa1 ve B65536 olarak
de�i�tirdim.
Set tarihalani = Sheets("sayfa2").Range("d1:ah1")
Set isimalani = Sheets("sayfa2").Range("a3:a53")
tarih = Sheets("sayfa1").Range("B11").Value
For i = 17 To son
isim = Sheets("sayfa1").Range("B" & i).Value
Set tarih1 = tarihalani.Find(tarih)
Set isim1 = isimalani.Find(isim)
If tarih1 Is Nothing Then
MsgBox "Arad���n�z isim ve ya tarih bulunamad�.", vbCritical, "Arama Sonucu."
Exit Sub
Else:
sutun = tarih1.Column
satir = isim1.Row
Sheets("sayfa2").Cells(satir, sutun) = Sheets("sayfa1").Cells(i, 4)
End If
Next i
'Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub tekliflistele()
Application.ScreenUpdating = False
Application.CutCopyMode = True
Worksheets("teklif").Range("b6,j2000").ClearContents
j = 6
For i = 6 To 2000
If Worksheets("tekgir").Cells(i, 4) = True Then
Worksheets("teklif").Cells(j, 2) = Worksheets("tekgir").Cells(i, 2)
Worksheets("teklif").Cells(j, 3) = Worksheets("tekgir").Cells(i, 3)
Worksheets("tekgir").Range(Cells(i, 7), Cells(i, 13)).Copy
Worksheets("teklif").Cells(j, 4).PasteSpecial
j = j + 1
End If
Next i
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
=IF(N2+2>IF((IF(AND((MINUTE(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))*60+HOU
R(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+SECOND(VLOOKUP(J2&K2&a
mp;L2&O2;$A$2:$H$12;5;0)))
+30>=HOUR(M2)*60*60+MINUTE(M2)*60+SECOND(M2);MINUTE(VLOOKUP(J2&K2&L2&O2
;$A$2:$H$12;5;0))*60+HOUR(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+SE
COND(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))-
30<=HOUR(M2)*60*60+MINUTE(M2)*60+SECOND(M2));TRUE;FALSE))=TRUE;VLOOKUP(J2&K2&am
p;L2&O2;$A$2:$H$12;6;0);"hata")>N2-
2;VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;8;0);"hata")
Kod:
=E�ER(VE((DAK�KA(D��EYARA(J2&K2&L2&O2;$A$2:$H$12;5;0))*60+SAAT(D��EYARA
(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+SAN�YE(D��EYARA(J2&K2&L2&am
p;O2;$A$2:$H$12;5;0)))
+30>=SAAT(M2)*60*60+DAK�KA(M2)*60+SAN�YE(M2);DAK�KA(D��EYARA(J2&K2&L2&O
2;$A$2:$H$12;5;0))*60+SAAT(D��EYARA(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+
SAN�YE(D��EYARA(J2&K2&L2&O2;$A$2:$H$12;5;0))-
30<=SAAT(M2)*60*60+DAK�KA(M2)*60+SAN�YE(M2));E�ER(VE(D��EYARA((J2&K2&L2&
;O2);$A$2:$H$12;6;0)+2>=N2;D��EYARA((J2&K2&L2&O2);$A$2:$H$12;6;0)-
2<=N2);D��EYARA((J2&K2&L2&O2);$A$2:$H$12;8;0);"hata");YANLI�)
----------kod bitir------
----------kod basla------
Kod:
=E�ER(EHATALIYSA(ORTALAMA(C3:H3));"";ORTALAMA(C3:H3))
J3 H�cresine
Kod:
=E�ER(C3="";"";E�ER(I3>=84,45;5;E�ER(I3>=69,45;4;E�ER(I3>=54,45;3;E�ER(I3>=44,45;2;
1)))))
Q3 H�cresine
Kod:
=E�ER(EHATALIYSA(ORTALAMA(K3:P3));"";ORTALAMA(K3:P3))
R3 H�cresine
Kod:
=E�ER(K3="";"";E�ER(Q3>=84,45;5;E�ER(Q3>=69,45;4;E�ER(Q3>=54,45;3;E�ER(Q3>=44,45;2;
1)))))
S3 H�cresine;
Kod:
=E�ER(R3="";"";ORTALAMA(J3;R3))
Yaz�p a�a��ya s�r�kledi�inizde istediniz olacakt�r.
Dip Not: Bu arada H�crelerin i�indeki Karekterlerin Uzunlu�u kadar Aral�k
b�rakman�z gerekli.Aksi Takdirde Form�ller �al�sa Bile Girlen Rakamlar H�creye
s��m�yaca��ndan ## olarak G�r�nebilir.Bu Nedenle S�tun �izgisini �ift
T�klad���n�zda O H�creler Girilen Say�lar�n Geni�li�i Kadar A��lacakt�r.
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
End Sub �eklinde gelecektir.
Kod:
Private Sub CommandButton1_Click()
Form1.Hide
End Sub
Kod:
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub
Kod:
Private Sub Command1_Click()
Unload Form1
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$10" And Target.Value <> 0 Then
Range("C10").Value = Range("C10").Value + Range("A10").Value
End If
If Target.Address = "$B$10" And Target.Value <> 0 Then
Range("C10").Value = Range("C10").Value - Range("B10").Value
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
1. sayfadaki sat�rlar� silip �zerine kopyalad���m zaman #ba�v hatas� veriyor
Silme i�lemini nas�l yap�yorsunuz?
----------kod bitir------
----------kod basla------
Kod:
Sub bosluktire()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Value = "-"
End Sub
Kod:
Sub bosluktire()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Value = "-"
End Sub
Kod:
Sub BoslukTire2()
Selection.SpecialCells(xlCellTypeBlanks) = "-"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub WdMacro()
MsgBox "Word makro �al�t� !"
End Sub
Kod:
Sub XlWdTest()
MyFile = "C:\TestWd.doc"
WdMacroName = "WdMacro"
WdModName = "Module1"
If Dir(MyFile) = "" Then
MsgBox MyFile & " isimli dosya bulunamad� !", vbCritical
Exit Sub
End If
Set WdApp = CreateObject("Word.Application")
WdApp.Visible = True
WdApp.Documents.Open MyFile
WdApp.Run MacroName:=WdModName & "." & WdMacroName
WdApp.ActiveDocument.Close
WdApp.Quit
Set WdApp = Nothing
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub OptionButton1_Click()
Dim i As Integer
Dim j As Integer
Label1.Caption = ""
If Worksheets.Count = 1 Then Exit Sub
For i = 1 To Worksheets.Count
Sheets(i).Name = LCase(Sheets(i).Name)
For j = i + 1 To Worksheets.Count
If LCase(Worksheets(j).Name) < LCase(Worksheets(i).Name) Then
Worksheets(j).Move Before:=Worksheets(i)
End If
Next j
Next i
For i = 1 To Sheets.Count
If LCase(Sheets(i).Name) <> LCase("ana sayfa") _
And LCase(Sheets(i).Name) <> LCase("toplam") _
And LCase(Sheets(i).Name) <> LCase("stok") _
And LCase(Sheets(i).Name) <> LCase("kasa") _
And LCase(Sheets(i).Name) <> LCase("fatura") Then
ComboBox1.AddItem Sheets(i).Name
ComboBox2.AddItem Sheets(i).Name
End If
Next
Sheets("ana sayfa").Move Before:=Sheets(2)
End Sub
Kod:
Private Sub OptionButton1_Click()
Application.ScreenUpdating = False
'di�er kodlar�n�z
Application.ScreenUpdating = True
End Sub
Kod:
Worksheets.Add.Move after:=Worksheets(Worksheets.Count)
dolay�s� ile listeyi doldururken o isimli sayfalar�n�z� s�ralamaya ve s�naman�za
gerek kalmaz.. 6 (anasayfa,toplam,stok,kasa ve faturadan sonra) ba�latarak
Kod:
For i = 6 To Sheets.Count
ComboBox1.AddItem Sheets(i).Name
ComboBox2.AddItem Sheets(i).Name
next i
Bu sat�ra gerek varm�? bir olmas� m�mk�nm�?
If Worksheets.Count = 1 Then Exit Sub
Umar�m do�ru anlam� ve anlatm��md�r.
----------kod bitir------
----------kod basla------
Kod:
=VLOOKUP(F3;Tablo;G3+1)
Kod:
=D��EYARA(F3;Tablo!$A$2:$M$38;G3+1)
NOt:Form�l�n bulundu�u tabloda aylar rakam olarak,veri al�nacak tablodaki aylar
metin olarak yaz�lm�,her iki tablodada aylar�n rakam olarak tan�mlanmas� i�lemi
kolayla�t�racakt�r.
Kod:
=PAR�AAL(D��EYARA(F3;tablo;G3+1);1;7)
Kod:
=TEXT(VLOOKUP(F3;Tablo;G3+1);"0,00000")
Tabii, h�cre bi�imini gerek manuel olarak, gerekse fonksiyonla ayarlamak h�crelerde
gereksiz s�f�rlarla dolu kalabal�k bir g�r�nt� de getirir. Bu nedenle, g�r�nt�
sadeli�i a��s�ndan xxrt ' nin �nerdi�i yakla��m da g�zel.
Bu arada; xxrt ' nin �nerisine alternatif olarak (biraz uzun olmakla birlikte )
a�a��dakini de kullanabiliriz.
Kod:
=TEXT(VLOOKUP(F3;Tablo;G3+1);"0," & REPT(0;LEN(VLOOKUP(F3;Tablo;G3+1))-
FIND(",";VLOOKUP(F3;Tablo;G3+1))))
----------kod bitir------
----------kod basla------
Kod:
=IF(LEFT(B2)="";"";COUNTA($F$2:F2))
T�rk�e kar��l�klar�n� g�steren liste, forumda var.
----------kod bitir------
----------kod basla------
Kod:
Sub karekok()
sonuc = Sqr(Range("A1").Value)
MsgBox (sonuc)
End Sub
Kod:
Sub karekok()
sonuc = [a1] ^ (1 / 2)
MsgBox (sonuc)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Activate()
Range("A65536").Select
If InputBox("�ifre Gir?", "�ifre") = "123" Then
Range("A1").Select
Else
MsgBox ("�ifre Yanl�")
Sheets("Sayfa1").Select
End If
End Sub
Kod:
Sub Auto_Open()
[b]Sheets("Gizli Sayfa").Visible = True[/b]
End Sub
Kod:
Private Sub Worksheet_Activate()
Dim sifre
Dim durum
git:
sifre = Application.InputBox("L�tfen Kullan�c� Kodunu Giriniz", _
"Say�n ; " & Application.UserName, "�ifre")
If sifre = Empty Then Sheets("Di�erSayfa").Select
If sifre <> "�ifre" Then
durum = MsgBox("Girdi�iniz �ifre Yanl�t�r " _
& vbNewLine & "L�tfen doru �ifre giriniz." _
& vbNewLine & "Tekrar �ifre Girmek �stiyormusunuz", vbYesNo,
Application.UserName)
If durum = vbYes Then GoTo git
Else
MsgBox "�ifre Do�rudur.....!", vbInformation, Application.UserName
Exit Sub
End If
Sheets("Di�erSayfa").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function Gosterge(unvan, derece As String)
Dim mem1, mem2 As String
mem1 = "��retmen"
mem2 = "Memur"
If unvan = mem1 And derece = "1/1" Then Gosterge = 3200
If unvan = mem2 And derece = "1/1" Then Gosterge = 2200
...................................................................................
..
...................................................................................
..
...................................................................................
..
...................................................................................
....
...
.
.
End Function
Noktal� k�s�mlar� iste�iniz kadar ��o�altabilirsiniz...
----------kod bitir------
----------kod basla------
Kod:
Sheets("Sayfa1").Range("A65536").End(xlUp).Offset(1, 0).Select
Sayfa ve kolon bilgisini ihtiyac�n�za g�re de�i�tirerek kullanabilirsiniz.
Umar�m faydal� olur.
Kod:
Sub Cozum1()
Dim i As Integer
Set Sliste = Worksheets("liste")
For i = 2 To 30000
If Sliste.Range("A" & i).Value = Empty Then
Sliste.Range("A" & i).Value = ActiveCell.Value
Sliste.Range("B" & i).Value = ActiveCell.Offset(0, 1).Value
Exit Sub
End If
Next i
End Sub
Kod:
Sub Cozum2()
Dim iliste, satir As Integer
Dim hucre As Range
Set Sliste = Worksheets("liste")
For iliste = 2 To WorksheetFunction.CountA(Range("A1:A65000"))
For Each hucre In Range("A1:A65000").Cells
If hucre.Value = Empty Then
satir = hucre.Row - 1
GoTo cik
End If
Next hucre
cik:
If Sliste.Range("A" & iliste).Value = Empty Then
Sliste.Range("A" & iliste).Value = ActiveSheet.Cells(satir, 1).Value
Sliste.Range("B" & iliste).Value = ActiveSheet.Cells(satir, 2).Value
Exit Sub
End If
Next iliste
End Sub
----------kod bitir------
----------kod basla------
Kod:
=OFFSET($A$1;(COLUMN(C2)-3)*10;0)
C2 h�cresine yukar�daki form�l� yaz�p sa�a do�ru �ekerseniz istedi�iniz olur
gibi........
Kod:
=OFFSET($A$1;(COLUMN(C2)-3)*10;0)
ayn� kodda $1'in �n�ndeki $ i�aretini kald�rarak a�a�� do�ruda kopyalayabilirsiniz.
yani;
Kod:
=OFFSET($A1;(COLUMN(C2)-3)*10;0)
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
deger1 = Range("A2").Value
deger2 = Range("B2").Value
If deger1 = deger2 Then
makro1
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
=D��EYARA(A1;DOLAYLI("'[Book1]"&A2&".s�n�f'!$A$1:$F$300");2;0)
bu formulu istedi�iniz gibi A3 h�cresine kopyalad���n�zda iste�inizin
ger�ekle�ece�ini zannediyorum.
----------kod bitir------
----------kod basla------
Kod:
Worksheets(1).Cells(1, 1) = UCase(Worksheets(2).Cells(1, 1))
�eklinde ta�urken UCase bu i�i yapar
k���k karakterler i�inde LCase
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
'MATRAH
Sheets("�izelge").Select
Range("K11:L36").Select
Selection.Copy
Sheets("Matrah").Select
Range("C5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'BANKA L�STES�
Sheets("�izelge").Select
Range("K11:L36").Select
Selection.Copy
Sheets("Banka Listesi").Select
Range("C12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("�izelge").Select
Range("BD11:BD36").Select
Selection.Copy
Sheets("Banka Listesi").Select
Range("G12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'==================================================================================
'MATRAH B�L�M�
If Sheets("�izelge").Range("AY11") = "" Then
Else
Sheets("�izelge").Select
Range("AY11:AY36").Select
Selection.Copy
If Sheets("�izelge").Range("Q2") = "OCAK" Then
Sheets("Matrah").Select
Range("G5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "�UBAT" Then
Sheets("Matrah").Select
Range("J5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "MART" Then
Sheets("Matrah").Select
Range("M5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "N�SAN" Then
Sheets("Matrah").Select
Range("P5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "MAYIS" Then
Sheets("Matrah").Select
Range("S5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "HAZ�RAN" Then
Sheets("Matrah").Select
Range("V5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "TEMMUZ" Then
Sheets("Matrah").Select
Range("Z5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "A�USTOS" Then
Sheets("Matrah").Select
Range("AC5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "EYL�L" Then
Sheets("Matrah").Select
Range("AF5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "EK�M" Then
Sheets("Matrah").Select
Range("AI5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "KASIM" Then
Sheets("Matrah").Select
Range("AL5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "ARALIK" Then
Sheets("Matrah").Select
Range("AO5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End If
End If
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Sub LIST()
ISIM = Cells(10, 5)
Application.Goto Reference:=ISIM, _
scroll:=False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub FindExactMatch()
Dim MyStr As String, InfoMsg As String
Dim Rng1 As String, LookupValue As String
Dim MyQ As VbMsgBoxResult
Dim FoundRng As Variant
MyStr = Trim(Application.InputBox("Aranacak metni girin !", "Arama..."))
If Not MyStr = "False" Then
Set FoundRng = Cells.Find(MyStr, LookIn:=xlValues, LookAt:=xlPart)
If Not FoundRng Is Nothing Then
Rng1 = FoundRng.Address
FoundRng.Select
ResumeSub2:
If Right(FoundRng.Value, 1) <> " " Then LookupValue =
FoundRng.Value & " "
MyData = Split(LookupValue, " ", , vbTextCompare)
For i = LBound(MyData) To UBound(MyData)
If MyData(i) = MyStr Then
InfoMsg = "Aranan metin " & FoundRng.Address(False,
False) _
& " h�cresinde bulundu." _
& vbCrLf & vbCrLf & "Bulunan h�crenin
i�eri�i :" _
& vbCrLf & vbCrLf & FoundRng.Value &
vbCrLf _
& vbCrLf & "Aramaya devam etmek
istiyormusunuz ?"
ActiveCell.Interior.ColorIndex = 6
MyQ = MsgBox(InfoMsg, vbInformation + vbYesNo, "Arama
sonucu...")
If MyQ = vbYes Then GoTo ResumeSub1:
Exit Sub
End If
Next
Else
MsgBox "Aranan de�er bulunamad� !", vbInformation, "Arama sonucu..."
Exit Sub
End If
ResumeSub1:
Set FoundRng = Cells.FindNext(FoundRng)
If Rng1 = FoundRng.Address Then
MsgBox "Aranan de�erden ba�ka bulunamad� !", vbInformation, "Arama
sonucu..."
Exit Sub
End If
FoundRng.Select
GoTo ResumeSub2:
End If
Set FoundRng = Nothing
End Sub
Kod:
Sub Test()
ActiveSheet.UsedRange.Select
Application.CommandBars.FindControl(ID:=1849).Execute
ActiveCell.Interior.ColorIndex = 6
ActiveCell.Select
End Sub
Kod:
Sub Test2()
ActiveSheet.UsedRange.Select
Application.Dialogs(xlDialogFormulaFind).Show
ActiveCell.Interior.ColorIndex = 6
ActiveCell.Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub f�tt�rmayaazkald�()
If Beyin.Value=Bombo� The
Else
MsgBox"�inananay"
End Sub
----------kod bitir------
----------kod basla------
Kod:
.ExportFilename = "d:\j\excel\access\file.txt" 'required, existing file will be
overwritten unless AppendToFile is True
kendinize g�re de�i�tirin ve save edin sonra F5 tu�una bas�n.
File.txt dosyas�na, tablodaki verilerinizin aktar�ld���n� g�receksiniz.
kbirgul
----------kod bitir------
----------kod basla------
Kod:
1- �ablon kitab�n�zdaki t�m Sayfalar� se�in.
2- Header Footer penceresini a��n.
3- Left/Center/Right kutulardan hangisine istiyorsan�z &[Page] yaz�n ve
OK ile onaylay�n.
Sayfalar�n ��kt�s�n� al�rken yine birinci maddedeki gibi print edece�iniz sayfalar�
se�meniz ve �yle print etmeniz gerekiyor.
Aksi taktirde her sayfay� ba��ms�z print ederseniz her birinin sayfa numaras� 1
�eklinde g�r�l�r.
Sayg�lar�mla
----------kod bitir------
----------kod basla------
Kod:
Sub arabul()
ara = Application.InputBox(prompt:="Aranacak Veri?", Type:=3)
Range("A3:A341").Select
Selection.Find(What:=ara, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
satir = ActiveCell.Row
Range(Cells(satir, 2), Cells(satir, 8)).Select
Selection.Copy
Sheets("Sayfa1").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=True
End Sub
Kod:
LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows,
ifadesinde xlFormulas yerine xlValues yaz�n
Yani;
Kod:
LookIn:=xlValues, LookAt _
:=xlPart, SearchOrder:=xlByRows,
Kopyalama aral��� i�in a�a��daki sat�r kullan�l�yor.
Kod:
Range(Cells(satir, 2), Cells(satir, 8)).Select
Buradaki anlam ;
"2". yani B s�tunundan ba�lay�p,
"8". yani H s�tununa kadar olan h�creleri se�.
H yerine daha fazla sut�n vermek isterseniz ikinci de�eri de�eri buna g�re
artt�r�n.
Umar�m Olmu�tur.
Sayg�lar
Kod:
Range(Cells(satir+1, 2), Cells(satir+1, 8)).Select
Ancak baz� sat�rlarda birle�tirme var, baz�lar�nda birle�tirme yoksa, buna bir
��z�m �u an i�in akl�ma gelmiyor.
ilk yaz�n�zda;
Al�nt�:
haziran 2004 sayfas�ndaki a3:a341 h�creleri aras�nda bulunan X h�cresini bulup
sa��nda bulunan ( b3:h341) aras�ndaki h�creleri aynen kopyalay�p sayfa 1 deki a2
h�crtesine alt alta yazan makro
�eklinde yazd���n�z i�in ben aranan de�erin bir defa aranaca�� yap�da haz�rlad�m.
A S�tununda bir den fazla aranan deger bulundu�unda bunlar� di�er sayfaya nas�l
atacak?
Her bir sat�r�n bilgisini yukar�dan a��ya ve her bir sat�r�n verisini ayr� bir
kolona yanyanam�?
----------kod bitir------
----------kod basla------
Kod:
=IF(WEEKDAY(B2;2)>4;B2+(8-WEEKDAY(B2;2));B2+1)
T�rk�e Versiyonu =
Kod:
=E�ER(HAFTANING�N�(B2;2)>4;B2+(8-HAFTANING�N�(B2;2));B2+1)
Deneme sonucunu bildirirseniz memnun olurum.
----------kod bitir------
----------kod basla------
Kod:
=E�ER($D$1=B1;A1;"")
ve a�a��ya kadar s�r�kleyin.
E1 H�cresinede �unlar� yaz�n;
Kod:
=B�RLE�T�R(C1;C2;C3;C4;C5;C6;C7;C8;C9;C10;C11;C12;C13)
Ben 13 kadar yazd�m.Siz Uzatabilirsiniz.Yaln�z Bu form�l� uzatmay�n.
----------kod bitir------
----------kod basla------
Kod:
=SUMPRODUCT((Sheet1!A1:A25=A1)*(Sheet1!B1:B25>=B1)*(Sheet1!B1:B25<=C1)*(Sheet1!
C1:C25))
Yukar�daki Sheet1 sayfa ad�n� kendi �al�mana g�re de�i�tir, e�er Turk�e XL
kullan�yorsan, SUMPRODUCT yerine TOPLA.�ARPIM yaz.
nazerd
----------kod bitir------
----------kod basla------
Kod:
Sub kapat()
ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
Kod:
Public Function alpenikoruilerdelaz�molurnemelaz�m()
alpenikoruilerdelaz�molurnemelaz�m= "evet ak�am i�ten ��kar ��kmaz bize geldi"
& _
"sabaha kadar program yazd�k. sabaha kar�� masada uyuyup kalm�." & _
"r�yas�nda seni �ok sevdi�ini say�kl�yordu"
End Function
----------kod bitir------
----------kod basla------
Kod:
Sub tt()
Dim i, say1, say2 As Integer
Dim hucre As Range
say1 = WorksheetFunction.CountA(Range("B2:b3000"))
say2 = WorksheetFunction.CountA(Range("A2:A3000")) + 1
Range("A1:A" & say2).AdvancedFilter Action:=xlFilterCopy,
CopyToRange:=Range("B1"), Unique:=True
For i = 1 To say1
For Each hucre In Range("A2:A" & say2)
If Cells(i + 1, "B") = hucre Then
End If
Next hucre
Next i
For i = 1 To say1
Next i
End Sub
Kod:
If InStr(1, Trim(Cells(i, 1)), deg) >= 1 Then
----------kod bitir------
----------kod basla------
Kod:
=IF(COUNTIF(Veri!$A$1:$F$1;B2);"I";"")
Kod:
=IF(COUNTIF(Veri!$A$5:$F$5;B2);"I";"")
Yard�mlar�n�z i�in te�ekk�rler..
----------kod bitir------
----------kod basla------
Kod:
=E�ER(A14="";"";D��EYARA(A14;Sayfa2!$A$2:$G$1374;2;YANLI�))
Sayfa1 D14 H�cresine �u Fonksiyonu Yaz�n.
Kod:
=E�ER(C14="";"";E�ER(A14="";"";D��EYARA(A14;Sayfa2!$A$2:$G$1374;7;YANLI�)))
Sayfa1 E14 H�cresine �u Fonksiyonu Yaz�n.
Kod:
=E�ER(C14="";"";E�ER(EHATALIYSA(D14*C14);"";(D14*C14)))
Fonksiyon olarak Girdi�iniz T�m H�creleri.A�a��ya �teleyin.Yani H�crenin Sa� alt
k�esine Maousla geldi�inizde + �areti olu�acak,bununla A�a��ya s�r�kleyin.
Daha sonra A14 H�cresine Girece�iniz kod numaralar� istedi�inizi verecektir..
�nemli olan bir konudaha Var Yukar�daki form�ll� h�creleri korumala� yaparsan�z
form�lca��zlar�n�za zarar gelmez..Yani H�creleri kilitleyin..
----------kod bitir------
----------kod basla------
Kod:
Sub Test1()
Start = Timer
Do
DoEvents
Finnish = Timer
[a1] = Format(Finnish - Start, "00")
Loop While Finnish - Start <= 60
End Sub
Kod:
Sub Test2()
ResumeSub:
Start = Timer
Do
DoEvents
Finnish = Timer
[a1] = Format(Finnish - Start, "00")
Loop While Finnish - Start <= 60
GoTo ResumeSub:
End Sub
Kod:
On Error Resume Next?
ehehe
Kod:
Sub StartIt()
ID = SetTimer(0, 0, 1000, AddressOf RunMe)
MsgBox ID
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Open()
Dim cb As CommandBar
Set cb = Application.CommandBars("Cell")
Set MenuObject = cb.Controls.Add(Type:=msoControlButton, Temporary:=True)
With MenuObject
.BeginGroup = True
.Caption = Application.CommandBars.FindControl(ID:=755).Caption & " Values"
.OnAction = "PasteValues"
End With
Application.MacroOptions Macro:="PasteValues", _
HasShortcutKey:=True, _
ShortcutKey:="Z"
Set MenuObject = Nothing
End Sub
Kod:
Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As Object, _
ByVal Target As Range, Cancel As
Boolean)
Call CheckEnabled
End Sub
Kod:
Public cb As CommandBar
Public MenuObject As CommandBarControl
Public MyIndex
'
Sub Auto_Open()
Set cb = Application.CommandBars("Cell")
Set MenuObject = cb.Controls.Add(Type:=msoControlButton, Temporary:=False)
With MenuObject
.BeginGroup = True
.Caption = Application.CommandBars.FindControl(ID:=755).Caption &
GetCaptExt
.OnAction = "PasteValues"
.Tag = "PasteSpecialValuesTag"
MyIndex = .Index
End With
Application.MacroOptions Macro:="PasteValues", _
HasShortcutKey:=True, _
ShortcutKey:="Z"
Set MenuObject = Nothing
End Sub
Kod:
Sub ResetPopUpMenu()
Application.CommandBars("Cell").Reset
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("BURASI MAKROLAR KISMIYSA") > "Hay�r" Then
MsgBox "YANLI� YERE BAYRAMLA�TINIZ...HEHEH"
ElseIf Range("BURASI G�NDEM KONULAR KISMI �SE") = "" Then
MsgBox "HEP�N�Z�N BAYRAMI KUTLU OLSUN.Y�NE HEHEHE"
ElseIf Range("AMA G�NDEM KISIMA BAYRAM MESAJI YAZILDI �SE") = 0 Then
MsgBox "TEBR�KLER� ORAYA YAZALIM.."
Range("�Y� OLMADIMI").Select
Selection.ClearContents
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub kay()
Dim MyStr As String
Dim i As Integer, j As Integer, k As Double
With Sheets("Sayfa1")
For i = 1 To 10
MyStr = MyStr & .Cells(i, 1) & " " & .Cells(i, 2) & " "
Next
MyStr = WorksheetFunction.Rept(" ", 255 - Len(MyStr)) & MyStr
.Range("C1") = MyStr
Do
For j = 1 To Len(MyStr)
DoEvents
For k = 1 To 100000'Kayan Yaz� H�z�n� ayarlama
k = k + 1
Next
.Range("C1") = Mid(MyStr, j)
Next
Loop
End With
End Sub
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
kay
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
y$(0) = ""
y$(1) = "ON"
y$(2) = "Y�RM�"
y$(3) = "OTUZ"
y$(4) = "KIRK"
y$(5) = "ELL�"
y$(6) = "ALTMI�"
y$(7) = "YETM��"
y$(8) = "SEKSEN"
y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = "" Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) < Asc("0")) Then GoTo
hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
a$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�Z"
Else
e$ = b$(c(1)) + "Y�Z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "B�RB�N") Then e$ = "B�N"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "SIFIR"
If pozitif = 0 Then s$ = "" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "hata"
tamam:
End Function
ED�T:Kodlar Kod g�r�n�m�nde D�zenlenmi�tir.Mod.
xxrt
----------kod bitir------
----------kod basla------
Kod:
SELECT Left(" ",13-Len(Nz(liste.[no],""))) &
Nz(liste.[no],"") AS sagadogru
FROM liste;
�rne�i inceleyin.
----------kod bitir------
----------kod basla------
Kod:
Sub ekle()
Selection.EntireRow.Insert
End Sub Daha Sonra Ara�lar>Makrolar� t�klay�n.Orada yaz�lan ekle makrosunu bir
kere t�klayarak En alt sa�k�edeki "�e�enekler"k�sm�ndan Ctr+Kutu i�ine istedi�iniz
k�sa yolu verebilirsiniz.Tabii bunu t�m excel sayfalar�nda kullanmak isterseniz
Farkl� kaydederek Excel eklentisi olarak kaydedip,A�aca��n�z bir excel bo�
sayfas�nda Eklentiler k�sm�ndan bu eklentiyi ekliyerek t�m �al�malar�n�zda
kullanabilirsiniz.
----------kod bitir------
----------kod basla------
Kod:
Formun kodlar�na ekleyin:
Private Sub UserForm1_Initialize()
ListBox1.ColumnCount = 1
ListBox1.RowSource = "a1:a6"
ListBox1.ControlSource = "c1"
ListBox1.BoundColumn = 0
End Sub
Kod:
Sub formgoster()
UserForm1.Show
End Sub
Kod:
Private Sub CommandButton1_Click()
Dim x As Long
Dim satir As Integer
satir = 1
Range("C1:C6").ClearContents
For x = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(x) = True Then
Sheets("Sheet1").Cells(satir, 3) = ListBox1.List(x)
satir = satir + 1
End If
Next x
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
TextBox1.Value = (Val(TextBox2.Value) + Val(TextBox3.Value) +
Val(TextBox4.Value)) / 3
If TextBox1.Value = 100 Then
TextBox5.Value = 5
Exit Sub
End If
If TextBox1.Value = 90 Then
TextBox5.Value = 4
Exit Sub
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub secili()
If TypeName(Selection) <> "Range" Then Exit Sub
For Each Cell In Selection
Cell.Replace What:=".", Replacement:=",", LookAt:=xlPart, SearchOrder _
:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Next Cell
End Sub
----------kod bitir------
----------kod basla------
Private Sub BarkodNo_AfterUpdate()
On Error GoTo Err_BarNkodo_AfterUpdate
Dim strFilter As String
strFilter = "BarkodNo = " & Me!BarkodNo
Me!BirimFiyat = DLookup("BirimFiyat", "�r�nler", strFilter)
Exit_BarkodNo_AfterUpdate:
Exit Sub
Err_BarkodNo_AfterUpdate:
MsgBox Err.Description
Resume Exit_BarkodNo_AfterUpdate
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
End Sub
----------kod bitir------
----------kod basla------
Sub LIST()
ISIM = Cells(10, 5)
Application.Goto Reference:=ISIM, _
scroll:=False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
End Sub �eklinde gelecektir.
Kod:
Private Sub CommandButton1_Click()
Form1.Hide
End Sub
Kod:
Private Sub CommandButton1_Click()
Unload UserForm1
End Sub
Kod:
Private Sub Command1_Click()
Unload Form1
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Text0_LostFocus()
If IsDate(Text0) Then
Text2 = DateDiff("yyyy", Text0, Now)
Select Case CInt(Text2)
Case 0 To 1
Text4 = "0"
Case 5 To 9
Text4 = "1"
Case 10 To 14
Text4 = "2"
Case 15 To 19
Text4 = "3"
End Select
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
'Girilen de�er numerik de�ilse Textboxten ��k�� engelliyor, bu durumda bo�ta
olam�yor.
If IsNumeric(TextBox1.Value) Then
Cancel = False
Else
Cancel = True
Beep ' 'beep' sesi �retiyor
MsgBox ("Sadece say� girin!") ' Uyar� penceresi a��yor.
End If
End Sub
----------kod bitir------
----------kod basla------
Sub suz()
Range("I2050:M4050").ClearContents
a = 0
For c = 12 To 12 + WorksheetFunction.CountA(Sheets("sayfa1").Range("C12:C2010"))
If Cells(c, 10).Value >= [j8].Value And Cells(c, 10).Value <= [j9].Value Then
Range(Cells(c, 9), Cells(c, 13)).Copy
Cells(a + 2050, 9).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
a = a + 1
End If
Next c
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
userform1.show
End Sub
Private Sub ListBox1_Click()
Sheets(ListBox1.Value).Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
On Error Resume Next
ActiveSheet.Unprotect "�ifre"
Forumu
st = Selection.Row
kl = Selection.Column
If kl <> 1 And kl <> 2 Then Exit Sub
If kl = 1 Then
Cells(st - 1, kl + 2).Select
Cells(st - 1, kl + 2) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
If kl = 2 Then
Cells(st - 1, kl + 1).Select
Cells(st - 1, kl + 1) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
ActiveSheet.Protect "�ifre"
Application.ScreenUpdating = True
End Sub
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False
On Error Resume Next
ActiveSheet.Unprotect "�ifre"
st = Selection.Row
kl = Selection.Column
If kl <> 1 And kl <> 6 Then ActiveSheet.Protect "�ifre": Exit Sub
If kl = 1 Then
Cells(st - 1, kl + 1).Select
Cells(st - 1, kl + 1) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
If kl = 6 Then
Cells(st - 1, kl + 1).Select
Cells(st - 1, kl + 1) = Now()
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Cells(st, kl).Select
End If
ActiveSheet.Protect "�ifre"
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function GetShadeColorInfo(Cell As Range)
Application.Volatile
GetShadeColorInfo = Cell.Interior.ColorIndex
End Function
Font rengi i�in:
Kod:
Function GetFontColorInfo(Cell As Range)
Application.Volatile
GetFontColorInfo = Cell.Font.ColorIndex
End Function
----------kod bitir------
----------kod basla------
Sub gizle()
Rows("11:12").EntireRow.Hidden = True
Rows("14:15").EntireRow.Hidden = True
End Sub
Sub goster()
Rows("10:16").EntireRow.Hidden = False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "#,### TL")
End Sub
Kod:
Private Sub TextBox1_Change()
RefreshTxtBx
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Change()
RefreshTxtBx
End Sub
----------kod bitir------
----------kod basla------
Kod:
MSComm1.CommPort = 3
MSComm1.Settings = "9600,N,8,1"
port'u a�. modem bulamazsan hata ver.
Kod:
On Error Resume Next
MSComm1.PortOpen = True
If Err Then
MsgBox "com3 m�sait de�il. ba�ka port deneyin"
End If
modeme 2435695 nolu telefonu aramas�n� s�yle
AT : modeme haz�r olmas�n� bir g�rev verece�ini belirtir.(attention)
DT : Dialtone arama tipinin tonlu olaca��n� s�yler
Kod:
MSComm1.Output = "ATDT2435695;" + vbCr
bu koddan sonra modem telefonu arar.
bundan sonra bir loop yard�m�yla
modemden d�nen yan�tlara bak�l�r.
e�er d�nen yan�t�n i�inde "OK" var ise kar�� taraf telefonu a�m� demektir.
Al�nt�:
Do
bekle = DoEvents()
If MSComm1.InBufferCount Then
gelen = gelen + MSComm1.Input
If InStr(gelen, "OK") Then
Beep
End If
End If
Loop
geli�tirilebilir.
2-3 sene �nce bu i� beni baya sarm�t�.
port �zerinden o�lumun uzaktan kumandal� arabas�n� biraz de�i�tirip bilgisayardan
bir programla y�netmekle filan u�ra�m�t�m.
e�er ilgileniyorsan�z.
http://www.elektronikhobi.com
http://www.elektronikhobi.com/icerik.asp?bolum_no=1
http://www.elektronikhobi.com/icerik.asp?bolum_no=3
ve forum i�in
http://www.elektronikhobi.com/forum/giris.asp
linkleri ho�unuza gidecektir.
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
On Error GoTo ResumeSub:
x = Range("A2:A13").Cells.Find(TextBox1).Row
y = Range("B1:L1").Cells.Find(TextBox2).Column
Label1.Caption = Cells(x, y)
Exit Sub
ResumeSub:
Label1.Caption = "Deger bulunamadi...."
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Change()
Dim NoA As Long
Dim i As Integer
Dim Temp As String
ComboBox1.Clear
NoA = Cells(65536, 1).End(xlUp).Row
Temp = TextBox1
For i = 1 To NoA
If LCase(Left(Range("A" & i), Len(Temp))) = LCase(Temp) Then
ComboBox1.AddItem Range("A" & i)
End If
Next
End Sub
Kod:
Const SourcePath As String = "C:\"
Const SourceFile As String = "Test.xls"
Const SourceSheet As String = "Sheet1"
'
Private Sub UserForm_Initialize()
Dim MyComboArray()
Dim MyArg As String
Dim i As Integer, j As Integer
For i = 1 To 50
ReDim Preserve MyComboArray(i)
MyArg = "'" & SourcePath & "[" & SourceFile &
"]" & _
SourceSheet & "'!R" & i
MyComboArray(i) = ExecuteExcel4Macro(MyArg & "C1")
Next
For i = 1 To UBound(MyComboArray)
For j = i + 1 To UBound(MyComboArray) - 1
If MyComboArray(i) = MyComboArray(j) Then MyComboArray(i) = ""
Next
Next
For i = 1 To UBound(MyComboArray)
If MyComboArray(i) <> "" And MyComboArray(i) <> 0 Then
ComboBox1.AddItem MyComboArray(i)
End If
Next
Erase MyComboArray
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v$(15)
Dim c$(3)
b$(0) = ""
b$(1) = "B�R"
b$(2) = "�K�"
b$(3) = "��"
b$(4) = "D�RT"
b$(5) = "BE�"
b$(6) = "ALTI"
b$(7) = "YED�"
b$(8) = "SEK�Z"
b$(9) = "DOKUZ"
y$(0) = ""
y$(1) = "ON"
y$(2) = "Y�RM�"
y$(3) = "OTUZ"
y$(4) = "KIRK"
y$(5) = "ELL�"
y$(6) = "ALTMI�"
y$(7) = "YETM��"
y$(8) = "SEKSEN"
y$(9) = "DOKSAN"
m$(0) = "TRILYON"
m$(1) = "M�LYAR"
m$(2) = "M�LYON"
m$(3) = "B�N"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = "" Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) < Asc("0")) Then GoTo
hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
a$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�Z"
Else
e$ = b$(c(1)) + "Y�Z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "B�RB�N") Then e$ = "B�N"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "SIFIR"
If pozitif = 0 Then s$ = "" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "hata"
tamam:
End Function
----------kod bitir------
----------kod basla------
Kod:
Sub SpecialCellMenu()
Dim cb As CommandBar
Set cb = Application.CommandBars("Cell")
'
Set MenuObject = cb.Controls.Add(Type:=msoControlPopup, Temporary:=True)
MenuObject.Caption = "Lovekiller Menu"
MenuObject.BeginGroup = True
'
With MenuObject
With .Controls.Add(Type:=msoControlButton, ID:=4)
.Visible = True
End With
End With
Set MenuObject = Nothing
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target = "AHMET" Then
Run "Module1.Makro3"
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub sifirgizle()
Range("A1").Select
Do
deger = ActiveCell.Value
If deger = 0 Then
Selection.EntireRow.Hidden = True
End If
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
Loop Until deger = ""
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_Open()
Sheets("Sayfa1").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub PanZehir()
CommandBars("Cell").Reset
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub tt()
MsgBox"Denemedir"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub function a(x,y)
......
end function
�eklinde yazarak yeni bir fonksiyon kodlayabilirsiniz. "....." yazan yere yap�lacak
i�lem ile ilgili kodlar yaz�lmal�d�r. burada fonksiyonun ad� "a" d�r. x ve y ise
fonksiyonun parametreleridir. Bu parametreleri x,y,z,...�eklinde yazarak
artt�rabilirsiniz.
selamlar
Kod:
Sub NoktaliKontrol ()
Dim bolNoktaliMevcut As Boolean
For lngSayac = 1 To Len(strIsimKontrol)
Select Case Mid(strIsimKontrol, lngSayac, 1)
Case "i", "�", "�", "�", "�", "�"
bolNoktaliMevcut = True
End Select
Next lngSayac
End Sub
Kod:
Function Fonksiyon�smi (Bile�en Listesi) As VeriT�r�
' Komutlar
Fonksiyon�smi= Deger
End Function
Yukar�daki prosed�r �rne�ini kullanarak kullan�lan noktal� harfleri kontrol eden ve
sonucu geri d�nd�ren bir fonksiyon haz�rlayabiliriz. Bunun i�in yap�lmas� gereken
tek �ey prosed�r yerine fonksiyon tan�mlamas�d�r.
Kod:
Function NoktaliKontrol() As Boolean
Dim lngSayac As Long
For lngSayac = 1 To Len(strIsimKontrol)
Select Case Mid(strIsimKontrol, lngSayac, 1)
Case "i", "�", "�", "�", "�", "�"
NoktaliKontrol= True
Case Else
NoktaliKontrol = False
End Select
Next lngSayac
End Function
Aradaki k���k fakat �nemli farklara dikkat etmelisiniz:
� �lk olarak Sub yerine Function ve benzer �ekilde End Sub yerine de End Function
komutu kullan�lmal�d�r.
* Prosed�r ba�lang�c�ndaki fonksiyon ismi ve parantezi (Parametre olmad���
zamanlarda) "As Boolean" ifadesi takip eder. Bu, fonksiyondan geri d�nd�r�len
de�erin veri tipinin Boolean olaca��n� belirtir. Yani fonksiyon ismine sahip
de�i�ken bu veri tipindedir.
�* Bu de�i�ikliklerin yan�nda prosed�r i�erisinde de bir de�i�iklik yap�l�r ve geri
d�n� de�eri i�in fonksiyon ismi kullan�ld��� i�in NoktaliMevcut de�i�keni
NoktaliKontrol olarak de�i�tirilir. Fonksiyon ismi direkt olarak sorgu i�erisine
eklendi�i i�in art�k NoktaliMevcut ad�nda bir de�i�ken kullan�lmas�na gerek yoktur.
Kod:
�simKontrol= "�smail K�yl�"
If NoktaliKontrol= True Then
Fonksiyonun yap�s�nda IsimKontrol de�i�kenin strKontrol olarak de�i�tirilmesi
haricinde bir fark yoktur. Bo� parantezler yerine fonksiyona aktar�lacak olan t�m
parametreler tan�mlanm�lard�r. Parantez i�erisindeki Optional ifadesi bu
parametrenin kullan�lmak zorunda olunmad���n� belirtir.
----------kod bitir------
----------kod basla------
Kod:
=round(A1;2)
----------kod bitir------
----------kod basla------
Kod:
=COUNTIF(G12:G14;1)+COUNTIF(G18:G20;1)
----------kod bitir------
----------kod basla------
Kod:
=MID(CELL("FileName";H1);FIND("]";CELL("FileName";H1))+1;98)
E�er bu formul �al�ma kitab�nda b�t�n sayfalarda ayn� h�creye yerle�tirmek
istenirse; mouse (fare) ile b�t�n sayfalar� se�in ve daha sonra diledi�iniz bir
h�creye t�klad�ktan sonra, yukar�daki formul� formul �ubu�una yap�t�r�n.
----------kod bitir------
----------kod basla------
Kod:
c:\
cd\
cd deneme
copy *.xls c:\Yap
c:
Daha sonra bu notepad dosyas�n� Farkl� Kaydet ismine (Bir isim )H�zl�.bat
(Uzant�s�n� Bat yapman gerek)demen gerek.
C'de deneme adl� klas�r�n i�indeki t�m xls dosyalar c'de bulunan Yap adl� klas�re
kopyalan�r.
Olu�turdu�un bat dosyas�n� �al�t�rd���nda istedi�in olur.
Kod:
c:\
cd\
cd belgelerim
copy *.* d:\yedek\pazartes~1
cd\
c:\
cd belgelerim\personel~1
copy *.* d:\yedek\pazartes~1
cd\
c:\
cd belgelerim\say�m do~1
copy *.xls d:\yedek\pazartes~1
ECHO B�TT�
cd\
c:\
Bu arada dip not:Uzant�s� .bat olan ve g�venmedi�iniz dosyalar� a�may�n.
----------kod bitir------
----------kod basla------
visual basic kodu: Dim i As Integer
Dim z As Variant
For i = 1 To 3
i = i + 1
Next i
Select Case z
Case 5
Case 6
End Select
Do While i = 1
i = i + 1
Loop
If i= 1 Then
y= True
Else
y = False
End If
visual basic kodu: Private Sub Command2_Click()
sndplaysound "c:\windows\media\ringin.wav", sndplaysoundA
End Sub
visual basic kodu: Sub vergiiade_hesapla()
Dim a, tutar, iade As Integer
a = InputBox("tutar�n�z� girin")
If a > 5000 Then
iade = 5000 * 0.08
tutar = a - 5000
iade = iade + (tutar * 0.07)
Else
iade = a * 0.08
End If
MsgBox iade
End Sub
visual basic kodu: Dim sayfa As Integer
METE
----------kod bitir------
----------kod basla------
visual basic kodu: Sub renktest()
Dim deneme As String
deneme = "excel.web.tr g�mb�r g�mb�r"
MsgBox (deneme)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub s�z()
a = WorksheetFunction.CountA(Sheets("sayfa1").Range("B2:B65532"))
c = 0
For ara = 2 To a + 3
b = Mid(Cells(ara, 2), 1, 1)
If b = 8 Then
c = c + 1
Sheets("sayfa2").Cells(c, 1) = Cells(ara, 2)
Sheets("sayfa2").Cells(c, 2) = Cells(ara, 3)
Sheets("sayfa2").Cells(c, 3) = Cells(ara, 4)
Sheets("sayfa2").Cells(c, 4) = Cells(ara, 5)
Sheets("sayfa2").Cells(c, 5) = Cells(ara, 6)
End If
Next ara
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub g�ncelle()
ActiveWorkbook.UpdateLink Name:="C:\Belgelerim\Kitap3.xls"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Public Function ParaCevir(Para)
Dim ParaStr As String
Dim Lira As String, Kurus As String
If Not IsNumeric(Para) Then GoTo SayiDegil
ParaStr = Format(Abs(Para), "0.00")
Lira = Left(ParaStr, Len(ParaStr) - 3)
Kurus = Right(ParaStr, 2)
If Lira = 0 Then
ParaCevir = Cevir(Kurus) & " Kuru�"
Exit Function
End If
If Kurus = 0 Then
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " Lira"
Exit Function
End If
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " Lira " &
Cevir(Kurus) & " Kuru�"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
----------kod bitir------
----------kod basla------
Kod:
=RANK(VLOOKUP(C1;A1:B10;2;0);B1:B10;0)
�o�alan:
Kod:
=RANK(VLOOKUP(C1;A1:B10;2;0);B1:B10;1)
----------kod bitir------
----------kod basla------
Kod:
=E�ER(VE(G�N(BUG�N())=G�N(A1)-2;AY(BUG�N())=AY(A1));"DO�UM G�N� YAKLA�TI";"")
----------kod bitir------
----------kod basla------
Kod:
=B1-A1
Kod:
=(SAAT(C1)*60+DAK�KA(C1))/60*40
----------kod bitir------
----------kod basla------
Kod:
=RANK(VLOOKUP(C1;A1:B10;2;0);B1:B10;1)
----------kod bitir------
----------kod basla------
Kod:
=D��EYARA(A1;Sayfa2!$A$1:$B$7;1;YANLI�)
#YOK Hatas� verenler Yoktur..
----------kod bitir------
----------kod basla------
Kod:
=MAX(A1:A6)
----------kod bitir------
----------kod basla------
Private Sub Form_Current ()
........
End sub
diyoruz ya, i�te ben baska bi yerde yine Form_Current () iceren bi�eyler yazmaya
calisiyorum, hata veriyo.. �ak��yolar heralde..
Ayn� Private <->End aral�g�nda farkl� amaclarla baska baska kod gruplar� yazmak
mumkun olmuyo mu? yada 2 kere form_current diyemez miyiz?
Yani araya bi anahtar koymak lazim sanki, ne yazmaliyim??
off 2003 EN
KoTiK
Office 2002 T�rk�e
-/-
madem bu kerre ma�lubuz
netsek, neylesek zaid.
gayr� uzatman s�z�.
mademki fetva bize aid
verin ki basak ba�r�na m�hr�m�z�...
reflection
* �n�mden Gitme Seni �zleyemeyebilirim. Arkamdan da Gelme Yol G�steremeyebilirim.
Yan�mda Y�r� ve Dostum Kal. Albert Almus
* Bir kur�un kaleme benzer hayat, tek eksik silgidir!!
----------kod bitir------
----------kod basla------
Kod:
=NSAT(TOPLA(A1:A2);2)
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
With Sheets(1)
For i = 1 To Sheets.Count
Cells(i, 1) = Sheets(i).Name
.Hyperlinks.Add Anchor:=Cells(i, 1), _
Address:="", SubAddress:=Sheets(i).Name & "!A1"
Sheets(i).Range("A1") = Sheets(1).Name
Sheets(i).Hyperlinks.Add Anchor:=Sheets(i).Range("A1"), _
Address:="", SubAddress:=Sheets(1).Name & "!A1"
Next
End With
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
a = WorksheetFunction.CountA(Sheets("sayfa1").Range("J13:J2500"))
say� = [f3].Value
topla = 0
For b = 13 To a + 13
If Cells(b, 10) > say� Then
topla = topla + Cells(b, 10)
End If
Next b
[a1] = topla
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub s�z()
Range("D: D").ClearContents
a = [c1]
c = 0
For b = 1 To WorksheetFunction.CountA(Sheets("sayfa1").Range("A:A"))
If Cells(b, 1) = [c1] Then
c = c + 1
Cells(c, 4) = Cells(b, 2)
End If
Next b
End Sub
visual basic kodu: Sub s�z()
Range("C:C").ClearContents
c = 0
For b = 3 To WorksheetFunction.CountA(Sheets("yevmiye").Range("C3:C65000"))
If Sheets("yevmiye").Cells(b, 3) = [a1] Then
c = c + 1
Cells(c+2, 3) = Sheets("yevmiye").Cells(b, 4).Value
End If
Next b
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(EHATALIYSA(ORTALAMA(C3:H3));"";ORTALAMA(C3:H3))
J3 H�cresine
Kod:
=E�ER(C3="";"";E�ER(I3>=84,45;5;E�ER(I3>=69,45;4;E�ER(I3>=54,45;3;E�ER(I3>=44,45;2;
1)))))
Q3 H�cresine
Kod:
=E�ER(EHATALIYSA(ORTALAMA(K3:P3));"";ORTALAMA(K3:P3))
R3 H�cresine
Kod:
=E�ER(K3="";"";E�ER(Q3>=84,45;5;E�ER(Q3>=69,45;4;E�ER(Q3>=54,45;3;E�ER(Q3>=44,45;2;
1)))))
S3 H�cresine;
Kod:
=E�ER(R3="";"";ORTALAMA(J3;R3))
Yaz�p a�a��ya s�r�kledi�inizde istediniz olacakt�r.
Dip Not: Bu arada H�crelerin i�indeki Karekterlerin Uzunlu�u kadar Aral�k
b�rakman�z gerekli.Aksi Takdirde Form�ller �al�sa Bile Girlen Rakamlar H�creye
s��m�yaca��ndan ## olarak G�r�nebilir.Bu Nedenle S�tun �izgisini �ift
T�klad���n�zda O H�creler Girilen Say�lar�n Geni�li�i Kadar A��lacakt�r.
----------kod bitir------
----------kod basla------
Kod:
Sub tekliflistele()
Application.ScreenUpdating = False
Application.CutCopyMode = True
Worksheets("teklif").Range("b6,j2000").ClearContents
j = 6
For i = 6 To 2000
If Worksheets("tekgir").Cells(i, 4) = True Then
Worksheets("teklif").Cells(j, 2) = Worksheets("tekgir").Cells(i, 2)
Worksheets("teklif").Cells(j, 3) = Worksheets("tekgir").Cells(i, 3)
Worksheets("tekgir").Range(Cells(i, 7), Cells(i, 13)).Copy
Worksheets("teklif").Cells(j, 4).PasteSpecial
j = j + 1
End If
Next i
Application.CutCopyMode = False
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
=IF(N2+2>IF((IF(AND((MINUTE(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))*60+HOU
R(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+SECOND(VLOOKUP(J2&K2&a
mp;L2&O2;$A$2:$H$12;5;0)))
+30>=HOUR(M2)*60*60+MINUTE(M2)*60+SECOND(M2);MINUTE(VLOOKUP(J2&K2&L2&O2
;$A$2:$H$12;5;0))*60+HOUR(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+SE
COND(VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;5;0))-
30<=HOUR(M2)*60*60+MINUTE(M2)*60+SECOND(M2));TRUE;FALSE))=TRUE;VLOOKUP(J2&K2&am
p;L2&O2;$A$2:$H$12;6;0);"hata")>N2-
2;VLOOKUP(J2&K2&L2&O2;$A$2:$H$12;8;0);"hata")
Kod:
=E�ER(VE((DAK�KA(D��EYARA(J2&K2&L2&O2;$A$2:$H$12;5;0))*60+SAAT(D��EYARA
(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+SAN�YE(D��EYARA(J2&K2&L2&am
p;O2;$A$2:$H$12;5;0)))
+30>=SAAT(M2)*60*60+DAK�KA(M2)*60+SAN�YE(M2);DAK�KA(D��EYARA(J2&K2&L2&O
2;$A$2:$H$12;5;0))*60+SAAT(D��EYARA(J2&K2&L2&O2;$A$2:$H$12;5;0))*60*60+
SAN�YE(D��EYARA(J2&K2&L2&O2;$A$2:$H$12;5;0))-
30<=SAAT(M2)*60*60+DAK�KA(M2)*60+SAN�YE(M2));E�ER(VE(D��EYARA((J2&K2&L2&
;O2);$A$2:$H$12;6;0)+2>=N2;D��EYARA((J2&K2&L2&O2);$A$2:$H$12;6;0)-
2<=N2);D��EYARA((J2&K2&L2&O2);$A$2:$H$12;8;0);"hata");YANLI�)
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$10" And Target.Value <> 0 Then
Range("C10").Value = Range("C10").Value + Range("A10").Value
End If
If Target.Address = "$B$10" And Target.Value <> 0 Then
Range("C10").Value = Range("C10").Value - Range("B10").Value
End If
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Auto_Open()
Alt_altaMen�_Hazirla ' A��l�ta Alt_altaMen�_Hazirla makrosunu �al�t�r�r.
'A��l�ta Men�y� ekler
Set x = Application.CommandBars("Worksheet Menu
Bar").Controls.Add(msoControlButton)
With x
.Style = msoButtonIconAndCaption
.Caption = "Men� Haz�rlama"
.OnAction = "Deneme1"
End With
End Sub
visual basic kodu: Sub Alt_altaMen�_Hazirla()
'Men� A��p Ba�l���n� Haz�rlar
Set x = Application.CommandBars(1).Controls.Add(msoControlPopup, 1, , , True)
x.Caption = "Ana Men�"
'1 Alt Men� Haz�rlar
Set a = x.Controls.Add(msoControlButton, , , , True)
a.Style = msoButtonIconAndCaption
a.Caption = "1.Alt Men�"
a.OnAction = "Makro1"
'2 Alt Men� Haz�rlar
Set b = x.Controls.Add(msoControlButton, , , , True)
b.Style = msoButtonIconAndCaption
b.Caption = "2.Alt Men�"
b.OnAction = "Makro2"
'Bu �ekilde �stedi�iniz kadar a�abilirsiniz.
'.......
'......
'...
End Sub
Sub Makro1()
MsgBox "1.Men� �al�t�"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Macro1()
'
' Macro1 Macro
' Macro recorded 25.01.2005 by Raider �
'
'
Range("A15:B15") = Array(15, 65)
Range("A15:B15").Copy
ActiveSheet.ChartObjects(1).Activate
With ActiveChart
.SeriesCollection.Paste xlColumns, False, True, False, True
With .SeriesCollection(2).Points.Item(1)
.MarkerForegroundColorIndex = 3
.MarkerSize = 20
.MarkerStyle = 5
.Select
End With
End With
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Kura_Sonuc()
For i = 1 To 15 'Kuraya Kat�lacak Ki�i say�s�
Randomize
MsgBox Int(Rnd(1) * 100) 'Kuraya Kat�lacak Ki�i Say�s�
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
TextBox1=Format(TextBox1,"#,###")
Program TextBox1 in i�eri�ini herhangi bir h�creye att��� zaman sayn�n s�f�rlar�n�
g�rem iyorum.
�rne�in TextBox1 e 1000000 olarak say� giriyorum. TextBox1 in i�eri�i
1,000,000 oluyor. Fakat bu exceldeki herhangi bir h�creye gaktar�ld��� zaman 1
olarak g�r�n�yor.
Bunun yazd���m �ekilde aktar�lmas�n� nas�l sa�layabilirim??
hamitcan
Kod:
=D��EYARA(F3;Tablo!$A$2:$M$38;G3+1)
NOt:Form�l�n bulundu�u tabloda aylar rakam olarak,veri al�nacak tablodaki aylar
metin olarak yaz�lm�,her iki tablodada aylar�n rakam olarak tan�mlanmas� i�lemi
kolayla�t�racakt�r.
Kod:
=PAR�AAL(D��EYARA(F3;tablo;G3+1);1;7)
Kod:
=TEXT(VLOOKUP(F3;Tablo;G3+1);"0,00000")
Tabii, h�cre bi�imini gerek manuel olarak, gerekse fonksiyonla ayarlamak h�crelerde
gereksiz s�f�rlarla dolu kalabal�k bir g�r�nt� de getirir. Bu nedenle, g�r�nt�
sadeli�i a��s�ndan xxrt ' nin �nerdi�i yakla��m da g�zel.
Bu arada; xxrt ' nin �nerisine alternatif olarak (biraz uzun olmakla birlikte )
a�a��dakini de kullanabiliriz.
Kod:
=TEXT(VLOOKUP(F3;Tablo;G3+1);"0," & REPT(0;LEN(VLOOKUP(F3;Tablo;G3+1))-
FIND(",";VLOOKUP(F3;Tablo;G3+1))))
----------kod bitir------
----------kod basla------
Kod:
Sub �izelge()
Dim Tarih
Dim isim As String
Dim Son As Integer
Dim satir, sutun, i
Dim tarihalani As Range, isimalani As Range, tarih1 As Range, isim1 As Range
On Error Resume Next
Son = Sheets("sayfa2").Range("a65536").End(xlUp).Row
Set tarihalani = Sheets("sayfa2").Range("c1:ag1")
Set isimalani = Sheets("sayfa2").Range("a3:a" & Son + 15)
Tarih = Sheets("sayfa1").Range("A1").Value
For i = 13 To Sheets("sayfa1").Range("b65536").End(xlUp).Row
isim = Sheets("sayfa1").Range("B" & i).Value
Set tarih1 = tarihalani.Find(Tarih, lookat:=xlWhole)
Set isim1 = isimalani.Find(isim)
If tarih1 Is Nothing Then
MsgBox "Arad���n�z isim ve ya tarih bulunamad�.", vbCritical, "Arama
Sonucu."
Exit Sub
Else
sutun = tarih1.Column
satir = isim1.Row
Sheets("sayfa2").Cells(satir, sutun) = Sheets("sayfa1").Cells(i, 4)
End If
Next i
End Sub
Kod:
Sub �izelge()
Dim tarih As Date
Dim isim As String
Dim son As Integer
Dim satir, sutun, i As Integer
Dim tarihalani, isimalani, tarih1, isim1 As Range
On Error Resume Next
son = Sheets("sayfa1").Range("B65536").End(xlUp).Row 'sayfa1 ve B65536 olarak
de�i�tirdim.
Set tarihalani = Sheets("sayfa2").Range("d1:ah1")
Set isimalani = Sheets("sayfa2").Range("a3:a53")
tarih = Sheets("sayfa1").Range("B11").Value
For i = 17 To son
isim = Sheets("sayfa1").Range("B" & i).Value
Set tarih1 = tarihalani.Find(tarih)
Set isim1 = isimalani.Find(isim)
If tarih1 Is Nothing Then
MsgBox "Arad���n�z isim ve ya tarih bulunamad�.", vbCritical, "Arama Sonucu."
Exit Sub
Else:
sutun = tarih1.Column
satir = isim1.Row
Sheets("sayfa2").Cells(satir, sutun) = Sheets("sayfa1").Cells(i, 4)
End If
Next i
'Range("A1").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
=IF(LEFT(B2)="";"";COUNTA($F$2:F2))
T�rk�e kar��l�klar�n� g�steren liste, forumda var.
----------kod bitir------
----------kod basla------
Kod:
Option Explicit
'****************
' Main Function *
'****************
Function SpellNumber(ByVal MyNumber)
Dim Dollars, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "
' String representation of amount
MyNumber = Trim(Str(MyNumber))
' Position of decimal place 0 if none
DecimalPlace = InStr(MyNumber, ".")
'Convert cents and set MyNumber to dollar amount
If DecimalPlace > 0 Then
Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & "00", 2))
MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
End If
Count = 1
Do While MyNumber <> ""
Temp = GetHundreds(Right(MyNumber, 3))
If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
If Len(MyNumber) > 3 Then
MyNumber = Left(MyNumber, Len(MyNumber) - 3)
Else
MyNumber = ""
End If
Count = Count + 1
Loop
Select Case Dollars
Case ""
Dollars = "No Dollars"
Case "One"
Dollars = "One Dollar"
Case Else
Dollars = Dollars & " Dollars"
End Select
Select Case Cents
Case ""
Cents = " and No Cents"
Case "One"
Cents = " and One Cent"
Case Else
Cents = " and " & Cents & " Cents"
End Select
SpellNumber = Dollars & Cents
End Function
'*******************************************
' Converts a number from 100-999 into text *
'*******************************************
Private Function GetHundreds(ByVal MyNumber)
Dim Result As String
If Val(MyNumber) = 0 Then Exit Function
MyNumber = Right("000" & MyNumber, 3)
'Convert the hundreds place
If Mid(MyNumber, 1, 1) <> "0" Then
Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
End If
'Convert the tens and ones place
If Mid(MyNumber, 2, 1) <> "0" Then
Result = Result & GetTens(Mid(MyNumber, 2))
Else
Result = Result & GetDigit(Mid(MyNumber, 3))
End If
GetHundreds = Result
End Function
'*********************************************
' Converts a number from 10 to 99 into text. *
'*********************************************
Private Function GetTens(TensText)
Dim Result As String
Result = "" 'null out the temporary function value
If Val(Left(TensText, 1)) = 1 Then ' If value between 10-19
Select Case Val(TensText)
Case 10: Result = "Ten"
Case 11: Result = "Eleven"
Case 12: Result = "Twelve"
Case 13: Result = "Thirteen"
Case 14: Result = "Fourteen"
Case 15: Result = "Fifteen"
Case 16: Result = "Sixteen"
Case 17: Result = "Seventeen"
Case 18: Result = "Eighteen"
Case 19: Result = "Nineteen"
Case Else
End Select
Else ' If value between 20-99
Select Case Val(Left(TensText, 1))
Case 2: Result = "Twenty "
Case 3: Result = "Thirty "
Case 4: Result = "Forty "
Case 5: Result = "Fifty "
Case 6: Result = "Sixty "
Case 7: Result = "Seventy "
Case 8: Result = "Eighty "
Case 9: Result = "Ninety "
Case Else
End Select
Result = Result & GetDigit _
(Right(TensText, 1)) 'Retrieve ones place
End If
GetTens = Result
End Function
'*******************************************
' Converts a number from 1 to 9 into text. *
'*******************************************
Private Function GetDigit(Digit)
Select Case Val(Digit)
Case 1: GetDigit = "One"
Case 2: GetDigit = "Two"
Case 3: GetDigit = "Three"
Case 4: GetDigit = "Four"
Case 5: GetDigit = "Five"
Case 6: GetDigit = "Six"
Case 7: GetDigit = "Seven"
Case 8: GetDigit = "Eight"
Case 9: GetDigit = "Nine"
Case Else: GetDigit = ""
End Select
End Function
----------kod bitir------
----------kod basla------
Kod:
=OFFSET($A$1;(COLUMN(C2)-3)*10;0)
C2 h�cresine yukar�daki form�l� yaz�p sa�a do�ru �ekerseniz istedi�iniz olur
gibi........
Kod:
=OFFSET($A$1;(COLUMN(C2)-3)*10;0)
ayn� kodda $1'in �n�ndeki $ i�aretini kald�rarak a�a�� do�ruda kopyalayabilirsiniz.
yani;
Kod:
=OFFSET($A1;(COLUMN(C2)-3)*10;0)
----------kod bitir------
----------kod basla------
Kod:
Sub Makro1()
Range("A1:C5").Select
ActiveSheet.ShowDataForm
End sub
Formu a�arken "Microsoft Excel bu komut i�in gereken s�tun etiketlerini hangi
listenin ya da se�imin i�erdi�ini belirleyemiyor" gibi bir uyar� ��k�yor ise �u
kodlar� deneyin.
Kod:
Sub Makro1()
Application.DisplayAlerts = False
Range("A1:C5").Select
ActiveSheet.ShowDataForm
Application.DisplayAlerts = True
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_Change(ByVal Target As Range)
Columns("H:K").NumberFormat = "0.00"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub bosluktire()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Value = "-"
End Sub
Kod:
Sub bosluktire()
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.Value = "-"
End Sub
Kod:
Sub BoslukTire2()
Selection.SpecialCells(xlCellTypeBlanks) = "-"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Test()
x = 0.236589
x = Format(x, "0.00")
MsgBox x
End Sub
visual basic kodu: Sub Test2()
x = 0.236589
x = Format(x, "0.00%")
MsgBox x
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub WdMacro()
MsgBox "Word makro �al�t� !"
End Sub
Kod:
Sub XlWdTest()
MyFile = "C:\TestWd.doc"
WdMacroName = "WdMacro"
WdModName = "Module1"
If Dir(MyFile) = "" Then
MsgBox MyFile & " isimli dosya bulunamad� !", vbCritical
Exit Sub
End If
Set WdApp = CreateObject("Word.Application")
WdApp.Visible = True
WdApp.Documents.Open MyFile
WdApp.Run MacroName:=WdModName & "." & WdMacroName
WdApp.ActiveDocument.Close
WdApp.Quit
Set WdApp = Nothing
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: For b = 1 To Workbooks.Count - 1
Cells(b, 1) = Workbooks(b).Sheets(1).[a1]
Next b
visual basic kodu: Sub GetData2()
Dim DataFile As String, MyFile As String, MyMsg As String
Dim i As Long, j As Long, MyRow As Long
Dim jj As Integer, k As Integer
Dim FileArray()
DataFile = ThisWorkbook.Name
Workbooks(DataFile).ActiveSheet.Cells.ClearContents
With Application.FileSearch
.LookIn = ThisWorkbook.Path
.Filename = "*.xls"
If .Execute(SortBy:=msoSortByFileName, _
SortOrder:=msoSortOrderAscending) > 0 Then
For i = 1 To .FoundFiles.Count
If Dir(.FoundFiles(i)) <> DataFile Then
j = j + 1
ReDim FileArray(j)
FileArray(j) = Dir(.FoundFiles(i))
MyFile = ThisWorkbook.Path &
Application.PathSeparator _
& FileArray(j)
MyRow = WorksheetFunction.CountA(Range("B:B"))
Application.ScreenUpdating = False
Workbooks.Open (MyFile)
MyMsg = MyMsg & vbCrLf & FileArray(j)
For jj = 2 To 32
For k = 2 To 28
Workbooks(DataFile). _
ActiveSheet.Cells(MyRow + jj,
k) = _
Workbooks(FileArray(j)). _
Sheets("Giri�").Cells(jj, k)
Next
Next
Workbooks(FileArray(j)).Close
Application.ScreenUpdating = True
End If
Next
End If
Application.ScreenUpdating = True
End With
MsgBox MyMsg & vbCrLf & "Dosyalar�ndan datalar al�nm�t�r !",
vbInformation, "Rapor"
End Sub
----------kod bitir------
----------kod basla------
Kod:
1. sayfadaki sat�rlar� silip �zerine kopyalad���m zaman #ba�v hatas� veriyor
Silme i�lemini nas�l yap�yorsunuz?
----------kod bitir------
----------kod basla------
Kod:
Sub sayfa_al ()
ChDir "C:\"
Workbooks.Open Filename:="C:\Bozuk kitab�n ad�n� yaz�n.xls"
Sheets("Sayfa1").Copy Before:=Workbooks("Sizin sayafay� alaca��n�z kitap ad�n�
yaz�n.xls").Sheets(1)
End Sub
----------kod bitir------
----------kod basla------
Kod:
=e�er(a1="";"";D�eyara(A1;A2:A1500;2;yanl�))
Bu form�l�n ba��na �u �ekildE ekle
Kod:
=A�A�IYUVARLA(e�er(a1="";"";D�eyara(A1;A2:A1500;2;yanl�));2)
Daha sonra H�crenin sa� alt k�esinde imlec + �ekline geldi�inde form�ller ayn� ise
a�a��ya s�r�kle..
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
hucreici = Len(ActiveCell.Value)
If hucreici > 0 Then
ActiveCell.Offset(1, 0).Select
End If
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub resimcagir()
ActiveSheet.Pictures.Insert([h6]).Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
=LEN(TRIM(B1))-LEN(SUBSTITUTE(B1;" ";""))+1
LEN >> UZUNLUK
TRIM >> KIRP
SUBSTITUTE >> YERLE�T�R
----------kod bitir------
----------kod basla------
visual basic kodu: Sub tarihler()
Range("A5:N65532").ClearContents 'burada K harfi N yap�ld�.
kayit = WorksheetFunction.CountA(Sheets("01").Range("A5:A65532"))
bastar = [a2].Value
bittar = [b2].Value
c = 0
For tarih = 5 To kayit + 5
tarihara = Sheets("01").Cells(tarih, 1).Value
If tarihara >= bastar And tarihara <= bittar Then
c = c + 1
For sut = 1 To 14 '11 say�s� 14 yap�ld�. 14.s�tun=N
Cells(c + 4, sut) = Sheets("01").Cells(tarih, sut).Value
Next sut
End If
Next tarih
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Test()
Set NewSh = Worksheets.Add(After:=Sheets(Sheets.Count))
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
'MATRAH
Sheets("�izelge").Select
Range("K11:L36").Select
Selection.Copy
Sheets("Matrah").Select
Range("C5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'BANKA L�STES�
Sheets("�izelge").Select
Range("K11:L36").Select
Selection.Copy
Sheets("Banka Listesi").Select
Range("C12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Sheets("�izelge").Select
Range("BD11:BD36").Select
Selection.Copy
Sheets("Banka Listesi").Select
Range("G12").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
'==================================================================================
'MATRAH B�L�M�
If Sheets("�izelge").Range("AY11") = "" Then
Else
Sheets("�izelge").Select
Range("AY11:AY36").Select
Selection.Copy
If Sheets("�izelge").Range("Q2") = "OCAK" Then
Sheets("Matrah").Select
Range("G5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "�UBAT" Then
Sheets("Matrah").Select
Range("J5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "MART" Then
Sheets("Matrah").Select
Range("M5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "N�SAN" Then
Sheets("Matrah").Select
Range("P5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "MAYIS" Then
Sheets("Matrah").Select
Range("S5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "HAZ�RAN" Then
Sheets("Matrah").Select
Range("V5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "TEMMUZ" Then
Sheets("Matrah").Select
Range("Z5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "A�USTOS" Then
Sheets("Matrah").Select
Range("AC5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "EYL�L" Then
Sheets("Matrah").Select
Range("AF5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "EK�M" Then
Sheets("Matrah").Select
Range("AI5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "KASIM" Then
Sheets("Matrah").Select
Range("AL5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ElseIf Sheets("�izelge").Range("Q2") = "ARALIK" Then
Sheets("Matrah").Select
Range("AO5").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End If
End If
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
Kod:
="....."&METNE�EV�R(BUG�N();"aa/yyyy")
Fakat kullan�c� i�in bu,kullan�� de�il;matbu evrak i�in...ok..
Sonu�:
...../02/2005
----------kod bitir------
----------kod basla------
visual basic kodu: Sub kaydet()
sat1 = Sheets("KAYIT_G�R").Cells(65536, 1).End(xlUp).Row
Sheets("KAYIT_G�R").Rows(sat1).Copy
sat2 = Sheets("ESAS").Cells(65536, 1).End(xlUp).Row
Sheets("ESAS").Rows(sat2 + 1).PasteSpecial
Application.CutCopyMode = False
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton2_Click()
Dim MyData As Range
Dim MyQ As VbMsgBoxResult
On Error GoTo NoData:
If Len(TextBox5) >= 1 Then
Set MyData = Columns("A").Find(TextBox5)
If Not MyData Is Nothing And LCase(TextBox5) = LCase(MyData) Then
TextBox1 = MyData.Value
TextBox2 = MyData.Offset(0, 1)
TextBox3 = MyData.Offset(0, 2)
TextBox4 = MyData.Offset(0, 3)
Else
NoData:
MsgBox "Aran�lan veri bulunamad� ..."
Exit Sub
On Error GoTo 0
End If
End If
MyQ = MsgBox(MyData & " kay�t�n� silmek istiyormusunuz ?", _
vbInformation + vbYesNo)
If MyQ = vbYes Then
Rows(MyData.Row).EntireRow.Delete
TextBox1.Text = Empty
TextBox2.Text = Empty
TextBox3.Text = Empty
TextBox4.Text = Empty
TextBox5.Text = Empty
End If
Set MyData = Nothing
End Sub
visual basic kodu: If MyQ = vbYes Then
Sheets("AKTARMA").Rows(MyData.Row - 1).EntireRow.Delete
Rows(MyData.Row).EntireRow.Delete
----------kod bitir------
----------kod basla------
Kod:
Sub karekok()
sonuc = Sqr(Range("A1").Value)
MsgBox (sonuc)
End Sub
Kod:
Sub karekok()
sonuc = [a1] ^ (1 / 2)
MsgBox (sonuc)
End Sub
----------kod bitir------
----------kod basla------
Kod:
=ETOPLA($A$1:$A$6;E�ER(VE(D1="a";E1="b");"a";"b");$B$1:$B$6)
----------kod bitir------
----------kod basla------
Kod:
Sub ADANOPARSELNO()
Range("B4:L" & Cells(65536, 1).End(xlUp).Row).Sort Key1:=Range("B4"),
Key2:=Range("c4")
Range("A1").Select
End Sub
Kod:
Sub kulananlar()
Worksheets("firma listesi").Range("liste").ClearContents 'liste isimli alan�
temizler, bu alan� istedi�iniz �ekilde yeniden tan�mlay�n
k = 8 'firma listesinde ka��nc� sayfadan itibaren yazmaya ba�layacak
For i = 9 To Cells(65536, 5).End(xlUp).Row
If Worksheets("firma kullan�m").Cells(i, 5) > 0 Then
Worksheets("firma listesi").Cells(k, 1) = k - 7
Worksheets("firma listesi").Cells(k, 2) = Cells(i, 2)
Worksheets("firma listesi").Cells(k, 3) = Cells(i, 3)
Worksheets("firma listesi").Cells(k, 4) = Cells(i, 4)
Worksheets("firma listesi").Cells(k, 5) = Cells(i, 7) 'eklenen sat�r1
Worksheets("firma listesi").Cells(k, 6) = Cells(i, 12) 'eklenen sat�r2
k = k + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function Gosterge(unvan, derece As String)
Dim mem1, mem2 As String
mem1 = "��retmen"
mem2 = "Memur"
If unvan = mem1 And derece = "1/1" Then Gosterge = 3200
If unvan = mem2 And derece = "1/1" Then Gosterge = 2200
...................................................................................
..
...................................................................................
..
...................................................................................
..
...................................................................................
....
...
.
.
End Function
Noktal� k�s�mlar� iste�iniz kadar ��o�altabilirsiniz...
----------kod bitir------
----------kod basla------
Sub Macro1()
Cells(1, 1) = Rnd(5)
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub sirala()
Range("B7:C65536").Sort Key1:=Range("C7")
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sheets("Sayfa1").Range("A65536").End(xlUp).Offset(1, 0).Select
Sayfa ve kolon bilgisini ihtiyac�n�za g�re de�i�tirerek kullanabilirsiniz.
Umar�m faydal� olur.
Kod:
Sub Cozum1()
Dim i As Integer
Set Sliste = Worksheets("liste")
For i = 2 To 30000
If Sliste.Range("A" & i).Value = Empty Then
Sliste.Range("A" & i).Value = ActiveCell.Value
Sliste.Range("B" & i).Value = ActiveCell.Offset(0, 1).Value
Exit Sub
End If
Next i
End Sub
Kod:
Sub Cozum2()
Dim iliste, satir As Integer
Dim hucre As Range
Set Sliste = Worksheets("liste")
For iliste = 2 To WorksheetFunction.CountA(Range("A1:A65000"))
For Each hucre In Range("A1:A65000").Cells
If hucre.Value = Empty Then
satir = hucre.Row - 1
GoTo cik
End If
Next hucre
cik:
If Sliste.Range("A" & iliste).Value = Empty Then
Sliste.Range("A" & iliste).Value = ActiveSheet.Cells(satir, 1).Value
Sliste.Range("B" & iliste).Value = ActiveSheet.Cells(satir, 2).Value
Exit Sub
End If
Next iliste
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Address = Cells(1, 1).Address Then
ActiveWindow.Zoom = 100
ElseIf ActiveCell.Address <> Cells(1, 1).Address Then
ActiveWindow.Zoom = 75
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sizden sonra sorulan soruya 9 dakikada 3 cevap verilince anlad�m ki sizin bu
sorunuzun cevab� ��le kolay de�il.
Kesir sorunuzu Umar�m do�ru anlam��md�r.
Resimdeki g�r�ld��� gibi kesir Hanesini se�tikten sonra>�ste�e uyarlamada ???
k�sm�n� de�i�tirip bu i�i yapabilirsiniz.
Yada
A2 H�creye 65784
A3 H�creye 458745 yaz�p,
A4 H�creye a�a��daki form�l� girin.(Ger�i bu basit ��z�m ama)
Kod:
=A3&"/"&A2
----------kod bitir------
----------kod basla------
Kod:
Private Sub OptionButton1_Click()
TextBox1.Value = Val(TextBox1.Value) + 1
MsgBox "1.se�ene�i" & " " & TextBox1.Value & " ki�i" & "-" & "
" & "2.se�ene�i" & " " & TextBox2.Value & " ki�i" & "-" &
" " & "3.se�ene�i" & " " & TextBox3.Value & " ki�i" & "-"
& " " & "4.se�ene�i" & " " & TextBox4.Value & " ki�i se�ti"
OptionButton1.Value = False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_Activate()
Range("A65536").Select
If InputBox("�ifre Gir?", "�ifre") = "123" Then
Range("A1").Select
Else
MsgBox ("�ifre Yanl�")
Sheets("Sayfa1").Select
End If
End Sub
Kod:
Sub Auto_Open()
[b]Sheets("Gizli Sayfa").Visible = True[/b]
End Sub
Kod:
Private Sub Worksheet_Activate()
Dim sifre
Dim durum
git:
sifre = Application.InputBox("L�tfen Kullan�c� Kodunu Giriniz", _
"Say�n ; " & Application.UserName, "�ifre")
If sifre = Empty Then Sheets("Di�erSayfa").Select
If sifre <> "�ifre" Then
durum = MsgBox("Girdi�iniz �ifre Yanl�t�r " _
& vbNewLine & "L�tfen doru �ifre giriniz." _
& vbNewLine & "Tekrar �ifre Girmek �stiyormusunuz", vbYesNo,
Application.UserName)
If durum = vbYes Then GoTo git
Else
MsgBox "�ifre Do�rudur.....!", vbInformation, Application.UserName
Exit Sub
End If
Sheets("Di�erSayfa").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
=D��EYARA(A1;DOLAYLI("'[Book1]"&A2&".s�n�f'!$A$1:$F$300");2;0)
bu formulu istedi�iniz gibi A3 h�cresine kopyalad���n�zda iste�inizin
ger�ekle�ece�ini zannediyorum.
----------kod bitir------
----------kod basla------
visual basic kodu: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
------------------------------------------------------
A| A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
B| B C D E F G H I J K L M N O P Q R S T U V W X Y Z A
C| C D E F G H I J K L M N O P Q R S T U V W X Y Z A B
D| D E F G H I J K L M N O P Q R S T U V W X Y Z A B C
E| E F G H I J K L M N O P Q R S T U V W X Y Z A B C D
F| F G H I J K L M N O P Q R S T U V W X Y Z A B C D E
G| G H I J K L M N O P Q R S T U V W X Y Z A B C D E F
H| H I J K L M N O P Q R S T U V W X Y Z A B C D E F G
I| I J K L M N O P Q R S T U V W X Y Z A B C D E F G H
J| J K L M N O P Q R S T U V W X Y Z A B C D E F G H I
K| K L M N O P Q R S T U V W X Y Z A B C D E F G H I J
L| L M N O P Q R S T U V W X Y Z A B C D E F G H I J K
M| M N O P Q R S T U V W X Y Z A B C D E F G H I J K L
N| N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
O| O P Q R S T U V W X Y Z A B C D E F G H I J K L M N
P| P Q R S T U V W X Y Z A B C D E F G H I J K L M N O
Q| Q R S T U V W X Y Z A B C D E F G H I J K L M N O P
R| R S T U V W X Y Z A B C D E F G H I J K L M N O P Q
S| S T U V W X Y Z A B C D E F G H I J K L M N O P Q R
T| T U V W X Y Z A B C D E F G H I J K L M N O P Q R S
U| U V W X Y Z A B C D E F G H I J K L M N O P Q R S T
V| V W X Y Z A B C D E F G H I J K L M N O P Q R S T U
W| W X Y Z A B C D E F G H I J K L M N O P Q R S T U V
X| X Y Z A B C D E F G H I J K L M N O P Q R S T U V W
Y| Y Z A B C D E F G H I J K L M N O P Q R S T U V W X
Z| Z A B C D E F G H I J K L M N O P Q R S T U V W X Y
herhangi bir metni �ifrelemek i�in ( mesela , "foruma hos geldiniz")
�lk �nce bo�luklar al�n�yor.
forumahosgeldiniz
daha sonra �ifrelemek ve �ifreyi ��zmek i�in bir anahtar kelime belirleniyor.
(mesela "sifre")
ve
"forumahosgeldiniz" in harf say�s� kadar sifre arkaarkaya yazd�r�l�yor.
Yani
visual basic kodu: forumahosgeldiniz
sifresifresifresi
daha sonrada tablomuzdan �ak�an harflerin matristeki de�erleri al�n�yor.
yani
f ve s i�in = x
o ve i i�in = w
.
.
.
.
.
en sonunda �ifreli bir metin ��k�yor.
Daha sonra �ifreyi ��zmek isteyen ki�i yukar�da yapt���m�z i�lemin tersini yapmas�
gerekiyor. (tabi �ifreyi ��zebilmek i�in anahtar kelimeyi bilmeniz gerekiyor)
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub ComboBox1_Click()
Range("A6:H65000").ClearContents
If ComboBox1.Value = "HEPSI" Then
c = 0
For A = 5 To 15000
If Sheets("EXPENS 05").Cells(A, 1) <> "" Then
c = c + 1
Sheets("RAPORLA").Cells(c + 5, 1) = Sheets("EXPENS 05").Cells(A, 1).Value
Sheets("RAPORLA").Cells(c + 5, 2) = Sheets("EXPENS 05").Cells(A, 2).Value
Sheets("RAPORLA").Cells(c + 5, 3) = Sheets("EXPENS 05").Cells(A, 3).Value
Sheets("RAPORLA").Cells(c + 5, 4) = Sheets("EXPENS 05").Cells(A, 4).Value
Sheets("RAPORLA").Cells(c + 5, 5) = Sheets("EXPENS 05").Cells(A, 5).Value
Sheets("RAPORLA").Cells(c + 5, 6) = Sheets("EXPENS 05").Cells(A, 6).Value
Sheets("RAPORLA").Cells(c + 5, 7) = Sheets("EXPENS 05").Cells(A, 7).Value
Sheets("RAPORLA").Cells(c + 5, 8) = Sheets("EXPENS 05").Cells(A, 8).Value
End If
Next A
Exit Sub
End If
combo = ComboBox1.Value * 1
c = 0
For A = 5 To 15000
If Sheets("EXPENS 05").Cells(A, 1).Value = combo And Sheets("EXPENS 05").Cells(A,
8) <> "" Then
c = c + 1
Sheets("RAPORLA").Cells(c + 5, 1) = Sheets("EXPENS 05").Cells(A, 1).Value
Sheets("RAPORLA").Cells(c + 5, 2) = Sheets("EXPENS 05").Cells(A, 2).Value
Sheets("RAPORLA").Cells(c + 5, 3) = Sheets("EXPENS 05").Cells(A, 3).Value
Sheets("RAPORLA").Cells(c + 5, 4) = Sheets("EXPENS 05").Cells(A, 4).Value
Sheets("RAPORLA").Cells(c + 5, 5) = Sheets("EXPENS 05").Cells(A, 5).Value
Sheets("RAPORLA").Cells(c + 5, 6) = Sheets("EXPENS 05").Cells(A, 6).Value
Sheets("RAPORLA").Cells(c + 5, 7) = Sheets("EXPENS 05").Cells(A, 7).Value
Sheets("RAPORLA").Cells(c + 5, 8) = Sheets("EXPENS 05").Cells(A, 8).Value
End If
Next A
End Sub
visual basic kodu: If Sheets("EXPENS 05").Cells(A, 1) <> "" Then
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
deger1 = Range("A2").Value
deger2 = Range("B2").Value
If deger1 = deger2 Then
makro1
End If
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("a1:a1000")) Is Nothing Then
a = Target.Value
Sheets("sheet1").Shapes(a).Copy
Range("c" & b).Select
ActiveSheet.Paste
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
b = Target.Row
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: If [k9]<=6600 Then [i9]*0,15
If [k9]<=([i9]+6600) Then ([k9]-6600)*0,20+([i9]-([k9]-6600))*0.15
If [k9]<=([i9]+15000 Then ([k9]-1500)*0,30+([i9]-([k9]-15000))*0,20
.
.
.
----------kod bitir------
----------kod basla------
Kod:
'Windows API function declaration
Private Declare Function PlaySound Lib "winmm.dll" _
Alias "PlaySoundA" (ByVal lpszName As String, _
ByVal hModule As Long, ByVal dwFlags As Long) As Long
Function Alarm(Cell, Condition)
Dim WAVFile As String
Const SND_ASYNC = &H1
Const SND_FILENAME = &H20000
On Error GoTo ErrHandler
If Evaluate(Cell.Value & Condition) Then
WAVFile = ThisWorkbook.Path & "\sound.wav" 'Edit this statement
Call PlaySound(WAVFile, 0&, SND_ASYNC Or SND_FILENAME)
Alarm = True
Exit Function
End If
ErrHandler:
Alarm = False
End Function
Kod:
=Alarm(A1;">=1000")
Kod:
Sub MultiEmail()
Dim OutApp As Outlook.Application
Dim NewMail As Outlook.MailItem
Dim noE As Integer, i As Integer
noE = Cells(65536, 5).End(xlUp).Row
For i = 1 To noE
If Cells(i, 5) = Date - 10 Then
Set OutApp = New Outlook.Application
Set NewMail = CreateItem(olMailItem)
With NewMail
.To = Cells(i, 6).Text
.Subject = "Deneme"
.Body = "Bu e-mail deneme amac�yla g�nderilmi�tir."
.Save
.Send
End With
Set NewMail = Nothing
Set OutApp = Nothing
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Arttir()
For satir = 2 To
WorkSheetFunction.CountA(Sheets(ActiveSheet.Name).[A1:A10000])
Sheets(ActiveSheet.Name).Cells(satir, 1) =
Sheets(ActiveSheet.Name).Cells(satir, 1) * 1,15
Next satir
End Sub
----------kod bitir------
----------kod basla------
Kod:
combobox1.RowSource = "Sayfa1!A1:A50"
Bence h�zl� cevap alabilmek i�in sorular�n�z� ilgili ba�l�klar�n alt�na yaz�n
----------kod bitir------
----------kod basla------
Kod:
=RIGHT(A1;LEN(A1)-FIND(" ";A1))
Belki bir g�n ad� da gerekebilir c1:
Kod:
=LEFT(A1;FIND(" ";A1)-1)
T�rk�eleri:
left:soldan
find:bul
right:sa�dan
len:uzunluk
Kod:
Private Sub CommandButton1_Click()
For i = 1 To 3
a = Trim(Cells(i, 1))
b = Len(a)
k = 0
For x = b To 1 Step -1
c = Mid(a, x, 1)
If c <> " " Then
k = k + 1
Else
Exit For
End If
Next x
Cells(i, 3) = Right(a, k)
Next i
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: If
Application.WorksheetFunction.CountIf(Sheets("profil").Range("olmayanlar"),
Sheets("profil")).Cells(d, 4) Then GoTo atla
visual basic kodu: If
Application.WorksheetFunction.CountIf(Sheets("profil").Range("olmayanlar"),
Sheets("profil")).Cells(d, 4) Then GoTo atla
visual basic kodu: If
Application.WorksheetFunction.CountIf(Sheets("profil").Range("olmayanlar"),
Sheets("profil")).Cells(d, 4)>0 Then GoTo atla
Kod:
If Application.WorksheetFunction.CountIf(Sheets("profil").Range("olmayanlar"),
Sheets("profil")).Cells(d, 4)>0 Then GoTo atla
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton2_Click()
Dim MyTxtBox As Control
For Each MyTxtBox In Me.Controls
If TypeName(MyTxtBox) = "TextBox" Then MyTxtBox = Empty
Next
End Sub
Kod:
For i=1 To 16
Controls("txt" & i) = Empty
Next i
----------kod bitir------
----------kod basla------
visual basic kodu: dddd
----------kod bitir------
----------kod basla------
Kod:
Private Sub Command0_Click()
On Error GoTo Err_Command0_Click
Dim oApp As Object
Set oApp = CreateObject("Excel.Application")
oApp.Visible = True
oApp.workbooks.Open "C:\Deneme.xls"
On Error Resume Next
oApp.UserControl = True
Exit_Command0_Click:
Exit Sub
Err_Command0_Click:
MsgBox Err.Description
Resume Exit_Command0_Click
End Sub
Kod:
oApp.Sheets("Sheet2").Select
oApp.Range("A5").Select
On Error Resume Next
'
'
----------kod bitir------
----------kod basla------
visual basic kodu: SonHucre(2, 5).Formula = "=SUM(e2:e" SonHucre.Row ")"
Kod:
SonHucre(2, 5).Formula = "=SUM(e2:e" SonHucre.Row ")"
visual basic kodu: SonHucre(2, 5).Formula = "=SUM(e2:e" & SonHucre.Row ")"
'veya
Sheets(combobox1 .Value).Cells(satd, 4) = "31/03/2005"
deneyin
memduh
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Row > 4 Then Cells(1, Target.Column + 1).Activate
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub topla_getir()
Dim sayfa As Worksheet
Dim sonsatir As Long
Dim son As Long
ilk = True
On Error Resume Next
For Each sayfa In ThisWorkbook.Worksheets
If sayfa.Name <> "�CMAL" And sayfa.Name <> "D�K�M" Then
If ilk = True Then
son = 2
ilk = False
Else
son = Worksheets("�CMAL").Cells.Find(What:="*",
After:=Worksheets("�CMAL").Range("A1"), Lookat:=xlPart, LookIn:=xlFormulas,
SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row
End If
sonsatir = sayfa.Cells.Find(What:="*", After:=sayfa.Range("A1"),
Lookat:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByRows,
SearchDirection:=xlPrevious, MatchCase:=False).Row
sayfa.Range(sayfa.Rows(3), sayfa.Rows(sonsatir)).Copy
Sheets("�CMAL").Cells(son + 1, "A")
End If
Next
End Sub
Kod:
Sub topla_getir()
Dim sy As Worksheet
Dim ss As Long
Dim sn As Long
i = True
On Error Resume Next
For Each sy In ThisWorkbook.Worksheets
If sy.Name <> �CMAL" And sy.Name <> "D�K�M" Then
If i = True Then
sn = 2
i = False
Else
sn = Worksheets("�CMAL").Cells.Find(What:="*",
After:=Worksheets("�CMAL").Range("A1"), Lookat:=xlPart, LookIn:=xlFormulas,
SearchOrder:=xlByRows, SearchDirection:=xlPrevious, MatchCase:=False).Row
End If
ss = sy.Cells.Find(What:="*", After:=sy.Range("A1"),
Lookat:=xlPart, LookIn:=xlFormulas, SearchOrder:=xlByRows,
SearchDirection:=xlPrevious, MatchCase:=False).Row
sy.Range(sy.Rows(3), sy.Rows(ss)).Copy Sheets("�CMAL").Cells(sn +
1, "A")
End If
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
Myfile = "C:\Test.xls"
MyForm = "C:\UserForm1.frm"
If Dir(Myfile) <> Empty And Dir(MyForm) <> Empty Then
Workbooks.Open Myfile
On Error GoTo ErrHandler:
Workbooks(Dir(Myfile)).VBProject.VBComponents.Import MyForm
Workbooks(Dir(Myfile)).Close SaveChanges:=True
MsgBox "�lem tamam !"
Exit Sub
Else
MsgBox Myfile & " ve " & MyForm & " dosyalar�n�n isimlerini ve
do�ru" _
& " yerle�tirildi�ini kontrol edin !"
Exit Sub
End If
ErrHandler:
Select Case Err.Number
Case 60061
MsgBox "Dosyada " & Dir(MyForm) & " zaten mevcut !"
Case Else
MsgBox Err.Number & vbCrLf & Err.Description
End Select
Workbooks(Dir(Myfile)).Close SaveChanges:=False
End Sub
----------kod bitir------
----------kod basla------
Kod:
=TEXT("01." & MONTH(E8)-1 & ".1900";"aaaaaa")
Kod:
=E8-38353
ve sonra B24 h�cresine se�erek men�deki format se�ene�inden cell'i se�in ekrana
gelen pencereden number sayfas�n� se�in ve sol k�s�mdaki en alt se�enek olan custom
se�ene�ini se�in ve type k�sm�na a�a��daki formulu kopyalay�n.Bu i�lemden sonra
istedi�iniz �zellik ger�ekle�mi� olacakt�r.
Kod:
[$-41F]aaaa;@
----------kod bitir------
----------kod basla------
Kod:
=YazYTL(A1)
Eksik taraflar� varsa bildirirsiniz.
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_open()
[b2] = Sheets(1).Name
End Sub Siz kendinize g�re ayarlars�n�z.
Kod:
Private Sub Worksheet_Activate()
gibi..
Sizin smilinize cevaben;
(Uslubun de�ildir ama,istisnalar kaideleri...hesab�)
Ben=/=
Siz==>
Ben var�m=
siz=/=
Kod:
Sub Auto_Open ()
[b2] = Sheets(1).Name
End Sub
Kod:
Private Sub Worksheet_Activate()
[b2] = Sheets(1).Name
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton1_Click()
Application.Visible = False
UserForm1.Show
End Sub
visual basic kodu: Private Sub UserForm_QueryClose(Cancel As Integer,
CloseMode As Integer)
Application.Visible = True
End
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Static EskiHucre As Range
If Target.Interior.ColorIndex <> xlColorIndexNone Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
Exit Sub
ElseIf Not EskiHucre Is Nothing Then
EskiHucre.Interior.ColorIndex = xlColorIndexNone
End If
Target.Interior.ColorIndex = 11
'11 lacivert
Set EskiHucre = Target
End Sub
----------kod bitir------
----------kod basla------
Kod:
http://by19fd.bay19.hotmail.msn.com/cgi-bin/tos?
ac=yes&unified=done&li=1&curmbox=F000000001&a=3a95b41e8ad40fe2a362b
ee4827517dc&_lang=tr
----------kod bitir------
----------kod basla------
visual basic kodu: Sub birlestir()
say = WorksheetFunction.CountA(Columns(1))
For a = 1 To say
Cells(a, 1) = Cells(a, 1).Value & " " & Cells(a, 2).Value
Next a
End Sub
visual basic kodu: Sub birlestir()
say = WorksheetFunction.CountA(Columns(1))
For a = 1 To say
Cells(a, 1) = Cells(a, 1).Value & " " & Cells(a, 2).Value
Cells(a,2).ClearContents
Next a
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_Change(ByVal Target As Range)
KAYIT1 = Application.CountA(Sheets("SAYFA2").Columns("A:A")) + 1
KAYIT2 = Application.CountA(Sheets("SAYFA2").Columns("B:B")) + 1
KAYIT3 = Application.CountA(Sheets("SAYFA2").Columns("C:C")) + 1
If Target = Cells(2, 1) Then
Sheets("SAYFA2").Cells(KAYIT1, 1) = Target
ElseIf Target = Cells(2, 2) Then
Sheets("SAYFA2").Cells(KAYIT2, 2) = Target
ElseIf Target = Cells(2, 3) Then
Sheets("SAYFA2").Cells(KAYIT3, 3) = Target
End If
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Kod:
=LARGE(A1:A5;2)
formul�, en y�ksek ikinci de�eri verir.
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Sheets("Sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton3_Click()
For s = 1 To 11
Controls("textbox" & s) = ""
Next s
TextBox5.SetFocus
End Sub
----------kod bitir------
----------kod basla------
Kod:
ActiveSheet.PrintPreview
' Veya ....
Sheets("Sheet1").PrintPreview
----------kod bitir------
----------kod basla------
visual basic kodu: Sub gizle()
Range("G:G,M:M").EntireColumn.Hidden = True
End Sub
visual basic kodu: Private Sub Workbook_BeforePrint(Cancel As Boolean)
Call gizle
Application.OnTime Now, "g�ster"
End Sub
visual basic kodu: Sub gizle()
Range("G:G,M:M").Font.ColorIndex = 2
End Sub
visual basic kodu: Sub beyaz()
Columns("G:M").Font.ColorIndex = 2
End Sub
visual basic kodu: Sub otomatik()
Columns("G:M").Font.ColorIndex = 0
End Sub
visual basic kodu: Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Sayfa1" Then Exit Sub
Call gizle
Application.OnTime Now, "g�ster"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub topla()
[c1] = [c1] + [b1]
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Name = [b2].Value
End Sub
visual basic kodu: Private Sub Workbook_SheetSelectionChange(ByVal Sh As
Object, ByVal Target As Range)
[b2] = ActiveSheet.Name
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_Change(ByVal Target As Range)
Rows([a1].Value).EntireRow.Hidden = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
<form method="POST" action="giris_sayfasi.htm"><INPUT TYPE ="button" VALUE="G�R��
YAPMAK ���N BURAYA TIKLAYINIZ!" size="20" style="width: 300; height: 30"
name="_G�R��"></form>
----------kod bitir------
----------kod basla------
Kod:
Sub arala()
karakter = Len(ActiveCell.Value)
deger = ActiveCell.Value
For i = 1 To karakter
parca = Mid(deger, i, 1)
yenideger = yenideger + parca + " "
Next
ActiveCell.Value = Trim(yenideger)
End Sub
Kod:
Sub Auto_Open()
Application.OnKey "{F11}", "arala"
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton6_Click()
Dim bak As Range
For Each bak In Range("B1:B" & WorksheetFunction.CountA(Range("B1:B65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(ComboBox1.Value, vbUpperCase) Then
bak.Select
TextBox1.Value = ActiveCell.Offset(0, -1).Value
TextBox2.Value = ActiveCell.Offset(0, 1).Value
TextBox3.Value = ActiveCell.Offset(0, 2).Value
Exit Sub
End If
Next bak
MsgBox "Arad���n�z isimde bir kay�t bulunamad�"
End Sub
Private Sub CommandButton1_Click()
Dim bak As Range
For Each bak In Range("a1:�v" & WorksheetFunction.CountA(Range("a1:�v65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(ComboBox1.Value, vbUpperCase) Then
bak.Select
Exit Sub
End If
Next bak
MsgBox "Arad���n�z isimde bir kay�t bulunamad�"
End Sub
----------kod bitir------
----------kod basla------
Kod:
=VLOOKUP(H6;A$6:D$21;MATCH(J6;B$6:D$6)+1)
----------kod bitir------
----------kod basla------
Kod:
=E�ER(B�Y�K(L328:AP328;1)>=F327;"KOMPLE
";"-")&E�ER(B�Y�K(L328:AP328;1)>=C327;"BAKIM ";"-")
Sorunun :
E�ER(B�Y�K(L328:AP328;1)>=F327;"KOMPLE ";"-")
bu form�l di�er form�l�n do�rulu�u sa�land���nda aktif olmas�n� sa�lamak istiyorum
----------kod bitir------
----------kod basla------
visual basic kodu: If TextBox3.Value > 0 Then
sonsat2 = Sheets("ZUNA").Cells(65536, 1).End(xlUp).Row + 1
Sheets("ZUNA").Cells(sonsat2, 1) = CDate(tarih)
Sheets("ZUNA").Cells(sonsat2, 3) = TextBox3.Value
Sheets("ZUNA").Range("A5:e2000").Sort Key1:=Sheets("ZUNA").Range("A5"),
Order1:=xlAscending 's�ralama
End If
visual basic kodu:
Private Sub CommandButton1_Click()
sonsat = Cells(65536, 1).End(xlUp).Row + 1
tarih = TextBox1.Value
tarih = Format(tarih, "dd/mm/yyyy")
Sheets("KEND").Cells(sonsat, 1) = CDate(tarih)
Sheets("KEND").Cells(sonsat, 3) = TextBox2.Value * 1
Sheets("KEND").Cells(sonsat, 4) = TextBox5.Value * 1
Sheets("KEND").Cells(sonsat, 5) = TextBox3.Value * 1
Sheets("KEND").Cells(sonsat, 6) = "=F" & sonsat - 1 & "+D" & sonsat
& "-E" & sonsat
If TextBox2.Value > 0 Then
Sheets("KEND").Cells(sonsat, 2) = "KEND ALM. G�R��"
Else
Sheets("KEND").Cells(sonsat, 2) = "KEND ALM. �IKI�"
End If
Range("A5:F2000").Sort Key1:=Range("A5"), Order1:=xlAscending 's�ralama
...................
visual basic kodu: Sheets("ZUNA").Cells(sonsat2, 5) = "=E" & sonsat2 - 1
& "+C" & sonsat2 & "-D" & sonsat2
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub UserForm_Initialize()
ComboBox1.ColumnCount = 6
ComboBox1.RowSource = "firma!h1:m1"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Range("a1").Interior.ColorIndex = 15 veya
Kod:
Range("a1").Interior.ColorIndex = 48
selections
----------kod bitir------
----------kod basla------
Private Sub ToggleButton1_Click()
'ALT TOPLAM ALMAK ���N
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "ALT TOPLAMI KALDIR"
ToggleButton1.BackColor = &H8080FF
Columns("A:C").Select
Selection.Subtotal GroupBy:=1, Function:=xlSum, TotalList:=Array(2, 3), _
Replace:=True, PageBreaks:=False, SummaryBelowData:=True
Columns("A:A").EntireColumn.AutoFit
Range("a20").Select
'ALT TOPLAMI KALDIRMAK ���N
Else
ToggleButton1.Caption = "ALT TOPLAM AL"
ToggleButton1.BackColor = &H80000004
Columns("A:C").Select
Selection.RemoveSubtotal
Range("C12").Select
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Function yaz$(sayi)
Dim b$(9)
Dim y$(9)
Dim m$(4)
Dim v(15)
Dim c(3)
b$(0) = ""
b$(1) = "Bir"
b$(2) = "�ki"
b$(3) = "��"
b$(4) = "D�rt"
b$(5) = "Be�"
b$(6) = "Alt�"
b$(7) = "Yedi"
b$(8) = "Sekiz"
b$(9) = "Dokuz"
y$(0) = ""
y$(1) = "On"
y$(2) = "Yirmi"
y$(3) = "Otuz"
y$(4) = "K�rk"
y$(5) = "Elli"
y$(6) = "Altm�"
y$(7) = "Yetmi�"
y$(8) = "Seksen"
y$(9) = "Doksan"
m$(0) = "Trilyon"
m$(1) = "Milyar"
m$(2) = "Milyon"
m$(3) = "Bin"
m$(4) = ""
a$ = Str(sayi)
If Left$(a$, 1) = " " Then pozitif = 1 Else pozitif = 0
a$ = Right$(a$, Len(a$) - 1)
For x = 1 To Len(a$)
If (Asc(Mid$(a$, x, 1)) > Asc("9")) Or (Asc(Mid$(a$, x, 1)) _
< Asc("0")) Then GoTo hata
Next x
If Len(a$) > 15 Then GoTo hata
a$ = String(15 - Len(a$), "0") + a$
For x = 1 To 15
v(x) = Val(Mid$(a$, x, 1))
Next x
s$ = ""
For x = 0 To 4
c(1) = v((x * 3) + 1)
c(2) = v((x * 3) + 2)
c(3) = v((x * 3) + 3)
If c(1) = 0 Then
e$ = ""
ElseIf c(1) = 1 Then
e$ = "Y�z"
Else
e$ = b$(c(1)) + "Y�z"
End If
e$ = e$ + y$(c(2)) + b$(c(3))
If e$ <> "" Then e$ = e$ + m$(x)
If (x = 3) And (e$ = "BirBin") Then e$ = "Bin"
s$ = s$ + e$
Next x
If s$ = "" Then s$ = "S�f�r"
If pozitif = 0 Then s$ = "Eksi" + s$
yaz$ = s$
GoTo tamam
hata: yaz$ = "Hata"
tamam:
End Function
Kod:
Public Function ParaCevir(Para)
Dim ParaStr As String
Dim Lira As String, Kurus As String
If Not IsNumeric(Para) Then GoTo SayiDegil
ParaStr = Format(Abs(Para), "0.00")
Lira = Left(ParaStr, Len(ParaStr) - 3)
Kurus = Right(ParaStr, 2)
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " Lira " &
Cevir(Kurus) & " Kuru�"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function Kodlar�n�z� ilave ettikten sonra
Kod:
=ParaCevir(A1) Fonksiyonunu herhangi bir h�creye yazd�ktan sonra A1 H�cresine
Mesela;1,256,630 lira yaz.Sonu�:
Kod:
Birmilyonikiy�zellialt�binalt�y�zotuz Lira S�f�r Kuru� Olacakt�r.Dahada
ilerletebilirsin.
Kod:
Public Function ParaCevir(Para)
Dim ParaStr As String
Dim Lira As String, Kurus As String
If Not IsNumeric(Para) Then GoTo SayiDegil
ParaStr = Format(Abs(Para), "0.00")
Lira = Left(ParaStr, Len(ParaStr) - 3)
Kurus = Right(ParaStr, 2)
ParaCevir = IIf(Para < 0, "Eksi ", "") & Cevir(Lira) & " Lira " &
Cevir(Kurus) & " Kuru�"
Exit Function
SayiDegil:
ParaCevir = "G�R�LEN DE�ER SAYI DE��L!"
End Function
Private Function Cevir(SayiStr As String) As String
Dim Rakam(15)
Dim c(3), Sonuc, e
Birler = Array("", "bir", "iki", "��", "d�rt", "be�", "alt�", "yedi", "sekiz",
"dokuz")
Onlar = Array("", "on", "yirmi", "otuz", "k�rk", "elli", "altm�", "yetmi�",
"seksen", "doksan")
Binler = Array("trilyon", "milyar", "milyon", "bin", "")
SayiStr = String(15 - Len(SayiStr), "0") + SayiStr
For i = 1 To 15
Rakam(i) = Val(Mid$(SayiStr, i, 1))
Next i
Sonuc = ""
For i = 0 To 4
c(1) = Rakam(i * 3 + 1)
c(2) = Rakam(i * 3 + 2)
c(3) = Rakam(i * 3 + 3)
If c(1) = 0 Then
e = ""
ElseIf c(1) = 1 Then
e = "y�z"
Else
e = Birler(c(1)) + "y�z"
End If
e = e + Onlar(c(2)) + Birler(c(3))
If e <> "" Then e = e + Binler(i)
If (i = 3) And (e = "birbin") Then e = "bin"
Sonuc = Sonuc + e
Next i
If Sonuc = "" Then Sonuc = "S�f�r"
Cevir = UCase(Mid(Sonuc, 1, 1)) + Mid(Sonuc, 2, Len(Sonuc) - 1)
End Function Kodlar�n�z� ilave ettikten sonra
Kod:
=ParaCevir(A1) Fonksiyonunu herhangi bir h�creye yazd�ktan sonra A1 H�cresine
Mesela;1,256,630 lira yaz.Sonu�:
----------kod bitir------
----------kod basla------
visual basic kodu: Sub auto_open()
[a1] = [a1] + 1
ActiveWorkbook.Save
End Sub
----------kod bitir------
----------kod basla------
Kod:
[URL=http://adres]Metin[/URL]
----------kod bitir------
----------kod basla------
visual basic kodu: alan = Sheets("firmabilgileri").Range("a1:x300")
sat�r� yerine
visual basic kodu: Set alan = Sheets("firmabilgileri").Range("a1:x300")
sat�r�n� kullan�n.
Tarihin yaz�ld��� textbox1'e a�a��daki kodu yazarsan�z tarih format�n�da ayarlam�
olursunuz.
visual basic kodu: Private Sub TextBox1_Exit(ByVal Cancel As
MSForms.ReturnBoolean)
TextBox1 = Format(TextBox1, "dd.mm.yyyy")
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub eksileritasi()
son = Cells(65536, 17).End(xlUp).Row
For i = 4 To son
If Cells(i, 17).Value < 0 Then
Range(Cells(i, 1), Cells(i, 17)).Copy
Worksheets("EKSI").Cells(Worksheets("EKSI").Cells(65536, 17).End(xlUp).Row + 1,
1).PasteSpecial
Range(Cells(i, 1), Cells(i, 17)).ClearContents
End If
Next i
Range("A4:Q65536").Select
Selection.Sort Key1:=Range("A4")
End Sub
----------kod bitir------
----------kod basla------
Kod:
x = split(cells(1, 1), chr(10))
for i = 0 To ubound(x)
cells(i+2,1) = x(i)
next i
edit
ka� tane olduklar�n� ��renmek i�in
msgbox (ubound(x) + 1)
edit 2
a1 deki say�lar� ay�r�r a2 ye toplamlar�n� a3 e ka� tane oldukar�n� yazar
Kod:
x = split(cells(1, 1), chr(10))
for i = 0 To ubound(x)
cells(2,1) = cells(2,1) + x(i)
next i
cells(3,1) = ubound(x) + 1
bir edit daha yaparsam kendi rekorumu egale edece�im.
----------kod bitir------
----------kod basla------
Kod:
Sub hesaplama()
zamoran�:
z = InputBox("Zam oran�n� giriniz ! Ondal�k k�sm� varsa virg�lle ay�r�n�z !")
If Not IsNumeric(z) Then GoTo zamoran�
Cells(1, 23) = (z + 100) / 100
End Sub
----------kod bitir------
----------kod basla------
Kod:
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal
lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Public Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal
hwnd As Long, ByVal nIndex As Long) As Long
Public Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As Long
bu koduda userform kod sayfas�na yerle�tirin.
Kod:
Private Sub UserForm_Activate()
Dim lngFormHwnd As Long
Dim lngFormStyle As Long
If Application.Version < 9 Then
lngFormHwnd = FindWindow("THUNDERXFRAME", Me.Caption)
Else
lngFormHwnd = FindWindow("THUNDERDFRAME", Me.Caption)
End If
lngFormStyle = GetWindowLong(lngFormHwnd, (-16))
lngFormStyle = lngFormStyle And Not &H800000
SetWindowLong lngFormHwnd, (-16), lngFormStyle
DrawMenuBar lngFormHwnd
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As
Range, Cancel As Boolean)
ozet = ActiveSheet.PivotTables("PivotTable1").PivotFields("b�lge").CurrentPage
ActiveSheet.PivotTables("PivotTable2").PivotFields("b�lge").CurrentPage = ozet
Cancel = True
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("grapor").Select
Range("A2:G65535").Select
Selection.AutoFilter
Selection.AutoFilter
Selection.AutoFilter 2, ComboBox1.Value
End Sub
Private Sub UserForm_Click()
ListBox1.ColumnHeads = True
ListBox1.ColumnCount = 4
ListBox1.RowSource = "a2:d65535" 'sadece suzulen ver�ler�n gorules�n� istiyorum mum
kunse
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Sil()
Dim x As Integer, degistir, sor As String
degistir = InputBox("De�i�tirilecek de�er", "")
sor = InputBox("Yeni de�er", "")
For x = 1 To Worksheets.Count
Sheets(x).Cells.Replace degistir, sor, xlPart, xlByRows
Next x
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
Select Case [a1].Value
Case 1
[a1] = "BEYAZ"
Case 2
[a1] = "S�YAH"
Case 3
[a1] = "MAV�"
.
.
.
End Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Mesaj As String
Mesaj = "Dosya " & Application.UserName & " taraf�ndan farkl� kaydedildi."
If SaveAsUI Then
x = Shell("NET SEND PC_Ad� " & Mesaj)
End If
End Sub
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then SendMsg
End Sub
Kod:
Sub SendMsg()
Dim FName As String
Dim FNo As Integer
Dim Msg As String, Txt As String, Who As String
Dim x
Msg = "Dosya birazdan farkli kaydedilecek ...."
Who = "raider"
FName = ThisWorkbook.Path & Application.PathSeparator &
"NetMsg.BAT"
FNo = FreeFile
Txt = "NET SEND " & Who & " " & Msg
Open FName For Output As #FNo
Print #FNo, Txt
Close #FNo
x = Shell(FName, 0)
Kill FName
End Sub
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then CreateShortcut
End Sub
Kod:
Sub CreateShortcut()
Dim WSscr As Object, NwShrtCut As Object
Dim MyFolder As String
Set WSscr = CreateObject("WScript.Shell")
MyFolder = "\\Raider\ortak\MyFolder\"
On Error Resume Next
If Len(Dir(MyFolder)) = 0 Then MkDir (MyFolder)
On Error GoTo 0
Set NwShrtCut = WSscr.CreateShortcut _
(MyFolder & Application.PathSeparator & _
ThisWorkbook.Name & ".lnk")
With NwShrtCut
.TargetPath = WSscr.ExpandEnvironmentStrings(ThisWorkbook.FullName)
.WorkingDirectory = WSscr.ExpandEnvironmentStrings(ThisWorkbook.Path)
.WindowStyle = 4
.IconLocation = WSscr.ExpandEnvironmentStrings _
(Application.Path & "\excel.exe , 0")
.Save
End With
Set WSscr = Nothing
Set NwShrtCut = Nothing
End Sub
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If SaveAsUI = True Then
Application.OnTime Now, "CreateShortcut"
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
Dim cbMenu As CommandBarControl, cbSubMenu As CommandBarControl
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:= _
False, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowInsertingColumns:=True, AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, AllowDeletingColumns:=True, _
AllowDeletingRows:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
'Ana men�ye men� ekler
Set cbMenu = Application.CommandBars(1).Controls.Add(msoControlPopup, , , , True)
With cbMenu
.Caption = "O T E K S"
.Width = 50
.Tag = "MyTag"
.BeginGroup = False
End With
'............................................................
If cbMenu Is Nothing Then Exit Sub
'Cari Hesap Kart�
Set cbSubMenu = cbMenu.Controls.Add(msoControlPopup, 1, , , True)
With cbSubMenu
.Caption = "Cari Hesap A�"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart A� ALICI..."
.OnAction = "firmaekle_al"
End With
With cbSubMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "Kart A� SATICI..."
.OnAction = "firmaekle_sat"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "SONU�..."
.OnAction = "sonu�_a�"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "BANKALAR..."
.OnAction = "BANKALAR_A�"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "�EKLER.."
.OnAction = "cekler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "ENVANTER... "
.OnAction = "envanter"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "L�STELER... "
.OnAction = "listeler"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "F�YAT L�STES�... "
.OnAction = "fiyat_list"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "A� ENVANTER... "
.OnAction = "A�_ENVANTER"
End With
With cbMenu.Controls.Add(msoControlButton, 1, , , True)
.Caption = "KASA..."
.OnAction = "A�_KASA"
End With
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
If TextBox1.Value <> "" Then
Sheets("Sayfa1").Activate
Cells(2, 2).Select
Do While ActiveCell.Value <> ""
ActiveCell.Offset(1, 0).Activate
Loop
ActiveCell.Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = TextBox2.Value
ActiveCell.Offset(0, 4).Value = TextBox3.Value
ActiveCell.Offset(0, 6).Value = TextBox4.Value
'Veyselemre'nin verdi�i kodla
Range("b34") = WorksheetFunction.Sum(Range("b2:b33"))
Range("d34") = WorksheetFunction.Sum(Range("d2:d33"))
Range("f34") = WorksheetFunction.Sum(Range("f2:f33"))
Range("h34") = WorksheetFunction.Sum(Range("h2:h33"))
Range("b35") = Range("b34") - Range("d34") + Range("h34") - Range("f34")
MsgBox [b35] & " Net Gelir"
End If
End Sub
----------kod bitir------
----------kod basla------
Sub MetreKare()
Dim B As String
B = ActiveCell
ActiveCell.FormulaR1C1 = B + "M2"
With ActiveCell.Characters((Len(B) + 2), Length:=1).Font
'With ActiveCell.Characters(Start:=2, Length:=1).Font
.Superscript = True
End With
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Test()
Dim NoA As Long, No As Long
Dim MyRng As Range
NoA = Cells(65536, 1).End(xlUp).Row
For Each MyRng In Range("A1:A" & NoA)
If MyRng.Interior.ColorIndex > 0 Then No = No + 1
Next
MsgBox "Renkli h�crelerin sayisi = " & No
End Sub
Kod:
Function CountColors(Alan As Range) As Long
Dim No As Long
Dim MyRng As Range
For Each MyRng In Alan
If MyRng.Interior.ColorIndex > 0 Then No = No + 1
Next
CountColors = No
End Function
Kod:
MsgBox MyRng.FormatConditions(1).Interior.ColorIndex
Kod:
Function CountColors(Alan As Range) As Long
Dim No As Long
Dim MyRng As Range
For Each MyRng In Alan
If MyRng.Interior.ColorIndex > 0 Then No = No + 1
Next
CountColors = No
End Function
[/quote]
Raider Slm ;
Peki bu renkli h�creleri bir yerde toplamak istersek yani filtreleme y�ntemi gibi o
zaman ne yapmam�z gerekecek ? Renkler kosullu. Makro bilmiyorum varsa baska bir
�neri l�tfen . Tesekk�rler .
----------kod bitir------
----------kod basla------
Kod:
Range("A1:Z1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Worksheets("GenelRapor").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:= _
xlNone, SkipBlanks:=False, Transpose:=False
Range("D:D,H:H,K:K,M:M,O:O,P:W,X:X").Select
Range("X1").Activate
Selection.Delete Shift:=xlToLeft
----------kod bitir------
----------kod basla------
visual basic kodu:
Private Sub ComboBox1_Change()
c = 0
For s = 2 To 4
a = WorksheetFunction.CountA(Sheets(s).Range("B4:B100"))
For ara = 1 To a + 4
b = Sheets(s).Cells(ara, 2).Value
If b = ComboBox1.Value Then
c = c + 1
TextBox1 = Sheets(s).Cells(ara, 3).Value
TextBox2 = Sheets(s).Cells(ara, 4).Value
TextBox3 = Sheets(s).Cells(ara, 5).Value
TextBox4 = Sheets(s).Cells(ara, 6).Value
TextBox5 = Sheets(s).Cells(ara, 7).Value
End If
Next ara
Next s
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub UserForm_Initialize()
For a = 1 To Cells(65536, 1).End(xlUp).Row
If WorksheetFunction.CountIf(Range("A1:A" & a), Cells(a, 1).Value) = 1 Then
=IF(B3>79;"A";IF(AND(B3>59;B3<80);"B";IF(AND(B3>39;B3<60);"C";IF(AND(B3>19;B3<40);"
D";"E"))))&IF(AND(B3>89;81>B3>70;61>B3>50;41>B3>30;21>B3>10);"+";IF(AND(85>B3>7
9;65>B3>59;45>B3>39;25>B3>19;B3>6);" -";""))
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("$a$101")) Is Nothing Then Exit Sub
Range("B1").Select
End Sub
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = 101 Then
Cells(1, ActiveCell.Column + 1).Select
End If
End Sub
----------kod bitir------
----------kod basla------
Sub Auto_Open()
If AddIns("��z�c� Eklentisi").Installed = True Then
Application.SendKeys ("%ac")
Application.SendKeys ("%{F4}")
Else
Application.SendKeys ("%ae")
AddIns("��z�c� Eklentisi").Installed = True
Application.SendKeys ("{ENTER}")
Application.SendKeys ("%ac")
Application.SendKeys ("%{F4}")
End If
End Sub
----------kod bitir------
----------kod basla------
Sub al()
On Error Resume Next
bul = Cells(1, 1)
Workbooks.Open "C:\a.xls"
For i = 1 To Sheets.Count
Sheets(i).Activate
a = Cells.Find(What:=bul, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True, SearchFormat:=False).Activate
If a = "" Then GoTo yeniden:
yeniden:
If a <> "" Then GoTo yeniden2:
Next
yeniden2:
adres = ActiveCell.Offset(0, 1).Value
sayfa = ActiveSheet.Name
ActiveWorkbook.Close
MsgBox adres + Chr(13) + sayfa
End Sub
Sub al()
On Error Resume Next
Workbooks.Open "C:\a.xls"
For i = 1 To 500
bul = Workbooks("Kitap1").Sheets("Sayfa1").Cells(i, 1).Value
a = Cells.Find(What:=bul, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=True, SearchFormat:=False).Activate
Workbooks("Kitap1").Sheets("Sayfa1").Cells(i, 2).Value = ActiveCell.Offset(0,
1).Value
Next
ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Makro1()
For i = 1 To Sheets(2).Cells(65536, 1).End(xlUp).Row
aranan = Sheets(2).Cells(i, 1)
With Sheets(1).Columns(1)
If WorksheetFunction.CountIf(Columns(1), aranan) > 0 Then
xxx = .Find(What:=aranan, After:=Cells(1, 1), LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False).Row
Sheets(1).Cells(xxx, 5) = Sheets(2).Cells(i, 2)
Sheets(2).Cells(i, 3) = "ok"
End If
End With
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Initialize()
ListBox1.ColumnWidths = "25;30;40;50"
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub txtAdi_AfterUpdate()
Dim Ilk, Kalan As String
Dim Sayac As Integer
If Mid((frmAna.txtAdi), 1, 1) = "�" Then
Ilk = "I"
frmAna.txtAdi = Ilk & Format((Mid((frmAna.txtAdi), 2,
(Len(frmAna.txtAdi) - 1))), "<")
ElseIf Mid((frmAna.txtAdi), 1, 1) = "i" Then
Ilk = "�"
frmAna.txtAdi = Ilk & Format((Mid((frmAna.txtAdi), 2,
(Len(frmAna.txtAdi) - 1))), "<")
Else: Ilk = Format((Mid((frmAna.txtAdi), 1, 1)), ">")
End If
Kalan = ""
For Sayac = 2 To Len(frmAna.txtAdi)
If Mid((frmAna.txtAdi), Sayac, 1) = "I" Then
Harf = "�"
ElseIf Mid((frmAna.txtAdi), Sayac, 1) = "�" Then
Harf = "i"
Else: Harf = Format((Mid((frmAna.txtAdi), Sayac, 1)), "<")
End If
Kalan = Kalan & Harf
Next
frmAna.txtAdi = Ilk & Kalan
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Label1_Click()
On Error Resume Next
Label1.Caption = ""
toplam = 0
For i = 0 To ListBox1.ListCount - 1
toplam = toplam + ListBox1.List(i, 5)
Next i
Label1.Caption = Format(toplam, "##,###.00")
TextBox1 = yaziyacevir(Label1, 1)
TextBox2 = yaziyacevir(Label1, 0)
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Dim fso As FileSystemObject
Set fso = New FileSystemObject
If MsgBox("Silinsin mi?", vbyesno) = vbNo Then Exit Sub
fso.DeleteFolder "C:\Hakan\Hakan\Firmalar", True
"�al�mad�" demeden �nce,
Tools-> References penceresinden ""Microsoft Scripting Runtime Library"
k�t�phanesinin i�aretlenmi� oldu�undan emin olun.
----------kod bitir------
----------kod basla------
visual basic kodu: YAZI�MA �RNE��
Say� : 12
Konu :
Tarih :
�lgi :
----------kod bitir------
----------kod basla------
Private Sub CommandButton2_Click()
Application.ScreenUpdating = False
Sheets("Rapor").Range("a1:k65536").ClearContents
Range("A1").Select
Selection.AutoFilter
If ComboBox1.Value <> "" Then Selection.AutoFilter Field:=2,
Criteria1:=ComboBox1.Value
If ComboBox2.Value <> "" Then Selection.AutoFilter Field:=3,
Criteria1:=ComboBox2.Value
If ComboBox3.Value <> "" Then Selection.AutoFilter Field:=6,
Criteria1:=ComboBox3.Value
If ComboBox4.Value <> "" Then Selection.AutoFilter Field:=7,
Criteria1:=ComboBox4.Value
If ComboBox5.Value <> "" Then Selection.AutoFilter Field:=11,
Criteria1:=ComboBox5.Value
Selection.CurrentRegion.Copy
Sheets("Rapor").Range("A1").PasteSpecial
Selection.AutoFilter
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub ListBox2_MouseUp(ByVal Button As Integer, ByVal
Shift As Integer, ByVal X As Single, ByVal Y As Single)
Static ackapa 'bu de�i�ken ismini projenizin hi�bir yerinde kullanmay�n
If ackapa = 1 Then
Me.ListBox2.ListIndex = -1
ackapa = 0
Else
ackapa = 1
End If
End Sub
visual basic kodu: Private Sub ListBox2_MouseUp(ByVal Button As Integer, ByVal
Shift As Integer, ByVal X As Single, ByVal Y As Single)
Static ackapa
Static secili
If secili <> ListBox2.ListIndex Then
secili = ListBox2.ListIndex
ackapa = 1
Exit Sub
End If
If ackapa = 1 Then
Me.ListBox2.ListIndex = -1
ackapa = 0
Else
ackapa = 1
End If
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub ScrollBar1_Change()
MultiPage1.Value = ScrollBar1.Value
End Sub
visual basic kodu: MultiPage1.Value = 2
----------kod bitir------
----------kod basla------
Kod:
Private Sub TextBox1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
TextBox3.Value = Format(TextBox1.Value * 8 / 108, "0.00")
TextBox2.Value = Format(TextBox1.Value, "0.00")
TextBox1.Value = TextBox2.Value - TextBox3.Value
End Sub
----------kod bitir------
----------kod basla------
Kod:
If (ComboBox1.Value = "") Or (ComboBox2.Value = "") Or (TextBox1.Value = "") Or
(TextBox2.Value = "") Then
MsgBox "Bo� Alan B�rakt�n�z", vbCritical
ComboBox1.Value = ""
ComboBox2.Value = ""
TextBox1.Value = ""
TextBox2.Value = ""
Exit Sub
End If
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Cells(1, 2) = (Cells(1, 2) + 1) * Cells(1, 1)
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
ComboBox1.AddItem "sayfa1", 0
ComboBox1.AddItem "sayfa2", 1
ComboBox1.AddItem "sayfa3", 2
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Dim fso As FileSystemObject
Set fso = New FileSystemObject
On Error Resume Next
fso.DeleteFolder "c:\hedef_klasor"
fso.CreateFolder "c:\hedef_klasor"
fso.CopyFolder "c:\kaynak_klasor", "c:\hedef_klasor"
MsgBox "Kopyalama tamamlandi"
----------kod bitir------
----------kod basla------
Kod:
Sub tlcevir()
sayi = ActiveCell.Value
sayi = Round(sayi / 1000000, 2)
ActiveCell.Value = sayi
ActiveCell.NumberFormat = "0"" YTL "".##"" YKuru�"""
End Sub
----------kod bitir------
----------kod basla------
----------kod bitir------
----------kod basla------
Sub auto_open()
If Day(Now + 1) = 1 Then
Call kay�t
End If
End Sub
Sub kay�t()
ay = MonthName(Month(Now))
If ActiveWorkbook.Name = ay & ".xls" Then End
ActiveWorkbook.SaveAs Filename:="D:\" & ay & ".xls"
Workbooks.Open Filename:="D:\Ana Kitap.xls"
Cells.ClearContents
Workbooks(ay & ".xls").Close
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Function point(Credit As Integer, Grade As String)
Dim ReturnValue
GradeValue = 1000
If Grade = "AA" Then GradeValue = 4
If Grade = "BA" Then GradeValue = 3.5
If Grade = "BB" Then GradeValue = 3
If Grade = "CB" Then GradeValue = 2.5
If Grade = "CC" Then GradeValue = 2
If Grade = "DC" Then GradeValue = 1.5
If Grade = "DD" Then GradeValue = 1
If Grade = "FD" Then GradeValue = 0.5
If Grade = "FF" Then GradeValue = 0
ReturnValue = Credit * GradeValue
If ReturnValue > 1000 Then
point = "Yanl� Grade"
Else
point = ReturnValue
End If
End Function
----------kod bitir------
----------kod basla------
visual basic kodu: For a = 1 To 5
If IsNumeric(Controls("textbox" & a)) = True Then
If TextBox7 = "" Then TextBox7 = 0
TextBox7 = Controls("textbox" & a) * 1 + TextBox7 * 1
End If
Next
----------kod bitir------
----------kod basla------
Kod:
Selection.RowHeight / 29.5 gibi bir sabit katsay� var, pixel ==> cm d�n��m�nde
sabit bir rakam yoktur.
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub UserForm_Initialize()
With Application
.WindowState = xlMaximized
Zoom = Int(.Width / Me.Width * 100)
Width = .Width
Height = .Height
End With
�ki linkide inceleyebilirsiniz
http://www.excel.web.tr/viewtopic.php?t=2548
http://www.excel.web.tr/viewtopic.php?t=1020
----------kod bitir------
----------kod basla------
Sub bul()
Sheets("1").Select
Range("A2:J14").Select
ActiveSheet.ShowDataForm
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton1_Click()
Range("A1").Select
Selection.AutoFilter
Selection.AutoFilter Field:=4, Criteria1:=">=" & CLng(DTPicker1.Value),
Operator:=xlAnd _
, Criteria2:="<=" & CLng(DTPicker2.Value)
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub nos�rala()
For a = 2 To 18
c = 0
For b = 2 To 11
If Cells(b, a) = "Y" Then
c = c + 1
Cells(c + 11, a) = Cells(b, 1).Value
End If
Next
Next
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: ActiveWorkbook.SaveAs Filename:="C:\Belgelerim\" &
[a1].Value
visual basic kodu: Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:="C:\Belgelerim\kitap1.xls"
End Sub
visual basic kodu: Sub kaydet()
ActiveWorkbook.SaveAs Filename:="C:\Belgelerim\" & [a2].Value
End Sub
visual basic kodu: Sub kaydet()
ActiveWorkbook.SaveAs Filename:="C:\" & sheets("�ablon").[a2].Value
End Sub
visual basic kodu: Sub farkl�kaydet()
ChDir "c:\"
Dosya = Application.GetSaveAsFilename([a1].Value & ".xls")
If Dosya = False Then Exit Sub
ActiveWorkbook.SaveAs (Dosya)
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub EED1()
Application.Run "'BOOK3.XLS'!BBB.EED2"
ActiveSheet.Paste Destination:=Worksheets("Sheet1").Range("IV65536")
BUSAYI = Range("IV65536")
MsgBox ("BU SAYI = " & BUSAYI)
End Sub
Kod:
Sub EED2()
BUSAYI = 5
Range("IV65536") = BUSAYI
Range("IV65536").Copy
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub satir()
Dim yukseklik As Single, mevcut As Single, text As String, cevap As String
'mevcut sat�r y�ksekli�ini bul
mevcut = Selection.RowHeight / 29.5
'mesaj i�ri�ini haz�rla
text = "Mevcut sat�r y�ksekli�i: " & Format(mevcut, "###0.00 cm") & Chr(13)
& "Yeni sat�r y�ksekli�ini girin (cm):"
'InputBox g�ster
cevap = InputBox(text, "Yeni sat�r y�ksekli�i belirle", Format(mevcut, "###0.00"))
'cevaba g�re yeni sat�r y�ksekli�i de�i�tir
If cevap <> "" Then
yukseklik = CSng(cevap)
Selection.RowHeight = yukseklik * 29.5
End If
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub dizinara()
On Error GoTo son
dizin = InputBox("ARANACAK D�Z�N ADINI YAZINIZ")
ara = "c:\" & dizin
ChDir ara
MsgBox "BU D�Z�N MEVCUTTUR"
Exit Sub
son:
MsgBox "BU D�Z�N MEVCUT DE��LD�R"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: [g14].Copy
Range("G15:G" & Cells(65536, 7).End(xlUp).Row).Select
Selection.PasteSpecial
Application.CutCopyMode = False
----------kod bitir------
----------kod basla------
Kod:
Sub auto_open()
Application.OnTime Now + TimeValue("00:00:15"), "Sor"
End Sub
Kod:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
MsgBox "Kullan�c� Ad� ve �ifresi Yazmak Zorundas�n�z.."
Cancel = True
End If
End Sub
Kod:
Public MyUser As String
Public MyPass As String
'
Sub Auto_Open()
Dim UserArr
UserArr = Array("Huseyin", "Turker", "RedKid")
Select Case Format(Date, "w")
Case 1 To 3
MyPassword = "sifre1"
Case 4 To 7
MyPassword = "sifre2"
End Select
ThisWorkbook.IsAddin = True
MyPasswBox
If MyPass <> "" And MyUser <> "" Then
For i = LBound(UserArr) To UBound(UserArr)
If MyUser = UserArr(i) And MyPass = MyPassword Then
ThisWorkbook.IsAddin = False
MsgBox UserArr(i) & ", giri�iniz onayland� !", _
vbInformation, "Bilgi..."
Exit Sub
End If
Next
MsgBox "Kullan�c� ad� ve �ifrenizi kontrol edin !", vbCritical, "Dikkat !"
End If
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton2_Click()
If ListBox1.ListIndex > -1 Then
Sheets("Sablon").Copy after:=Sheets(Sheets.Count)
ActiveSheet.Name = ListBox1.Value
Unload Me
End If
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Workbook_SheetBeforeRightClick(ByVal Sh As
Object, ByVal Target As Range, Cancel As Boolean)
Cancel = True
UserForm1.Show
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
TextBox1.SelectionMargin = False
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub TextBox1_Enter()
TextBox1.BackColor = vbYellow
End Sub
visual basic kodu: Private Sub TextBox1_Exit(ByVal Cancel As
MSForms.ReturnBoolean)
TextBox1.BackColor = vbWhite
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
d = 0
For a = 1 To ListBox1.ListCount
d = d + ListBox1.List(a - 1, 0)
Next
MsgBox d / ListBox1.ListCount
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub boslukdoldur()
For a = 8 To Cells(65536, 5).End(xlUp).Row
If Cells(a, 4) = "" Then Cells(a, 4) = Cells(a - 1, 4)
Next
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Option Explicit
Public kompkay As String
Sub combolarrow()
kompkay = "sayfa1!$a$1:$a$10"
End Sub
visual basic kodu: Private Sub UserForm_Initialize()
combolarrow
ComboBox1.RowSource = kompkay
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: If Cells(65536, 3).End(xlUp).Row > 13 Then
Cells(Cells(65536, 3).End(xlUp).Row, 3).ClearContents
----------kod bitir------
----------kod basla------
Sub auto_open()
Application.OnKey "~", "kopyala"
End Sub
Sub kopyala()
aa = WorksheetFunction.CountA(Range("C:C"))
Sheets("Sayfa2").Cells(aa, 3) = Sheets("Sayfa1").Cells(aa, 3)
ActiveCell.Offset(1, 0).Select
End Sub
Sub auto_close()
Application.OnKey "~", "kopyala"
End Sub
----------kod bitir------
----------kod basla------
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
a = Range("B1").Value + Range("a1").Value
Range("a1").ClearContents
Range("B1").Value = a
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu:
Private Button1_Click()
Set xl = CreateObject("Excel.Application")
MsgBox xl.Sheets("isimler").[A1]
xl.applicaliton.Quit
Set xl = Nothing
End Sub
visual basic kodu:
Private Sub Command1_Click()
Set xl = CreateObject("Excel.Application")
xl.Application.Workbooks.Open "C:\Belgelerim\�yeler.xls"
MsgBox xl.Application.Worksheets("�simler").[A1]
xl.Quit
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Workbook_SheetDeactivate(ByVal Sh As Object)
If ActiveSheet.Name = "sayfa1" Then Exit Sub
Sheets("sayfa1").Select
End Sub
visual basic kodu: Private Sub Worksheet_Activate()
Sheets("Sayfa1").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub saat()
userform1.txttarih = Format(Now(), "dd mmmm yyyy")
userform1.txtgun = Format(Now(), "dddd")
userform1.txtzaman = Format(Now(), "hh:mm AM/PM")
zaman = TimeValue(DateAdd("s", 60 - Second(Now()), Now()))
Application.OnTime zaman, "saat", , True
End Sub
Kod:
Private Sub UserForm_Activate()
Module1.saat
End Sub
Kod:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Application.OnTime zaman, "saat", , False
End Sub
----------kod bitir------
----------kod basla------
Sub windows_�r�n_kodu()
Dim dize As String
dize = kod_al(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion",
"ProductId")
MsgBox dize
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub ComboBox1_Click()
ComboBox2.ListIndex = ComboBox1.ListIndex
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_Activate()
On Error GoTo 10
Sheets("sayfa1").[c3:c50].Find(Date).Select
UserForm1.Show
10 End Sub
visual basic kodu: Sub Auto_open()
On Error GoTo 10
Sheets("sayfa1").[c3:c50].Find(Date).Select
sat=Sheets("sayfa1").[c3:c50].Find(Date).row
userform1.textbox1=date
userform1.textbox2=Sheets("sayfa1").cells(sat,4).value
UserForm1.Show
10 End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_Change(ByVal Target As Range)
...
End Sub
visual basic kodu: Private Sub Worksheet_Change(ByVal Target As Range)
...
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton5_Click() 'KAYDET VE �IK
ActiveWorkbook.Save: ActiveWorkbook.Close
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If LCase(Sh.Name) = "sheet1" Or LCase(Sh.Name) = "sheet2" Then
If InputBox("�ifreyi girin") <> "sifre" Then Sh.Visible = False
End If
End Sub bu kodlar� ekle, LCase(Sh.Name) = "sheet1" k�sm�n� or ekleyerek yeni
sheet isimleride ekleyebilirsin, tabi lcase ald�rd���m�z i�in sheet isimlerini
k���k harflerle yazmaya dikkat et.
----------kod bitir------
----------kod basla------
Kod:
Sub Macro1()
Range("A1:E32").Select
Selection.Sort Key1:=Range("A1")
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub RaiderMacro4()
MsgBox "RaiderMacro4 �al�t�r�ld� !" & vbCrLf & vbCrLf & "(2nci
Seviye AltMen�-1)"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton1_Click()
cikis = ComboBox1
varis = ComboBox2
If cikis = varis Then
MsgBox "�IKI� VE VARI� AYNI OLAMAZ."
Exit Sub
End If
sat = [a1:l12].Find(ComboBox1.Value).Row
sut = [a1:l12].Find(ComboBox2.Value).Column
deger = Cells(sat, sut).Value
If deger = 0 Then deger = Cells(sut, sat).Value
Label1.Caption = deger
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub ekle()
Application.ScreenUpdating = False
For a = Cells(65536, 1).End(xlUp).Row To 2 Step -1
If Cells(a, 1) <> 0 Then Rows(a).EntireRow.Insert
Next
End Sub
visual basic kodu: Sub ekle()
Application.ScreenUpdating = False
For a = Cells(65536, 1).End(xlUp).Row To 2 Step -1
Rows(a).EntireRow.Insert
Next
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Unload Me
sonsat = Sheets("G�").Cells(59, 12).End(xlUp).Row + 1
Sheets("G�").Cells(sonsat, 12) = TextBox1.Value
MsgBox "Gelen �denek Kayd� Yap�lm�t�r."
Unload Me
Sheets("G�").Select
End Sub
----------kod bitir------
----------kod basla------
Private Sub Form_Load()
Label1(0).Caption = "KAYAN YAZI"
Label1(1).Caption = "UMARIM BE�EN�RS�N�z"
Label1(2).Caption = "V�SUALBAS�C SEVENLER ���N"
Label1(3).Caption = "E�LenCeLi"
Label1(4).Caption = "KOLAY GELS�N )"
End Sub
Private Sub Timer1_Timer()
Label1(0).Top = Label1(0).Top - 20
Label1(1).Top = Label1(1).Top - 15
Label1(2).Top = Label1(2).Top - 15
Label1(3).Top = Label1(3).Top - 15
Label1(4).Top = Label1(4).Top - 10
If Label1(4).Top <= 0 Then
Label1(0).Top = 1700
Label1(1).Top = 2080
Label1(2).Top = 2500
Label1(3).Top = 2860
Label1(4).Top = 3450
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
=[1]Sheet1!$A$2
----------kod bitir------
----------kod basla------
Private Sub Workbook_Activate()
Application.DisplayFormulaBar = False
End Sub
Private Sub Workbook_Deactivate()
Application.DisplayFormulaBar = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
=+IF(A2="Y";B2*70;IF($E$6="Z";B2*80;IF($E$6="B";B2*90;"hata")))
Kod:
=(A2="x")*(B2*70)+(A2="y")*(B2*80)+(A2="z")*(B2*90)
----------kod bitir------
----------kod basla------
Kod:
Sub isimler()
Dim i As Integer
For i = 1 To [A65536].End(xlUp).Row
Cells(i, 3) = StrConv(Cells(i, 1), vbProperCase)
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
=IF(A2=B2;"E��T";"")
Kod:
=(A2=B2)*1
Kod:
=E�ER(A1="";"";E�ER(A1=B1;"E�it";"E�itDe�il"))
Cevap 2: 1 Yazmas�n� istersen
Kod:
=E�ER(A1="";"";E�ER(A1=B1;"1";"E�itDe�il"))
Cevap3: B S�tunundaki H�credeki veriyi yazd�rmak istersen;
Kod:
=E�ER(A2="";"";E�ER(A2=B2;"Bu H�crede "&B2&" E�ittir.";"E�itDe�il"))
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_SelectionChange(ByVal Target As
Range)
If Selection.Cells.Address = "$A$1" Then ActiveSheet.PrintOut
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: ActiveSheet.PrintPreview
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_Change(ByVal Target As Range)
kl = Selection.Column
If kl <> 4 Then Exit Sub
Cells(Target.Row, 6).Select
Cells(Target.Row, 5) = Now()
End Sub
visual basic kodu: Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 4 Then Exit Sub
If Target = "" Then
Cells(Target.Row, 5) = ""
Exit Sub
End If
Cells(Target.Row, 5) = Now()
End Sub
visual basic kodu: Private Sub ComboBox1_KeyPress(ByVal KeyAscii As
MSForms.ReturnInteger)
Rows(2).AutoFilter 1, ComboBox1.Value
Rows(2).AutoFilter 1, ComboBox1.Value
End Sub
visual basic kodu: Sheets("sayfa1").Protect ("1")
A�a��daki kod ise �ifreyi a�ar
visual basic kodu: Sheets("sayfa1").Unprotect ("1")
----------kod bitir------
----------kod basla------
visual basic kodu: ListBox1.ListIndex = ListBox1.ListCount - 1
----------kod bitir------
----------kod basla------
visual basic kodu: ....
...
If cevap = Worksheets("sayfa1").Range("a2") .Text Then
....
...
----------kod bitir------
----------kod basla------
visual basic kodu: Sub sil()
For a = 1 To Sheets.Count
Sheets(a).[a4:h200].ClearContents
Next
End Sub
visual basic kodu: Sub tunsayfalardasil()
Sheets.Select
Range("a1:h200").Select
Selection.Clear
Sheets(1).Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
=SUMPRODUCT(1/COUNTIF(A1:A10;A1:A10))
Alternatif-2:
Kod:
=SUM(1/COUNTIF(A1:A10;A1:A10))
Alternatif-2 'deki formulu, formul �ubu�una yazd�ktan sonra Ctrl+Shift+Enter
tu�lar�na basarak gireceksiniz. Yani bu bir, "dizi" formul�d�r.
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Dim k As integer
k = 0
Do Until k > ListBox1.ListCount - 1
If ListBox1.Selected(k) = True Then
ListBox1.RemoveItem k
Else
k = k + 1
End If
Loop
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = [A65536].End(xlUp).Row
ReDim al(x)
For i = 1 To x
j = 10 - Left(Cells(i, 1), 1)
al(i) = j & Cells(i, 2)
Next i
For i = 1 To x
k = x
For j = 1 To x
If i = j Then
GoTo atla
End If
If al(i) >= al(j) Then
k = k - 1
End If
atla:
Next j
Cells(i, 4) = k
Next i
End Sub
----------kod bitir------
----------kod basla------
Private Sub UserForm_Activate()
Set wsh = Sheets("fihrist")
sonsatir = wsh.Range("A65536").End(xlUp).Row
For i = 1 To sonsatir
p1 = wsh.Cells(i, 20)
If WorksheetFunction.CountIf(wsh.Range("t2:t" & i), p1) = 1 Then tarih.AddItem
(p1)
Next i
end sub
----------kod bitir------
----------kod basla------
Sub Makro5()
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat(wdPasteDefault)
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: a=worksheetfunction.SumProduct(.....)
visual basic kodu: For a=3 To cells(65536,3).end(xlup).row
If month(cells(a,2))=month([a1] Then
c=cells(a,4)+c
End If
Next
----------kod bitir------
----------kod basla------
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("a2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("B2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 1) = Cells(i + 1, 1) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
Sub Ayir()
Range("A2:D58").Select
Selection.Sort Key1:=Range("b2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("A2").Select
Dim i, k As Integer
k = 0
For i = 2 To 50
If Cells(i, 2) = Cells(i + 1, 2) Then
k = k + 1
If k = 8 Then
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Else
Rows(i + 1).EntireRow.Insert
k = 0
i = i + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub ListBox1_Click()
ComboBox1.Clear
Set s1 = Sheets("sayfa1")
For a = 2 To s1.Cells(65536, 1).End(xlUp).Row
If s1.Cells(a, 1) = ListBox1.Value Then
ComboBox1.AddItem s1.Cells(a, 2).Value
End If
Next
End Sub
visual basic kodu: Private Sub ListBox1_Click()
ComboBox1.Clear
Set s1 = Sheets("sayfa1")
For a = 2 To s1.Cells(65536, 1).End(xlUp).Row
If ListBox1.Value = "T�m�" Then ComboBox1.AddItem s1.Cells(a, 2).Value
If s1.Cells(a, 1) = ListBox1.Value Then
ComboBox1.AddItem s1.Cells(a, 2).Value
End If
Next
End Sub
visual basic kodu: Set s1 = Sheets("sayfa1")
For a = 2 To s1.Cells(65536, 1).End(xlUp).Row
ComboBox1.AddItem s1.Cells(a, 2).Value
Next
----------kod bitir------
----------kod basla------
visual basic kodu: If Cells(i, 11).value <> "" Then
ListBox1.AddItem Cells(i, 11).Value
End If
visual basic kodu: Private Sub ComboBox1_Change()
ListBox1.Clear
ListBox2.Clear
ListBox3.Clear
TextBox1.Value = ListBox1.ListCount
Sheets("sayfa1").Select
For i = 1 To [B65535].End(xlUp).Row
If Cells(i, 2) = ComboBox1.Value Then
If Cells(i, 11).value <> "" Then
ListBox1.AddItem Cells(i, 11).Value
End If
ListBox2.AddItem (Cells(i, 13).Value)
ListBox3.AddItem (Cells(i, 15).Value)
End If
Next i
TextBox1.Value = ListBox1.ListCount
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Auto_open()
MsgBox "SADECE -A- S�TUNUNA ELLE VER� G�R��� YAPILACAKTIR.D��ERS�TUNLAROTOMAT�K
OLARAK FORM�LLERLE HESAPLANMAKTADIR"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub sil()
For a = Cells(65536, 1).End(xlUp).Row To 1 Step -1
If Cells(a, 3) = 0 Then Rows(a).Delete
Next a
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
ComboBox1.RowSource = "Sayfa2!A2:A7"
ComboBox2.RowSource = "Sayfa2!B2:B7"
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton1_Click()
Dim sh As Worksheet, sh1 As Worksheet
Dim i As Integer, j As Integer
Dim k As Integer, x As Integer
Range("A1").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Key2:=Range( _
"B1"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase _
:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal
Set sh = Worksheets("Sheet1")
For i = 1 To sh.Range("a65536").End(xlUp).Row
For j = 1 To Worksheets.Count
If Worksheets(j).Name = sh.Cells(i, 1) Then
Worksheets(j).Select
GoTo ATLA
End If
Next j
Worksheets.Add.Move after:=Worksheets(Worksheets.Count)
ActiveSheet.Name = sh.Cells(i, 1).Value
ATLA:
Set sh1 = ActiveSheet
k = sh1.Range("A65536").End(xlUp).Row
If sh1.Cells(k, 1) = "" Then k = 0
For x = 1 To 4
sh1.Cells(k + 1, x) = sh.Cells(i, x)
Next x
Next i
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Test()
Dim MyModule As Object
Dim MyProc As String, ProcName As String
Dim LineStart As Integer, NoOfLines As Integer, StartOfProc As Integer
Call MyMacro
'
Set MyModule = ThisWorkbook.VBProject.VBComponents(" Module1 ")
MyProc = "MyMacro"
'
With MyModule.CodeModule
LineStart = .CountOfDeclarationLines + 1
Do Until LineStart >= .CountOfLines
ProcName = .ProcOfLine(LineStart, 0)
LineStart = LineStart + .ProcCountLines(.ProcOfLine(LineStart, 0), 0)
If ProcName = MyProc Then Exit Do
Loop
End With
NoOfLines = MyModule.CodeModule.ProcCountLines(MyProc, 0)
StartOfProc = MyModule.CodeModule.ProcStartLine(MyProc, 0)
MyModule.CodeModule.DeleteLines StartOfProc, NoOfLines
MsgBox "[MyMacro] isimli prosedur silindi..."
ThisWorkbook.Save
Set MyModule = Nothing
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton1_Click()
ListBox1.Clear
For a = 2 To Cells(65536, 1).End(xlUp).Row
If TextBox1 = "" And TextBox2 = "" Then GoTo 10
If Cells(a, 2) >= CDate(TextBox1.Value) And Cells(a, 2) <= CDate(TextBox2.Value)
And Cells(a, 6) = ComboBox1.Value Then
GoTo 20
10 If Cells(a, 6) = ComboBox1.Value Then
20 c = c + 1
topla = topla + Cells(a, 3).Value
For b = 2 To 6
ListBox1.AddItem
ListBox1.List(c - 1, b - 2) = Cells(a, b).Value
Next
End If
End If
Next
TextBox3 = topla
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: If [B5] = "Y�ll�k Bile�ik Faiz (%)" Then
If [A8] = "Vade (G�n)" Then
[A1] = [B13]
Else
[A1] = [B14]
End If
Else
If [A8] = "Vade (G�n)" Then
[A1] = [B15]
Else
[A1] = [B16]
End If
End If
visual basic kodu: If [B5] = "Y�ll�k Bile�ik Faiz (%)" Then
If [A8] = "Vade (G�n)" Then
[A1] = [B13]
Else
[A1] = [B14]
End If
Else
If [A8] = "Vade (G�n)" Then
[A1] = [B15]
Else
[A1] = [B16]
End If
End If
Maalesef yukar�daki yaz�m� kullanamam. Excel ile bir ba�lant�s� olmayacak bu
formun. Asl�nda bu form�l�n matematik a��l�m�n� bilsem yapacam ama bilmiyorum.
Hemen bir �rnek a��l�m vereyim:
deger1 = CDbl("0" & txtdeger1.Text)
deger2 = CDbl("0" & txtdeger2.Text)
deger3 = CDbl("0" & txtdeger3.Text)
sonuc = CDbl("0" & txtsonuc.Text)
txtsonuc.Text = FormatNumber(CDbl(deger1) * ((1 + (CDbl(deger2) / 36500) *
CDbl(deger3))))
Bunun gibi yaz�lmas� laz�m.
----------kod bitir------
----------kod basla------
Kod:
Range("A1").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
----------kod bitir------
----------kod basla------
Sub SelectItem()
If DialogSheets("Dialog1").Show = True Then
Selection.Cells(1) = sItem
Selection.Cells(1).Offset(0, 11) = sValue
End If
End Sub
Sub ListBoxSelect()
sItem = Worksheets("malzeme").Range("D1")
sValue = Worksheets("malzeme").Range("E1")
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: ComboBox1.RowSource = "Sayfa2!A3:A" &
Worksheets("Sayfa2").Range("A65536").End(xlUp).Row
di�er comboboxda da uygun yerleri yani s�tun adlar�n� de�i�tireceksiniz.
----------kod bitir------
----------kod basla------
visual basic kodu: Dim app As Outlook.Application
Dim posta As Outlook.MailItem
Set app = CreateObject("Outlook.Application")
Set posta = app.CreateItem(olMailItem)
With posta
.To = txtemail.Value
.CC = ""
.BCC = ""
.Subject = "YEDEK PAR�A AMBAR RAPORU "
.body = txtbastar & " ve " & txtbittar & " Tarihleri aras�ndaki, "
& lblbolum & " - " & lbldurum & " - " & lblfirma & " - "
& lblsipver
.Attachments.Add "D:\RaporEmail.xls"
.Send
End With
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton1_Click()
k = 1
For i = 1 To Range("B65536").End(xlUp).Row
If Range("A" & i).Font.Color = vbRed Then
Cells(k, 3) = Cells(i, 2)
k = k + 1
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
Worksheets("DATA (2)").Select
Range("B3:BY3").Select
Selection.Copy
Worksheets("DATA").Select
Range("b3").Select
bul:
If Not IsEmpty(ActiveCell) Then
ActiveCell.Offset(1, 0).Select
GoTo bul
Else
Selection.PasteSpecial Paste:=xlValues
End If
Worksheets("FORM").Select
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub Test()
Dim i As Long
Dim MyRng As Range
Set MyRng = ActiveDocument.Paragraphs(1).Range
i = MyRng.MoveEnd(unit:=wdParagraph, Count:=1)
Do While i > 0
If MyRng.Paragraphs(1).Range.Text = vbCr Then
MyRng.Paragraphs(1).Range.Delete
Else
MyRng.MoveStart unit:=wdParagraph, Count:=1
End If
i = MyRng.MoveEnd(unit:=wdParagraph, Count:=1)
Loop
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub CommandButton1_Click()
TextBox1 = Format(Calendar1.Value, "dd.mm.yyyy")
End Sub
visual basic kodu: Selection.AutoFilter field:=4, Criteria1:=">=" &
CLng(CDate(TextBox1.Value))
Ben burada bir tanesini g�sterdim. Bu kod s�zme yap�lacak alandaki 4. s�tundaki
de�erlerden textbox1 den by�k ve e�it olanlar�n� s�zer.
Tabi ��yle bir surumda var. Mesela ben sadece bir tarih girip o tarihten b�y�k
olanlar� g�recem derseniz. �kinci tarih yani biti� tarihi girdi�iniz textbox i�in
bir �ey girmeyin. Ama bu durumda s�zme kriteri �al��rsa olmaz. O zaman oraya ��yle
bir de�i�iklik yapma�z gerekecek.
visual basic kodu: If TextBox1 = "" Then
GoTo Atla5
Else
Selection.AutoFilter field:=4, Criteria1:=">=" &
CLng(CDate(TextBox1.Value))
End If
Atla5:
San�r�m anlatabildim.
----------kod bitir------
----------kod basla------
visual basic kodu: Private Sub Worksheet_Calculate()
[b12] = [b11].Value
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Selection.AutoFilter Field:=7, Criteria1:=">=" &
TextBox5.Text, Operator:=xlAnd, Criteria2:="<=" & TextBox6.Text
kodunu ekleyin
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
For a = 1 To 51 Step 1
For e = 1 To 30
maas.Controls(Check & e + 1).Caption = Cells(1, a)
Next
Next
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Declare Function GetSystemMetrics32 Lib "User32" Alias
"GetSystemMetrics" _
(ByVal nIndex As Long) As Long
'
Sub Test()
Dim X1 As Long, Y1 As Long
X1 = GetSystemMetrics32(0)
Y1 = GetSystemMetrics32(1)
MsgBox "Ekran cozunurlugu : " & X1 & " X " & Y1
End Sub
visual basic kodu: Declare Function GetSystemMetrics32 Lib "User32" Alias
"GetSystemMetrics" _
(ByVal nIndex As Long) As Long
'
Sub Test()
Dim X1 As Long, Y1 As Long
X1 = GetSystemMetrics32(0)
Y1 = GetSystemMetrics32(1)
MsgBox "Ekran cozunurlugu : " & X1 & " X " & Y1
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
Sheets("KDV_1").Select
Range("a1").Select
End Sub
----------kod bitir------
----------kod basla------
Sub kopyalaart�r()
Worksheets("anasayfa").Copy after:=Worksheets(Worksheets.Count)
Worksheets(Worksheets.Count).Range("E8") = Worksheets("anasayfa").Range("e8") + 1
Worksheets(Worksheets.Count).Range("M1") = Worksheets("anasayfa").Range("M1") + 1
End Sub
----------kod bitir------
----------kod basla------
Sub YazYTL()
MyNum = Selection
Selection = Yaz_YTL(MyNum)
Selection.Range.Case = wdUpperCase
End Sub
----------kod bitir------
----------kod basla------
visual basic kodu: Sub sayfasec()
Sheets(2).Select
End Sub
visual basic kodu: Sub sayfasec()
Sheets("sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub auto_open()
sure = Now + TimeSerial(0, 1, 0)
Application.OnTime earliesttime:=sure, procedure:="Makromuz", schedule:=True
End Sub
----------kod bitir------
----------kod basla------
Sub kay�t()
a = ThisWorkbook.Name
ActiveWorkbook.SaveAs Filename:="C:\Yedek\" & "Yedek" & a
Workbooks.Open Filename:="C:\" & a
Workbooks("Yedek" & a).Close , True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Public MyPass ' Bu satir Modul�n General_Declarations kisminda olucak (en �stte).
'
Sub MainProgram()
'
'Ana programin kodlari buralarda
'
'
'Asagidaki satirla "*" karakterli sifre girme kutusunu �agiriyoruz
'
MyPasswBox
'
'Eger kullanici bir sifre girdiyse,
'asagidaki satirlarda, kullanicinin girdigi sifreyi
'"�iplak" olarak g�r�nt�l�yoruz.
'
'Sizin yapmaniz gereken If - End If satirlari arasinda
'sifre kontrolunu yaptirip, kodlari �alismaniza g�re y�nlendirmek olucak
If MyPass <> "" Then
MsgBox "Girilen sifre : " & MyPass
End If
'
'Ana programin kodlarinin devami buralarda
'
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
TextBox1.MaxLength = 7
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
x = Val(TextBox1)
y = Val(TextBox2)
TextBox3 = WorksheetFunction.Substitute(Format(x / y, "0.00"), ",", ".")
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub metinayikla()
Dim nums As String
For i = 1 To Cells(65536, 1).End(xlUp).Row
For b = 1 To Len(Cells(i, 1))
If IsNumeric(Mid(Cells(i, 1), b, 1)) = True Then
nums = nums & Mid(Cells(i, 1), b, 1)
End If
Next b
Cells(i, 1) = CLng(nums)
nums = ""
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Application.ScreenUpdating = False
I = 1
J = 1
While Not IsEmpty(ActiveWorkbook.Worksheets("sayfa1").Range("N" & I))
If Worksheets("sayfa1").Range("N" & I) = 0 Then
Worksheets("sayfa1").Rows(I).EntireRow.Copy Worksheets("sayfa2").Range("A"
& (Worksheets("sayfa2").Range("N65536").End(xlUp).Row + J))
Worksheets("sayfa1").Rows(I).EntireRow.Delete
Else
I = I + 1
End If
Wend
Application.ScreenUpdating = True
edit:
verilerin bulundu�u sayfadaki 2. sat�r� kar��kl�k ��karmamas� i�in tamamen sildim.
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Worksheets("sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Dosya()
Sheets(1).Select
Sheets(1).Name = [B2]
Dim MyFolder As String
MyFolder = "C:\" & [B1] & ""
MkDir MyFolder
End Sub
Kod:
Sub Dosya()
Sheets(1).Select
Sheets(1).Name = [b2]
Dim MyFolder As String
MyFolder = "C:\" & Range("B1") & ""
MkDir MyFolder
ActiveWorkbook.SaveAs "C:\" & [b1] & "Firmas� " & [b2]
& "Model " & ".XLS"
End Sub
Kod:
Sub create()
On Error GoTo Error
drive$ = InputBox("S�r�c� ad�n� giriniz", "S�r�c� ?")
drive$ = drive$ & ":\"
Path$ = InputBox("Hangi klas�r alt�nda olu�turmak istiyorsunuz.Sizin A�aca��n�z
Klas�r Ad� : " & [b1], "Yol ?")
If Path$ <> "" Then Path$ = Path$ & "\"
MyPath$ = Range("b1").Value
Final$ = drive$ & Path$ & MyPath$
MkDir (Final$)
Exit Sub
Error:
MsgBox "VB Hata No = " & Err.Number & vbCrLf & vbCrLf &
"A��klama :" & vbCrLf & Err.Description, vbApplicationModal, "HATA !!!"
End Sub
----------kod bitir------
----------kod basla------
Kod:
=GETPIVOTDATA("Grand Total";$A$27;"Grup
Kodu";"SM5201";"Br";"Ad";"A��klama";1;"31.01.2004";1000;"28.02.2004";1000)+GETPIVOT
DATA("Grand Total";$A$27;"Grup
Kodu";"SM5201";"Br";"Ad";"A��klama";2;"31.01.2004";5252;"28.02.2004";5252)
----------kod bitir------
----------kod basla------
Kod:
=IF(IF($A2="";$A1;$A2)=IF(Sayfa1!$A2="";Sayfa1!$A1;Sayfa1!$A2);OFFSET(Sayfa1!
A1;MATCH(Sayfa2!$A$2;Sayfa1!$A$2:$A$24;0);ROW(Sayfa1!$A$2)-1);"")
----------kod bitir------
----------kod basla------
Kod:
Sub Makro6()
Range("A1").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub ComboBox1_Change()
Sheets("1").Select
TextBox2 = Cells(ComboBox1.ListIndex + 1, 2)
TextBox3 = Cells(ComboBox1.ListIndex + 1, 3)
TextBox4 = Cells(ComboBox1.ListIndex + 1, 4)
TextBox5 = Cells(ComboBox1.ListIndex + 1, 5)
TextBox6 = Cells(ComboBox1.ListIndex + 1, 6)
TextBox7 = Cells(ComboBox1.ListIndex + 1, 7)
TextBox8 = Cells(ComboBox1.ListIndex + 1, 8)
TextBox9 = Cells(ComboBox1.ListIndex + 1, 9)
TextBox10 = Cells(ComboBox1.ListIndex + 1, 10)
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(B1="";METNE�EV�R(A1;"gg/aa/yyyy")&" Tarihinde Para
Al�nmam�t�r";METNE�EV�R(A1;"gg/aa/yyyy")&" Tarihinde
"&SAYID�ZENLE(B1;0))& "Lira Al�nm�t�r." Biraz inceliyerek
de�i�tirebilirsin.
�kinci sorunu ise Yazd���m fonksiyonu kullanarak E1 H�cresini Veri Do�rulama ile
Yapabilirsin.Veri Do�rulama ise;
1.)E1 H�cresini t�klat
2.)Veri>Do��rulama T�klat
3.)izin Veilern=Liste
Kaynak==A1:A22
Yazars�n
4.)E2 H�cresinede �unlar� yaz.
Kod:
=D��EYARA(E1;A1:B22;2;YANLI�)
Bu kadar.Not:E2 H�cresini Bi�imlendir renklendir..Kolay Gelsin.
Serpily
----------kod bitir------
----------kod basla------
Kod:
=E�ER(A1=12;5;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")
+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")
+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")+E�ER(A1=12;2;"")
Red-Kid
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
TextBox1.Text = Range("d5").Text
TextBox2.Text = Range("d6").Text
TextBox3.Text = Range("d7").Text
TextBox4.Text = Range("d8").Text
TextBox5.Text = Range("d9").Text
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Format(Date, "dd/mm/yyyy")
End Sub
Kod:
Private Sub CommandButton1_Click()
If [a1] = "" Then
Soru = MsgBox("H�creye De�er girmediniz.", vbYesNo, "Hata!")
CommandButton1.Caption = ""
If Soru = vbYes Then GoTo devam
If Soru = vbNo Then Exit Sub
End If
devam:
CommandButton1.Caption = Format(Date, "dd/mm/yyyy")
End Sub
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Format(Date, "dd/mm/yyyy")
End Sub
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Format(Now, "hh:mm:ss")
End Sub
Kod:
Private Sub CommandButton1_Click()
CommandButton1.Caption = Now
End Sub
Kod:
Private Sub CommandButton1_Click()
Do
CommandButton1.Caption = Now
DoEvents
Loop
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Open()
With Worksheets("Sheet1")
.Protect Password:="a", userinterfaceonly:=True
.EnableAutoFilter = True
End With
End Sub
----------kod bitir------
----------kod basla------
Kod:
=COUNTA(A1:B7)-SUM(1/COUNTIF(A1:B7;A1:B7))
Form�l� yazd�ktan sonra sadece entere de�il ctrl + shift + enter e bas�n�z.
Kod:
=E�ER(EHATALIYSA(D��EYARA(A1;$B$1:$B$7;1;YANLI�));"";D��EYARA(A1;$B$1:$B$7;1;YANLI�
)) Bunu a�a��ya s�r�kleyiniz.
D1 H�cresinede �u fonksiyonu kopyalay�n�z.
Kod:
="�ki K�mede "&7-BO�LUKSAY(C1:C7)&" Adet Ortak Eleman Bulunmaktad�r."
Bu sizin istedi�iniz sonucu verir.
En son xxrt taraf�ndan Cum Eyl 24, 2004 08:02 tarihinde de�i�tirildi, toplamda 1
kere de�i�tirildi
xxrt
Kod:
=BA�_DE�_DOLU_SAY(A1:B7)-TOPLA(1/E�ERSAY(A1:B7;A1:B7))
Formullerin ing-t�rk�e kar��l�klar� i�in a�a��daki linke bak�n ltf.
http://www.excel.web.tr/viewtopic.php?p=1659#1659
Kod:
Function jale(Ref_Alan As Variant, Kiyas_Alan As Variant) As Long
'Referans alana g�re kiyaslanan alanda ka� tane ayn� varsa sayar.Bo�luklardada
�al��r.22.01.2004 .Jale
Dim mSay As Long, r1 As Long, r2 As Long, c1 As Integer, c2 As Integer
Dim i As Long, j As Integer, k As Long, l As Integer
mSay = 0
r1 = Ref_Alan.Rows.Count
r2 = Kiyas_Alan.Rows.Count
c1 = Ref_Alan.Columns.Count
c2 = Kiyas_Alan.Columns.Count
For i = 1 To r1
For j = 1 To c1
For k = 1 To r2
For l = 1 To c2
If Ref_Alan(i, j).Value = Kiyas_Alan(k, l).Value Then mSay = mSay + 1
Next l
Next k
Next j
Next i
jale = mSay
End Function
Foksiyonun ad�n� de�i�tirince �al�maz..
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("c2") = "" Then
MsgBox "c2 bo� ge�ilmez", 64, "uyar�"
Range("c2").Select
End If
End Sub
Kod:
Sub xxrt()
If Range("C2") = "" Then
MsgBox "H�cre Bo� Olamaz."
ElseIf Range("C5") = "" Then
MsgBox "H�cre C5 Bo� Olamaz"
End If
End Sub
Kod:
Sub xxrt()
If Range("C2") = "" Then
soru = MsgBox("C2 H�cresini Bo� Ge�emezsiniz.Devam Edeyimmi?", vbYesNo, "Bo� Kalan
H�cre Hatas�")
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
If Range("C5") = "" Then
soru = MsgBox("C5 H�cresini Bo� Ge�emezsiniz.Devam Edeyimmi?", vbYesNo, "Bo� Kalan
H�cre Hatas�")
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
devam:
Sheets("Sayfa2").Select 'Bu sayfa2 ye ge�mek i�in.
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
TextBox1.Text = Range("b1").Text
TextBox2.Text = Range("b2").Text
TextBox3.Text = Range("b3").Text
TextBox4.Text = Range("b4").Text
TextBox5.Text = Range("b5").Text
End Sub
Kod:
Private Sub CommandButton1_Click()
Range("b1").Select
ActiveCell.Formula = TextBox1
Range("b2").Select
ActiveCell.Formula = TextBox2
Range("b3").Select
ActiveCell.Formula = TextBox3
Range("b4").Select
ActiveCell.Formula = TextBox4
Range("b5").Select
ActiveCell.Formula = TextBox5
End Sub
----------kod bitir------
----------kod basla------
Kod:
MsgBox "Sipari� Tarihini Giriniz..."
kodundan ba�ka anlam ��kar�yoruz.Burda rahat olun �ekinecek bir�ey
yok.Amac�m�z,amac�n�zd�r.��renmek,��retmek..Bak�n.Ben size ��yle bir �rnek
haz�rlad�m..
Sipari� Tarihini girerek kullan�c� TextBox1'e:CommandButtona �u kodlar� yaz�n.
Kod:
Private Sub CommandButton1_Click()
Range("A1").Select
ActiveCell.Formula = TextBox2
End Sub Dosyay� yoll�yorum..Her�eyin bir ilk var dimi..
----------kod bitir------
----------kod basla------
Kod:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$C$18" Then Sheets("Sayfa2").Select
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Form_Open(Cancel As Integer)
DoCmd.OpenForm "Form ad�n�z", acNormal, "", "", ,
acNormal
DoCmd.RunCommand acCmdFilterByForm
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub Auto_Open()
Cells.Select
Selection.Locked = True
Selection.FormulaHidden = True
Range("a1").Select
Sheets("Sayfa1").Protect Password:="123"
End Sub
----------kod bitir------
----------kod basla------
Kod:
=ETOPLA(A1:A100;"a";B1:B100)
yerine
Kod:
=TOPLA.�ARPIM((A1:A100="a")*B1:B100)
Form�l�n� kullan�n.�stteki kapal� dosyada �al�maz iken alttaki �al��r.
----------kod bitir------
----------kod basla------
Kod:
With ActiveSheet.QueryTables.Add(Connection:= _
"ODBC;DSN=fenomen;DBQ=C:\fenomen\fenomen.mdb;DriverId=25;FIL=MS
Access;MaxBufferSize=2048;PageTimeout=5;" _
, Destination:=Range("A1"))
.CommandText = Array( _
"SELECT query1.ID, query1.ADI, query1.SOYADI" & Chr(13) & "" &
Chr(10) & "FROM `C:\fenomen\fenomen`.query1 query1" & Chr(13) & ""
& Chr(10) & "ORDER BY query1.ID" _
)
.Name = "Query from fenomen"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = True
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.Refresh BackgroundQuery:=False
End With
biz bu sorguyu parametrik yapmak istersek (senin �rne�inde like kullanarak) sql
sorgusunu
Kod:
"SELECT query1.ID, query1.ADI, query1.SOYADI" & Chr(13) & "" &
Chr(10) & "FROM `C:\fenomen\fenomen`.query1 query1" & Chr(13) & ""
& Chr(10) & "Where ADI like " & cells(5,1) & "% ORDER BY
query1.ID" _
)
yukar�daki gibi de�i�tirirsen sorgu like iifadesi ile 5. sat�r 1. kolondaki data
ile ba�layan de�erleri d�nd�rerek parametrik bir yap� al�r.
E�er tak�l�rsan bir �rnek g�nderebilirim.
----------kod bitir------
----------kod basla------
Kod:
Sub sil()
For i = Cells(65536, 1).End(xlUp).Row To 2 Step -1
If Trim(Cells(i, 1)) <> "SARF F���" And Trim(Cells(i, 1)) <> "TOPTAN SATI�
�RSAL�YES�" Then
Rows(i & ":" & i).Delete Shift:=xlUp
End If
Next i
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveWorkbook.SaveAs Filename:= _
"C:\klasoradi\stok.htm", FileFormat:=xlHtml, _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub FindExactMatch()
Dim MyStr As String, InfoMsg As String
Dim Rng1 As String, LookupValue As String
Dim MyQ As VbMsgBoxResult
Dim FoundRng As Variant
MyStr = Trim(Application.InputBox("Aranacak metni girin !", _
"Find exact match ..."))
If Not MyStr = "False" Then
Set FoundRng = Cells.Find(MyStr, LookIn:=xlValues, LookAt:=xlPart)
If Not FoundRng Is Nothing Then
Rng1 = FoundRng.Address
FoundRng.Activate
ResumeSub2:
If Right(FoundRng.Value, 1) <> " " Then LookupValue = FoundRng.Value
& " "
MyData = Split(LookupValue, " ", , vbTextCompare)
For i = LBound(MyData) To UBound(MyData)
If MyData(i) = MyStr Then
InfoMsg = "Aranan metin " & FoundRng.Address(False, False)
_
& " h�cresinde bulundu." _
& vbCrLf & vbCrLf & "Bulunan h�crenin i�eri�i :" _
& vbCrLf & vbCrLf & FoundRng.Value & vbCrLf _
& vbCrLf & "Aramaya devam etmek istiyormusunuz ?"
MyQ = MsgBox(InfoMsg, vbInformation + vbYesNo, _
"Arama sonucu...")
If MyQ = vbYes Then GoTo ResumeSub1:
Exit Sub
End If
Next
Else
MsgBox "Aranan de�er bulunamad� !", vbInformation, "Arama sonucu..."
Exit Sub
End If
ResumeSub1:
Set FoundRng = Cells.FindNext(FoundRng)
If Rng1 = FoundRng.Address Then
MsgBox "Aranan de�erden ba�ka bulunamad� !", vbInformation, _
"Arama sonucu..."
Exit Sub
End If
FoundRng.Activate
GoTo ResumeSub2:
End If
Set FoundRng = Nothing
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub FileList()
Dim FileNamesList As Variant, i As Integer
FileNamesList = CreateFileList("*.xls", True)
Range("A:B").ClearContents
For i = 1 To UBound(FileNamesList)
Cells(i + 1, 1) = FileNamesList(i)
Cells(i + 1, 2) = FileSize(Dir(FileNamesList(i)))
Next
Columns("A:B").AutoFit
End Sub
Kod:
Sub ay�r()
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="\", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1))
ActiveWindow.ScrollColumn = 2
End Sub
----------kod bitir------
----------kod basla------
Kod:
=VLOOKUP(A3;'�r�nler '!A2:B32;2;0)*Sayfa1!B3+VLOOKUP(A3;'�r�nler '!
A2:B32;2;0)*Sayfa1!C3+VLOOKUP(A3;'�r�nler '!A2:B32;2;0)*D3
----------kod bitir------
----------kod basla------
Kod:
=INDIRECT("'"&A1&"'!A100")
Umar�m i�inize yarar.
Kod:
=INDIRECT("'"&A1&"'!A100")
Umar�m i�inize yarar.
----------kod bitir------
----------kod basla------
Kod:
Private Declare Function apiGetUserName Lib _
"advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, _
nSize As Long) _
As Long
'
Sub Auto_Close()
Sheets(1).Range("A1") = "Son Kullan�c� :"
Sheets(1).Range("B1") = fGetUserName
Sheets(1).Range("C1") = Now
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeSave _
(ByVal SaveAsUI As Boolean, Cancel As Boolean)
sifre = InputBox("Kay�t i�in �ifreyi girmelisiniz", _
"KAYIT", "�ifre girin")
If sifre = "xxrt" Then
MsgBox "Kay�t i�lemi tamamland�", vbInformation, _
"KAYIT BA�ARILI"
Else
MsgBox "Yanl� �ifre girdiniz." & Chr(13) & _
"Dosya kaydedilemedi", vbCritical, "HATALI ��FRE"
Cancel = True
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub deneme()
i = 5
Do While Cells(i, 5) <> ""
Cells(i, 8).Formula = Right(Cells(i, 5), 10)
i = i + 1
Loop
Cells(4, 8).Value = "ge�iciba�l�k"
Range("H4:H1000").Select
Range("H4:H1000").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"H4:H1000"), CopyToRange:=Range("K4"), Unique:=True
Columns("K:K").ColumnWidth = 16
End Sub
----------kod bitir------
----------kod basla------
Kod:
=E�ER(VE(A2>37986;A2<38353);"1";"0")
Kod:
=IF(AND(A2>37986;A2<38353);"1";"0) ing s�r�m i�in
2. B1 h�cresine k���k olan tarih C1 h�cresine b�y�k olan tarihleri yaz�n ve tarihi
A2 h�cresine yaz formulu B2 h�cresine yaz
Kod:
=E�ER(VE(A2>B1;A2<C1);"1";"0")
Kod:
=IF(AND(A2>B1;A2<C1);"1";"0") �ng s�r�m i�in
----------kod bitir------
----------kod basla------
Kod:
Say�n <�sim> <Soyisim>
Toplam borcunuz <Alacak_Tutar�> TL olmu�tur.
Bilgilerinize
�eklinde.
Burada <> i�indeki bilgiler parametrik olarak her bir sayfa ya farkl� bas�l�yor.
----------kod bitir------
----------kod basla------
Kod:
Option Explicit
'//
'// Dedicated to my Friend Colo
'// Some of the code from http://www.allapi.net
'// spec thanks to Joacim Andersson 29 July 2001
'// Amendments by Ivan F Moala 28 Sept 2002
'//
Private Const FTP_TRANSFER_TYPE_UNKNOWN = &H0
Private Const FTP_TRANSFER_TYPE_ASCII = &H1
Private Const FTP_TRANSFER_TYPE_BINARY = &H2
Private Const INTERNET_SERVICE_FTP = 1
Private Const INTERNET_SERVICE_GOPHER = 2
Private Const INTERNET_SERVICE_HTTP = 3
Private Const INTERNET_FLAG_PASSIVE = &H8000000 '// used for FTP
connections
Private Const INTERNET_OPEN_TYPE_PRECONFIG = 0 '// use registry configuration
ALPEN
Teknik Sorumlu
----------kod bitir------
----------kod basla------
Kod:
Private Sub UserForm_Initialize()
Label1.Visible = False
ProgressBar1.Visible = False
End Sub
Kod:
Private Sub CommandButton1_Click()
ProgressBar1.Visible = True
Dim i As Integer
For i = 1 To 1000
ProgressBar1.Value = (i / 1000) * 100
Label1.Caption = Format(Int((i / 1000) * 100), "%0")
DoEvents
Next i
ProgressBar1.Visible = False
End Sub
Kod:
Next i
K�sm�ndan sonra sizin kodlar�n�z� yerle�tirirsiniz.
Raider'in G�zel Bir �rne�ide var.Onuda �ncelerseniz Daha iyi olur.
http://www.excel.web.tr/viewtopic.php?t=878
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
UserForm1.Label1.Caption = "L�tfen bekleyiniz....."
UserForm1.Show 0
CheckSave
End Sub
Kod:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode <> 1 Then Cancel = 1
End Sub
Kod:
Sub CheckSave()
DoEvents
UserForm1.Label1.Caption = "Dosya kaydedildi....."
Application.OnTime Now + TimeValue("00:00:03"), "RemForm"
End Sub
Kod:
Private Sub UserForm_Activate()
Me.SpecialEffect = fmSpecialEffectEtched
Label1.Caption = "L�tfen bekleyiniz....."
End Sub
Kod:
Sub TcmbGunlukKurlar()
UserForm1.Show 0
DoEvents
ActiveSheet.UsedRange.Clear
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://www.tcmb.gov.tr/kurlar/today.html", Destination:=Range("A6"))
.Name = "today"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlSpecifiedTables
.WebFormatting = xlWebFormattingAll
.WebTables = "1"
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.Refresh BackgroundQuery:=False
End With
ActiveSheet.QueryTables(1).Delete
Call CheckData
End Sub
----------kod bitir------
----------kod basla------
Private Sub CommandButton1_Click()
Sheets("sayfa1").Select
Range("a1").Select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(-1, 0).Select
Loop
If Range("a2").Value = "" Then
Range("a1") = TextBox1.Value
Range("b1") = ComboBox1.Text
End If
ActiveCell.Offset(0, 1).Value = TextBox1.Value
ActiveCell.Offset(0, 2).Value = ComboBox1.Text
End Sub
Private Sub CommandButton1_Click()
For a = 1 To 40
b = Sheets("sayfa1").Cells(a, 1).Value
If b = "" Then
Sheets("sayfa1").Cells(a, 1) = TextBox1.Value
Sheets("sayfa1").Cells(a, 2) = ComboBox1.Text
GoTo 10
End If
Next a
Sheets("sayfa1").Cells(1, 3) = "T�M SATIRLAR DOLU" 'UYARI MESAJI
10 End Sub
selamlar
leventm
En son leventm taraf�ndan Pr� Ekm 14, 2004 22:37 tarihinde de�i�tirildi, toplamda 1
kere de�i�tirildi
excel 97-2000-2002-2003 �ng-Tr
----------kod bitir------
----------kod basla------
Sub aralama()
Dim deger As Variant
Dim deger1 As Variant
ba�:
deger = ActiveCell.Value
d�ng�:
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
deger1 = ActiveCell.Value
If deger <> deger1 Then
ActiveCell.EntireRow.Insert
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
GoTo ba�
End If
de�er = de�er1
If deger1 = "" Then Exit Sub
GoTo d�ng�
End Sub
Sub aralama()
Range("A2:C10").Select
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Dim deger As Variant
Dim deger1 As Variant
ba�:
deg = 0
deger = ActiveCell.Value
d�ng�:
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
deger1 = ActiveCell.Value
satirno = ActiveCell.Row
deg = Cells(satirno - 1, 3).Value + deg
If deger <> deger1 Then
ActiveCell.EntireRow.Insert
Range("A1:C1").Copy
ActiveCell.PasteSpecial
Cells(satirno - 1, 4) = "TOPLAM:"
Cells(satirno - 1, 5) = deg
ActiveCell.Offset(rowOffset:=1, columnOffset:=0).Activate
GoTo ba�
End If
de�er = de�er1
If deger1 = "" Then
Range(Cells(satirno - 2, 1), Cells(satirno - 2, 3)).Delete
GoTo 10
End If
GoTo d�ng�
10 End Sub
----------kod bitir------
----------kod basla------
Kod:
Compile Error :
can't find project or library
Kod:
Private Sub fiyat1_Change()
fiyat1.Value = Format(fiyat1, "###,###")
End Sub
Kod:
Compile Error :
can't find project or library
hatas� veriyor ve format� se�ili hale getiriyor.
Kod:
Private Sub fiyat1_Change()
fiyat1.Value = Format(fiyat1, "###,###")
ya hakkatten ayn� hatayla bende kar��la�t�m. daha sonra excel dosyas� salt okunur
a��ld� ve de�i�iklik izni vermedi. san�r�m ��kt�. farkl� kaydetten sonra yeni
kaydetti�im �al��yor. ve hata vermiyor.
----------kod bitir------
----------kod basla------
Kod:
=TEXT(AZ1;(A1-B1))-TEXT(AZ1;ROUNDUP(TEXT(AZ1;(A1-B1))/7;1))-D1
Kod:
=TEXT(AZ1;(A1-B1))-TEXT(AZ1;ROUNDUP(TEXT(AZ1;(A1-B1))/7;1))-D1
Ben bu kod olay�ndan pek bir�ey anlamad�m
muygun
----------kod bitir------
----------kod basla------
Kod:
=SUMPRODUCT((A1:A100=Sheet1!A1)*C1:C100)+SUMPRODUCT((B1:B100=Sheet1!B1)*C1:C100)
t�rk�esi:
Kod:
=TOPLA.�ARPIM((A1:A100=Sayfa1!A1)*C1:C100)+TOPLA.�ARPIM((B1:B100=Sayfa1!
B1)*C1:C100)
Kod:
=A1&B1
formulunu yazarak formulu verilerin bulundu�u sat�rlar�n sonuna kadar D stununa
kopyalay�n
sayfa1 'e geri donerek C1 h�cresine
Kod:
=SUMIF(Sheet2!D1:D16;Sheet1!A1&Sheet1!B1;Sheet2!C1:C10)
----------kod bitir------
----------kod basla------
Kod:
Private Sub yaz(deger, adres, yenideger)
If deger = 0 Then
yuzde = 1
ElseIf IsNumeric(deger) And IsNumeric(yenideger) Then
yuzde = (deger - yenideger) / deger
yuzde = yuzde * 100 * (-1)
yuzde = FormatNumber(yuzde, 2)
End If
If deger < 1 Then deger = 0
Range(adres).ClearComments
Range(adres).AddComment " "
Range(adres).Comment.Visible = False
Range(adres).Comment.Text Text:="Eski De�er: " & deger & Chr(10) &
"De�i�im: %" & yuzde
End Sub
----------kod bitir------
----------kod basla------
Kod:
<iframe src="http://forum.web-yazilim.org/88x31.asp" width="88" height="31"
marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0"
scrolling="no"></iframe>
Kod:
<iframe src="http://forum.web-yazilim.org/88x31.asp" width="88" height="31"
marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0"
scrolling="no"></iframe>
Bu Kodu Bizi Desteklemek ��in Sitenize Koyarsan�z Seviniriz
----------kod bitir------
----------kod basla------
Kod:
=E�ER(A2="";"Bir Say� Giriniz.";A2*B1/A1)
Yadaa. Fonksiyon B�l�m� Ama Makro olarakda.
Sayfa1'de
Denetim Ara� Kutusu>De�i�tir D��mesi ekleyip �ift t�klay�n ve �u kodlar� yaz�n.
Kod:
Private Sub ToggleButton1_Click()
If Range("A1") = "" Then
soru = MsgBox("A1 H�cresini Bo� Ge�tiniz.Bo� Ge�erseniz Hesaplama Yap�lamaz.Devam
Edeyimmi?", vbYesNo, "A1 H�cresi Bo�!")
Range("A1").Select
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
If Range("A2") = "" Then
soru = MsgBox("A2 H�cresini Bo� Ge�tiniz.Devamm�?", vbYesNo, "A2 H�cresi Bo�!")
Range("A2").Select
If soru = vbYes Then GoTo devam
If soru = vbNo Then Exit Sub
End If
devam:
If ToggleButton1.Value = True Then
ToggleButton1.Caption = "Sil"
Range("b2") = Range("A2") * Range("b1") / Range("A1")
Else
ToggleButton1.Caption = "Y�zdesini Bul"
Range("A2").ClearContents
Range("b2").ClearContents
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
Sub GetAutoCorrectList()
Dim i As Long
Dim MyList As Variant
Application.ScreenUpdating = False
For i = 1 To UBound(Application.AutoCorrect.ReplacementList)
MyList = Application.AutoCorrect.ReplacementList(i)
Sheets("Sheet1").Cells(i, 1) = MyList(1)
Sheets("Sheet1").Cells(i, 2) = MyList(2)
Next i
Application.ScreenUpdating = True
End Sub
----------kod bitir------
----------kod basla------
Kod:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Sheets("Sayfa1").Range("A1").Value = "" Then
Sheets("Sayfa1").Range("A1") = 1
Else
Sheets("Sayfa1").Range("A1") = Sheets("Sayfa1").Range("A1") + 1
End If
End Sub
----------kod bitir------
----------kod basla------
Kod:
=MID(A2;1;LEN(A2)-LEN(C2))
C2 h�cresinde ise
Kod:
=IF(TYPE(FIND(" ";(MID(A2;FIND(" ";A2)+1;LEN(A2)))))=16;RIGHT(A2;LEN(A2)-FIND("
";A2));MID(A2;(FIND(" ";(MID(A2;FIND(" ";A2)+1;LEN(A2)))))+(FIND(" ";A2));LEN(A2)))
formulunu yazarak iste�inizi kar��layabilirsiniz.Biraz zor oldu ama �imdi oldu.
Kod:
For i = 1 To Cells(65536, 1).End(xlUp).Row
a = Split(Cells(i, 1), " ")
For j = 0 To UBound(a) - 1
Cells(i, 2) = Cells(i, 2) & " " & a(j)
Next j
Cells(i, 3) = a(UBound(a))
Next i
----------kod bitir------
----------kod basla------
Kod:
For i = 1 To Cells(65536, 1).End(xlUp).Row
x = 2
For j = 1 To Len(Trim(Cells(i, 1)))
z = Mid(Trim(Cells(i, 1)), j, 1)
If IsNumeric(z) = False And z <> " " Then
If x > 2 Then
Cells(i, x) = num: x = x + 1
End If
Cells(i, x) = z: num = "": x = x + 1
Else
num = num & z
End If
Next j
Next i
----------kod bitir------
-----------------------------------------------
'haftan�n g�n� g�n olarak yazar.
01 Nisan 2011 Per�embe i�in Per�embe sonucunu verir.
=E�ER(HAFTANING�N�(A1;2)=1;"Pazartesi";E�ER(HAFTANING�N�(A1;2)=2;"Sal�";E�ER(HAFTAN
ING�N�(A1;2)=3;"�ar�amba";E�ER(HAFTANING�N�(A1;2)=4;"Per�embe";E�ER(HAFTANING�N�(A1
;2)=5;"Cuma";E�ER(HAFTANING�N�(A1;2)=6;"Cumartesi";E�ER(HAFTANING�N�(A1;2)=7;"Pazar
";"")))))))
------------------------------------------------
1-OTOMAT�K KAYDETME:
Ara�lar*��ine Ekle (Tools*Add-Ins) komutunu �al�t�r�n. Ekrana gelen diyalog
kutusunda Otomatik Kaydet (AutoSave) se�ene�ini i�aretleyip Tamam d��mesine bas�n.
Art�k Ara�lar (Tools) men�s�n� a�t���n�zda Otomatik Kay�t (AutoSave) se�ene�inin
eklendi�ini g�receksiniz. Bu komutu �al�t�r�nca ekrana Otomatik kaydetme ayarlar�n�
yapabilece�iniz bir diyalog kutusu gelecektir. Otomatik kaydetme aral��� ve buna
benzer di�er bir s�r� se�ene�i buradan ayarlayabilirsiniz.
3-SAYILARI B���MLEME:
Bir h�creye yazd���m�z rakamlar bazen ondal�k kesir basamakl�, bazen TL eklenmi�
olarak g�r�n�yor. Bazen de yazd�klar�m tarihe d�n��veriyor. Bunun nedeni nedir?
Bunun nedeni, se�ti�iniz h�crelerin bi�iminin kullanma amac�n�zdan farkl�
bi�imlenmi� olmas�. Bu durumu d�zeltmek i�in, h�cre veya h�creleri se�in, sa� fare
tu�u ile �zerine t�klay�p H�creleri Bi�imle (Format Cells) komutuna t�klay�n.
Kar��n�za gelen diyalog kutusunun Say� (Number) b�lmesindeki listede, Genel, Say�,
Para Birimi, Tarih, Zaman gibi se�enekler g�receksiniz. Bunlar h�crenin bi�imini
belirler. Bu diyalog kutusunun sa��ndaki pencere i�inde ise bu bi�imlerin farkl�
t�rleri yer al�r. Her birinin �zerine geldi�inizde a��klamas� diyalog kutusunun
�zerinde g�r�n�r, ama bir �rnek vererek konuyu daha iyi a��klayal�m: H�creye
yazd���m�z rakam�n ondal�k kesirden sonra iki hanesinin g�r�nmesini istiyorsak,
H�creleri Bi�imle diyalog kutusunda Say� se�ene�ini se�in; Ondal�k Yerleri (Decimal
places) k�sm�na 2 yaz�n. Excel ondal�k kesrini virg�l (,) olarak g�sterir. Buradaki
1000 Ayrac� Kullan (Use 1000 Seperator) se�ene�ini i�aretlerseniz, rakam sondan
itibaren ��er hanede bir nokta (.) ile ayr�lacakt�r (�rne�in 345 bin, 345.000,00
olarak g�sterilir).
Para birimi girdi�imiz h�crelerde hep TL ��k�yor. Bazen para birimi olarak ABD
dolar� da ($) kullan�yoruz. H�cre bi�imlerini kendimiz belirleyemez miyiz?
Default para birimini Windows 95 belirler. Bunu Denetim Masas�*B�lgesel
Ayarlar*Para Birimi (Control Panel*Regional Settings*Currency) b�lmesinden
de�i�tirebilirsiniz. Ancak yapaca��n�z de�i�iklik t�m belgelerinizi etkiler. Baz�
hesap tablolar�nda TL, baz�lar�nda $ i�areti kullanacaksan�z, Excel size h�creleri
�zel olarak bi�imleme se�ene�i sunar. �?zel bi�imlemek istedi�iniz h�creleri se�ip
�zerlerine sa� fare tu�u ile t�klay�n ve H�creleri Bi�imle*Say� (Format Cells)
komutunu �al�t�r�n. Kar��n�za gelen diyalog kutusunun Say� (Number) b�lmesine girip
listeden �ste�e Uyarlanm�'� (Custom) se�in. T�r (Type) k�sm�n�n alt�ndaki listede
baz� haz�r rakam formatlar� g�receksiniz. Bunlardan sizin i�in uygun olan�n� se�in.
�?rne�in se�ti�iniz h�crede 3455 yaz�yorsa ve listeden #.##0,00 se�ene�ini
i�aretlemi�seniz, ger�ek ra kam 3.455,00 olarak g�r�necektir. Rakam�n�z�n nas�l
g�r�nece�ini diyalog kutusunun �?rnek (Sample) k�sm�nda g�rebilirsiniz. Son olarak
T�r k�sm�nda g�r�nen bi�imin sonuna bir bo�luk b�rak�p $ i�aretini yaz�n. Tamam
d��mesine t�klad���n�zda h�crede 3.455,00 $ yazd���n� g�receksiniz.
Excel'de ondal�k ayrac� default olarak virg�l (,), binlik hane ayrac� nokta (.)
i�aretleri ile g�sterilir. Asl�nda bunu Windows 95 belirler. Ondal�k ayrac�n�n
nokta, binlik basamak ayrac�n�n virg�l olmas�n� istiyorsan�z, Windows 95'te Denetim
Masas�*B�lgesel Ayarlar*Say� (Control Panel*Regional Settings*Number) b�lmesine
girin. Arad���n�z ayarlar� burada bulacaks�n�z.
Excel ara� �ubuklar�nda bulamad���n�z d��meleri ar�yorsan�z, ara� �ubu�una sa� fare
tu�u ile t�klay�p �?zelle�tir (Customize) komutunu �al�t�r�n. Her bir kategoriyi
se�ti�inizde, yan tarafta kullanabilece�iniz d��meleri g�receksiniz. Bu d��melerin
�zerine t�klad���n�zda, diyalog kutusu �zerinde a��klamas� belirecek. Bu d��meleri
fare ile ara� �ubu�una s�r�kleyip b�rakabilirsiniz.
Sub BuyukHarf()
For Each c In Selection.Cells
c.Value=Ucase$(c.Value)
Next c
End Sub
Metni k���k harf yapmak i�inse �u makroyu kullan�n:
Sub KucukHarf()
For Each c In Selection.Cells
c.Value=Lcase$(c.Value)
Next c
End Sub
14-OTOMAT�K DOLDURMA:
Excel, haftan�n g�nlerini, aylar� ve rakamlar� otomatik doldurabilir. �?rne�in bir
h�creye Ocak yaz�n; bu h�creyi se�ili duruma getirip sa� alt k�esindeki noktay�
fare ile �eki�tirerek se�ili alan� s�tunun alt�na do�ru 4-5 h�cre geni�letin. Di�er
h�crelerin (�?ubat, Mart, Nisan,�) olarak doldu�unu g�receksiniz. Rakamlarda ise en
az iki veri giri�i gerekir. �?rne�in bir s�tunda ilk h�creye 1, ikinci h�creye 2
yaz�p ayn� i�lemi yaparsan�z, geri kalan h�creler (3, 4, 5,�) olarak dolar. Bu t�r
verilerde ilk iki h�creye birer atlamal� doldurma yaparsan�z (�rne�in 1 ve 3 ya da
Ocak, Mart) otomatik doldurma i�lemi de birer atlamal� devam eder (1, 3, 5, 7, 9�
veya Ocak, Mart, May�s,� gibi). Sadece g�n, ay ve rakamlarla da s�n�rl� de�ilsiniz.
Otomatik doldurulacak serileri kendiniz tan�mlayabilirsiniz. Bunun i�in
Ara�lar*Se�enekler*�?zel Listeler (Tools*Options*Custom Lists) b�l�m�ne girip YEN�
L�STE se�ene�ini i�aretleyin ve Liste Girdileri (List entries) k�sm�na serinizi
yaz�p Ekle (Add) d��mesine t�klay�n.
15-SE��L� S�TUNU BA�?KA S�TUNA TA�?IMA:
16-B�R�M D�?N��?T�RME:
Bir say�n�n iptal edildi�ini g�stermek i�in Bir Excel h�cresinin �zerini bir k�eden
bir k�eye �izmemiz gerekiyor. Ama h�crenin boyutunun de�i�ti�inde �izginin de
boyunun buna g�re hizalanmas�n� istiyoruz.
�izim (Drawing) ara� �ubu�unu a��n. Bu ara� �ubu�u �zerindeki �izgi (Line)
d��mesine t�klay�n. Fare imleci bir art� i�aretine d�n�ecektir. Diyagonal olarak
�izece�iniz h�crenin �zerine gelin, klavyeden <Alt> tu�una bas�n ve bas�l� tutun;
�izginizi �izin. <Alt> tu�una bas�p bu �izgiyi �izince �izgi bu h�creye
yap�t�r�l�r. Art�k h�cre bir yere ta��n�rsa ya da boyutu de�i�irse �izginin
boyutlar� da otomatik olarak buna g�re de�i�ecektir. �izginin renk, kal�nl�k gibi
�zelliklerini ayarlamak i�in �izginin �zerine �ift t�klay�n ve a��lan diyalog
kutusundan gerekli ayarlar� yap�n.
Excel'de yazd���n�z bir metnin yaz�ld��� h�creye tam� tam�na uymas�n� sa�lamak i�in
Bi�im*S�tun*En Uygun Geni�lik (Format*Column*AutoFit) komutunu kullanabilirsiniz.
Bu i�lemin en pratik yolu ise, metni girdikten sonra fare imlecini h�crenin
bulundu�u s�tunun ba�l���na g�t�r�p, sa� h�cre s�n�r� �zerine �ift t�klamakt�r.
Ayn� �ey sat�rlar i�in de ge�erlidir.
Excel durum �ubu�u t�m sayfalar� ayn� anda g�r�nt�lemeye yetmez. T�m sayfalar�
g�rmek i�in durum �ubu�unun sa��ndaki sola sa�a kayd�rma d��melerinin �zerine sa�
fare tu�u ile t�klay�n ve istedi�inizi se�in.
20-OTOMAT�K TOPLAM.
Excel'de bir h�creye yazd�ktan sonra <Enter> tu�una basarsan�z, etkin h�cre
se�icisi bir alt h�creye, <Shift>+<Enter> tu�una basarsan�z bir �st h�creye ge�er.
Ama genelde alt alta h�creleri de�il yan yana h�creleri dolduruyorsan�z bu d�zeni
de�i�tirebilirsiniz. Ara�lar*Se�enekler*D�zen (Tools*Options*Edit) b�lmesine girin,
Y�n b�lmesini Sa� olarak belirleyin. Art�k <Enter> tu�una bast���n�zda bir sa�daki
h�cre se�ilecek.
22-HIZLI KOPYALAMA.
Bir h�crenin i�eri�ini bir alttaki h�creye kopyalamak istiyorsan�z, alt h�creye
gidip <Ctrl>+<"> tu�lar�na bas�n.
23-FORM�L KOPYALAMA.
Ayn� form�l� ayn� anda birden fazla h�creye girmek i�in, h�crelerin t�m�n� se�in,
form�l� yaz�n ve <Ctrl>+<Enter> tu�una bas�n.
B�y�k bir veri alan�n� fare ile kayd�rarak se�mek yerine bir anda geni� bir se�ili
alan olu�turabilirsiniz. Bunun i�in <Ctrl>+* tu�lar�na basman�z yeterli. Excel
sizin i�in bu b�y�k alan� se�ecektir.
Bunun �� yolu var: Basit Yap�t�rma (bkz. Bunlar� da Bilin!; xx. Tablo Yap�t�rma);
G�mme; ve Ba�lama. Basit yap�t�rma hesap tablosunun sadece bir g�r�nt�s�n�
yap�t�r�r. Excel'de bu hesap tablosunu a��p yapaca��n�z de�i�iklikler, Word'e
yap�t�r�lm� tabloya yans�maz. G�mme (Embedding) i�leminde ise, Excel tablosunda
yapaca��n�z de�i�iklikler Word'e yap�t�r�lm� tabloya yans�maz, ancak Word'deki
tablo �zerine �ift t�klad���n�zda, tablo ile birlikte Word'�n ara� �ubu�u ve
men�leri Excel'inki gibi olur ve tablo �zerinde gerekli de�i�iklikler yap�labilir.
G�mme i�lemi i�in �u ad�mlar� izleyeceksiniz: Excel'deki tabloyu se�ip <Ctrl>+C
tu�lar�yla kopyalad�ktan sonra Word'e ge�in ve D�zen*�?zel Yap�t�r (Edit*Paste
Special) komutunu �al�t�r�n. A��lan diyalog kutusunda Yap�t�r (Paste) ve Microsoft
Excel �al�ma Sayfas� Nesne'yi ( Microsoft Excel Worksheet Object) se�in. Tamam
d��mesine t�klay�n.
Ba�lama (Linking) i�lemi ise Excel'deki tabloda sonradan yapt���n�z
de�i�ikliklerin, Word'e yap�t�rd���n�z tabloya yans�mas�n� sa�lar. Ba�lama i�lemi
i�in �u ad�mlar� izleyeceksiniz: Excel'deki tabloyu se�ip <Ctrl>+C tu�lar�yla
kopyalad�ktan sonra Word'e ge�in ve D�zen*�?zel Yap�t�r (Edit*Paste Special)
komutunu �al�t�r�n. A��lan diyalog kutusunda Ba� Yap�t�r (Paste Link) ve
Bi�imlendirilmi� Metin'i (Formatted Text) se�ip Tamam d��mesine t�klay�n. Word'deki
tablo �zerine sa� fare tu�u ile t�klay�p a��lan men�den Ba�lant�y� G�ncelle�tir
(Update Link) komutuna t�klarsan�z, tablonuz Excel'de yap�lan de�i�ikliklere g�re
g�ncellenir. Bu men�de Excel'de ba�lant� kurulmu� dosyay� a�mak i�in de komutlar
vard�r.
26-Excel'de girdi�imiz verileri bir form halinde d�zenlemek, bu forma yeni veriler
girmek ve istedi�imiz verileri aratmak m�mk�n m�?
Elbette. Bunu i�in Excel'in Hedef Ara (Goal Seek) �zelli�ini kullanacaks�n�z. Bunu
bir �rnek �zerinde anlatal�m: Diyelim ki i�vereninizin sat� gelirlerini, giderleri
ve kar� a�a��da verilen tablodaki gibi olsun. Burada kar 450 milyon TL olarak
g�z�k�yor. �verenin hedefi ise 500 milyon TL. Ara�lar*Hedef Ara (Tools*Goal Seek)
komutunu �al�t�r�n. H�cre Ara (Set cell) k�sm�nda sonu� almak istedi�iniz h�crenin
ad�n� girin (burada $B$5, B5 h�cresini tan�ml�yor). Sonu� H�cre (To value) k�sm�na
hedefledi�iniz de�eri girin (burada 500 milyon). Daha sonra De�i�ecek H�cre (By
changing cell) k�sm�na, bu sonucu elde etmek i�in de�i�tirmek istedi�iniz h�crenin
ismini girin (burada $B$1). Tamam d��mesine t�klad���m�zda, 500 milyon TL kar elde
etmek i�in, i�verenin sat�lardan elde etti�i geliri 2.4 milyar TL'ye ��karmas�
gerekti�i bulunur. Elbette De�i�ecek H �cre k�sm�na $B$4 yazsayd�k, bu kar� elde
etmek i�in giderlerin ka� liraya d��r�lmesi gerekti�i ortaya ��kard�. Hedef Ara
�zelli�i bu k���k �rnekte basit g�r�nebilir, ancak karma��k form�llerin
kullan�ld��� h�crelerde �ok i�e yarar.
Diyelim ki Excel kitab�n�z�n ilk sayfas�nda (Sayfa1- "Sheet1") a�a��daki gibi bir
tablo var.
Sayfa2'de ise �ok benzer, ancak B Grubu olarak adland�r�lm� birtak�m veriler olsun.
B Grubu verileri A Grubu verilerinin tam alt�na ta��nm� halde yaz�c� ��k�� almak
istiyorsunuz. O halde Sayfa2'ye (Sheet2) gidin. G�r�n�m*Ara� �ubu�u*�?zelle�tir
(View*Toolbars*Customize) d��mesine t�klay�n. Kategoriler (Categories) listesinde
Yard�mc� (Utility) se�ene�inin �zerine gelin. Sa� tarafta, �zerinde foto�raf
makinesi simgesi olan d��meyi ara� �ubu�una s�r�kleyip b�rak�n. Bu kamera
d��mesidir. Diyalog kutular�n� kapatt�ktan sonra Sayfa2'de veri girilmi� alan�
se�in (Burada A16) ve kamera d��mesine t�klay�n. Sayfa1'e ge�ip bu sayfan�n
alt�ndaki uygun bir h�creye (�rne�imizde A8) t�klay�n. Sayfa2'deki verilerin bir
g�r�nt�s� Sayfa1'in �zerine yap�t�r�lacakt�r. <Alt> tu�unu bas�l� tutarak
yap�t�r�lan g�r�nt�y� uygun bir konuma s�r�kleyin. Yap�t�rd���n�z alan�n
�er�evesini silmek i�in �zerine sa� fare tu�u ile t�klay�p men�den Nesneyi Bi�imle
(Format Object) komutunu �al�t�r�n. Desen (Pattern) b�lmesinde Hi�biri (None)
se�ene�ini i�aretleyip Tamam d��mesine t�klay�n. A�a��daki gibi bir tablo elde
edeceksiniz. Sayfa2'deki de�erleri de�i�tirirseniz, Sayfa1'e yap�t�rd���n�z alan
i�indeki de�erler de de�i�ecek.
31-SE��M�N VAZ�YET�.
Bir Excel �al�ma sayfas�nda bir dizi h�creyi se�tikten sonra bu se�im alan�ndaki
baz� bilgileri Excel penceresinin hemen alt�ndaki durum �ubu�unda bulunan Otomatik
Hesaplama kutusundan alabilirsiniz. Bu kutuda normalde se�ti�iniz h�credeki
say�lar�n toplam� g�r�nt�lenir. Ancak bu kutunun �zerine gidip sa� fare d��mesine
bast���n�zda bir men� a��l�r. Bu men�den se�imle ilgili ortalama, say� adedi, en
b�y�k ve en k���k de�erleri ve elbette say�lar�n toplam�n� ekrana getirebilirsiniz.
32-BA�?LIK ORTALAMA.
�al�ma tablosunun bir sat�r�nda belirli h�creler aras�na ortalanm� bir ba�l�k
yazmak istiyorsan�z, ilk h�creye ba�l���n�z� yaz�n. Sonra o sat�rda ilk h�cre ile
birlikte ortalama yap�lacak t�m h�creleri se�in ve ara� �ubu�unda S�tunlar Aras�nda
Ortala (Merge and Center) d��mesine t�klay�n.
33-TABLO YAPI�?TIRMA.
Excel'de haz�rlad���n�z tabloyu bir Word belgesine, Word tablolar�na benzer bir
�ekilde yap�t�rmak istiyorsan�z, tabloyu Excel'de se�ip <Ctrl>+C tu�lar�na bas�n.
Daha sonra Word belgesine ge�ip D�zen*�?zelYap�t�r (Edit*Paste Special) komutunu
�al�t�r�n. T�r� (As) k�sm�nda Bi�imlendirilmi� Metin'i (Formatted Text) se�ip Tamam
d��mesine t�klay�n.
Word'de haz�rlad���n�z bir tablo varsa bunu Excel'e kes/yap�t�r y�ntemi ile bi�imi
bozulmadan aktarabilmeniz i�in o tablonun Word'�n tablo yaratma fonksiyonlar� ile
de�il, aralar�na sekme (Tab) verilerek haz�rlanm� olmas� gerekir. Bu sekmeler,
Excel'de verinin bir sa�daki h�creye yaz�laca��n� belirtir.
35-EXCEL'DE B�R GRAF��?� NASIL ��ZD�R�R�Z?
Bunu basit bir �rnek �zerinde a��klayal�m. Diyelim ki a�a��daki gibi bir
veritaban�m�z var. Bu veritaban�nda belirtilen kamyonlar�n her ay ta��d�klar� y�k
miktar� grafik olarak g�sterilmek isteniyor.
�?nce bu tablonun tamam�n� se�in ve ara� �ubu�undaki Grafik sihirbaz� (Chart
Wizard) butonuna t�klay�n. �mle� art� i�aretine d�n�ecektir. Bu imle� ile hesap
tablosunun bo� bir alan�na bir dikd�rtgen �izin. Kar��n�za Grafik sihirbaz�n�n 1.
ad�m� ��kacak. Tablonun tamam�n� �nceden se�ti�iniz i�in Aral�k (Data range)
k�sm�nda de�i�iklik yapman�z gerekmez; �leri (Next) d��mesine t�klay�n. 2. ve 3.
ad�mlarda grafi�inizin bi�imini se�eceksiniz; bu tercih size kalm�. 4. ad�mda sat�r
veya s�tunlardaki verilerin grafik �zerindeki yerle�imi ile ilgili ayarlar var. �?
rne�imizde bu diyalog kutusunda bir de�i�iklik yapmak gerekmiyor; ama diyalog
kutusunda g�r�nen �rnek grafi�e g�re bu se�eneklerin ne i�e yarad���n� kolayca
g�rebilirsiniz. 5. ad�mda g�stergeyi (lejand) ekleme se�ene�inin yan� s�ra, grafik
ba�l���n� ve eksen ba�l �klar�n� yazabilece�iniz alanlar bulunur. Bunlar� doldurun.
Son d��mesine t�klad���n�zda grafi�iniz olu�acak. Grafi�in renklerini, �izgi ve
kenarl�k kal�nl�klar�n� de�i�tirmek i�in, Grafi�in �zerine �ift t�klay�n; daha
sonra bi�imini de�i�tirmek istedi�iniz ��enin �zerine �ift t�klay�n. Kar��n�za
bi�imle ilgili her t�r de�i�ikli�i yapabilece�iniz bir diyalog kutusu gelecek.
Ayn� zamanda J�lyen takvimi ad� verilen bu i�lemi yapmak Excel i�in son derece
kolayd�r. Ancak dikkat edilmesi gereken bir nokta var, o da art�k y�llar. Neyseki
Microsoft'�ular Excel'i yaparken bunu ayarlayacak bir �eyler geli�tirmi�ler. A1
h�cresinde d�zg�n olarak yaz�lm� tarihin oldu�unu d��nelim. B1 h�cresine
=A1-TAR�H(YIL(A1)-1;12;31)
form�l�n� girerseniz, bu form�l A1 h�cresindeki tarihin y�l�n ka��nc� g�n�ne
kar��l�k geldi�ini g�sterecektir. (�ngilizce Excel kullan�yorsan�z, TAR�H yerine
DATE fonksiyonunu kullan�n.)
Excel bu �zelli�e sahip. �?rne�in �al�ma tablonuzun A1:C3 alan�nda 3x3'l�k bir
matris ile F1:G3 alan�nda 3x2'lik birer matris olsun. (�ki matrisin �arp�labilmesi
i�in, ilk matrisin s�tun say�s�n�n, ikinci matrisin sat�r say�s�na e�it olmas�
gerekti�ini hat�rlatal�m.) 3x3'l�k (mxn format�ndaki) matris ile 3x2'lik (nxp
format�ndaki) iki matris �arp�l�rsa, 3x2'lik (mxp format�nda) yeni bir matris
olu�ur. O halde �al�ma tablomuzun bo� ve uygun bir yerinde 3x2'lik bir alan se�in
ve bu alana =D�ARP(A1:C3; F1:G3) form�l�n� girip (�ngilizce Excel kullan�yorsan�z
D�ARP yerine MMULT fonksiyonunu kullan�n) <Shift>+<Ctrl>+<Enter> tu�lar�na bas�n.
�te matris �arp�m�n�z kar��n�zda�
Bu, Excel'i yaratanlar�n bir azizli�i. Excel'de makrolar Word'den farkl� bir
�ekilde kaydedilir. Makrolar�n�z� t�m belgelerde ge�erli k�lmak i�in �u yolu
izlemelisiniz: Excel'de bir kitap (workbook) a��n. Ara�lar*Makro Kaydet*Yeni Makro
Kaydet (Tools*Record Macro*Record New Macro) komutuna t�klay�n. Kar��n�za gelen
diyalog kutusuna yeni makronuzun ad�n� girin ve Se�enekler (Options) d��mesine
t�klay�n. Saklama Yeri (Store in) k�sm�nda Ki�isel Makro �al�ma Kitab� (Personal
Macro Workbook) se�ene�ini i�aretleyin. Tamam d��mesine t�klayarak a��lan Mod�l
sayfas�nda yeni makronuzu yaz�n. (Bu �ekilde makro yazmak i�in Visual Basic for
Applications dilini bilmeniz veya elinizde makro �rneklerinin olmas� gerekir.)
Dosyay� PERSONAL.XLS ad�yla EXCEL\XLSTART dizinine kaydedin. Bundan b�yle her
Excel'i a�t���n�zda bu dosya kar��n�za gelecek, yaratt��� n�z her yeni makro bu
dosyaya eklenecek ve �zerine a�t���n�z t�m dosyalarda t�m makrolar�n�z ge�erli
olacak. Tabii, Excel'i her a�t���n�zda PERSONAL.XLS dosyas�n�n g�r�nmesini
istemeyebilirsiniz. �?yleyse bu dosya a��ld���nda Pencere*Gizle (Windows*Hide)
komutunu �al�t�r�n. Yeni bir makro yarataca��n�z zaman bu dosyay� Pencere*G�ster
(Window*Unhide) komutuyla g�r�n�r hale getirmeniz gerekti�ini de unutmay�n.
44-OTOMAT�K B���M.
45-ROMEN RAKAMLARI.
Hesap tablonuza bir h�crenin de�erini art�r�p azaltacak d��meler eklemek i�in
F�r�ldak (Spinners) �zelli�ini kullanabilirsiniz. Bu d��meyi kullanmak i�in
herhangi bir h�creye herhangi bir de�er girin. Forms (Formlar) ara� �ubu�undan
F�r�ldak arac�n�n d��mesine bas�n. Farenizi kullanarak hesap tablosunda istedi�iniz
yere istedi�iniz boyutta bir f�r�ldak �izin. F�r�ldak �zerine sa� fare tu�uyla
bas�n; Nesne Bi�imle (Format Object) komutunu �al�t�r�n. Diyalog kutusunun H�cre
Ba�lant�s� (Cell Link) b�lmesinde say�n�n etkileyece�i adresi girin (�rne�in B3
i�in $b$3). Bu diyalog kutusundan ayr�ca h�crenin alabilece�i minimum ve maksimum
de�erleri, art� miktar�n� ayarlayabilirsiniz. �te bu kadar. Art�k artt�rma/azaltma
d��menizi kullanabilirsiniz.
BAS�T hesaplamalar yapmak i�in de Excel'in form�lleri ile u�ra�maya de�mez ki.
Excel ara� �ubu�una bir hesap makinesi simgesi ekleyip bu d��meye bas�l�nca Windows
95'in basit hesap makinesinin a��lmas�n� sa�layarak i�lerinizi
kolayla�t�rabilirsiniz. Bunu yapmak i�in a�a��daki ad�mlar� takip etmeniz yeterli:
· · Herhangi bir Excel ara� �ubu�unun �zerine sa� fare d��mesi ile t�klay�n ve �?
zelle�tir komutunu �al�t�r�n.
· · Sol taraftaki listeden �?zel se�ene�ine gelin, yan taraf�nda minik bir hesap
makinesi simgesi olmas� laz�m. Bu se�ene�i s�r�kleyip istedi�iniz bir ara�
�ubu�unun �zerine b�rak.
· · Kapat d��mesine basarak diyalog kutusunu kapat�n. Bundan sonra Excel i�inde
mini bir hesaplama yapmak istedi�iniz zaman b�t�n yapaca��n�z ara� �ubu�una eklemi�
oldu�unuz hesap makinesi d��mesine basmak. Hesap makinesi program� a��lacakt�r.
Excel ile �al��yorum. Belki size garip gelecek ancak zaman zaman kesirli say�lar
yazmam gerekiyor. �?rne�in 15 2/3 (on be� tam 2 b�l� 3 yani) gibi bir say� yazmak
istedi�imde 15 ile 2 aras�nda bo�luk b�rakmak can�m� s�k�yor. Bu i�i yapman�n en
kolay b�l� i�aretinin sa� taraf�ndaki asteriks (*) d��mesine basmak. B�yle
yazd���mda i�im kolayla��yor. B�yle yazsam da daha sonra bu y�ld�zlar otomatik
olarak bo�luk haline d�n�t�r�lse olmaz m�? E�er olursa bunu nas�l yapaca��m?
Bu iste�inizi ba�armak i�in say�lar y�ld�zl� olarak yaz�p daha sonra bir makro
yard�m� ile bul-de�i�tir �eklinde bo�luklara d�n�t�rme yoluna gidebilirsiniz. Ancak
y�ld�z karakterini direkt olarak aratt�r�p bulduramazs�n�z, ��nk� Excel y�ld�z
i�aretine wildcard (bir veya birden fazla harfin yerine ge�en bir i�aret)
uygulamas� yapar.
Sub arabul()
End Sub
2. Alt + F8 tu�lar�na bas�n. Ekrana gelecek olan diyalog kutusunda makro ismi
olarak "arabul" (t�rnaklar yok) yaz�n ve Yarat d��mesine bas�n.
50-EXCEL VE SER�LER
Bir s�tunu belli bir farka artan say�larla doldurmak m� istiyorsunuz? Bunun i�in
alt alta say�lar� yazman�za veya toplama-��kartma form�lleri ile u�ra�man�za gerek
yok. Diyelim ki 0�dan ba�layarak be�er be�er yazd�racaks�n�z. �?nce birinci h�creye
0 alt�ndaki h�creye de 5 yaz�n. Daha sonra bu iki h�creyi fare ile se�ili duruma
getirin. Se�ili duruma getirdi�iniz h�crelerin alt sa� taraf�nda k���k bir karenin
��kt���n� g�receksiniz. Fare imleci ile bu karenin �zerine gelin ve i�areti tutarak
a�a�� do�ru s�r�kleyin, s�tundaki de�erlerin bitmesini istedi�iniz yerde durun,
fare d��mesinden elinizi �ekin. Se�ili duruma gelmi� olan alan otomatik olarak bir
seri bi�iminde doldurulacakt�r. Anlat�rken biraz kar��k gibi g�r�nen bu y�ntemin,
eliniz al�t�ktan sonra asl�nda ne kadar kolay oldu�unu g�receksiniz ve bir kere
al�t�ktan sonra vazge�emeyeceksiniz. Ayn� seri mant��� T�rk�e Excel i�in Aylar,
tarihler ve haftan�n g�nleri i�in de ge�erlidir. Yani Ocak yazd�ktan sonra fare ile
�eki�tirerek Excel�e otomatik olarak �?ubat, Mart vs.. yazd�rabilirsiniz.
Excel'de �zerinde �al�t���n�z y�kl� bir hesap tablosunun �ok kulland���n�z bir
b�l�m�ne h�zl� yoldan eri�mek mi istiyorsunuz? Hemen size bir p�f noktas� verelim.
Excel'de belli bir hesap tablosu dosyas�n�n belli bir b�l�m�ne Windows 95 alt�ndan
k�sayol atayabilirsiniz. Bunun i�in �nce hesap tablosunu a��n ve ilgilendi�iniz
h�cre veya h�creleri se�ili duruma getirin. D�zen men�s�nden Kopyala komutunu
�al�t�r�n. Daha sonra masa�st�nde bo� bir yere gelin. Sa� fare d��mesine bas�n,
ekrana gelecek olan men�den K�sayol Yap�t�r komutunu �al�t�r�n. Masa�st�nde bu
hesap tablosunda o h�crelere referans edecek olan bir k�sayol simgesi belirecektir.
Art�k Excel'i kapatabilirsiniz. Ne zaman bu k�sayol simgesinin �zerine �ift
t�klarsan�z, Excel otomatik olarak a��lacak, gerekli hesap tablosu belgesi
y�klenecek ve belirlemi� oldu�unuz h�cre veya h �crelere ekrana se�ili durumda
getirilecektir. Not: Ayn� p�f noktas� Word i�in de ge�erlidir.
Bir Excel tablosunda kullanmakta oldu�unuz bir grafi�e bir dizi yeni de�er eklemek
istedi�inizde pek �ok Excel kullan�c�s�n�n yapt��� gibi grafi�i silip yeni
verilerle b�t�n s�tunlar� se�ip grafik sihirbaz�n� tekrar �al�t�rman�z �art de�il.
Pek �ok kullan�c� bunu yapt��� i�in grafiklerini her seferinde formatlamak i�in
bo�u bo�una zaman kaybederler. Halbuki Excel varolan bir grafi�e yeni veriler
eklenmesini son derece kolayla�t�rm�t�r.
Bu hesap tablosunda A2:B5 alan�nda d�rt sat�r veri bulunuyor. Peki biz bu grafi�e
�� yeni sat�r eklemek istedi�imizde ne yapaca��z? B�t�n yapaca��m�z verileri
orijinal verilerin alt�na eklemek. Bu sat�rlar� ekledikten sonra da bu yeni
verileri grafi�e tan�tmak. Bunun i�in de yeni eklemi� oldu�unuz verileri se�ili
duruma getireceksiniz. Daha sonra se�imin kenarlar�nda herhangi bir yere sol fare
d��mesine ile s�r�kleme ve b�rakma yapman�z gerekli. Aynen h�creleri kopyalar veya
ta��r gibi. Ancak bu sefer ta��yaca��n�z yer direkt olarak olarak grafi�in �zeri
olacakt�r. Fare d��mesinden elinizi �ekti�inizde grafik otomatik olarak bu yeni
verileri de b�nyesine ekleyecek, boyutlar�n� otomatik olarak ayarlayacakt�r.
53-KOMUTLARI D��?MELE�?T�RMEK
B�R �nceki mektuba verdi�imiz cevap Excel'in men�lerinde veya ara� �ubuklar�nda
olmayan, dolay�s� ile de kullan�c�y� birka� ad�m atmak zorunda b�rakan bir p�f
noktas� i�eriyordu. Elbette bu ad�mlar� basitle�tirmek boynumuzun borcu, bu y�zden
hemen hemen b�t�n Excel komutlar� i�eren bu p�f noktas�n� vermenin zaman�n�n
geldi�ini d��n�yorum. S�k kullanaca��n�z ancak Excel'in men� veya ara� �ubuklar�nda
olmayan bir komutu bir d��me olarak Excel ara� �ubu�una eklemek i�in a�a��daki
ad�mlar� takip edin. Buradaki �rnek, bir �nceki p�f noktas�nda anlat�lan "yaln�zca
g�r�n�r h�creler" se�ene�i i�in anlat�lm�t�r, siz di�er komutlar� eklemek i�in
minik tefek baz� de�i�iklikler yapmal�s�n�z.
1. Herhangi bir ara� �ubu�unun �zerinde bo� bir yere gidin ve sa� fare d��mesine
bas�n.
3. Ekrana gelecek olan diyalog kutusunun Komutlar b�l�m�ne gelin, listeden D�zen
komutunu se�ili duruma getirin.
5. Bu se�ene�i fare ile s�r�kleyerek herhangi bir ara� �ubu�unun �zerine getirin ve
b�rak�n. B�rakt���n�z yerde bir d��me olu�acakt�r.
Y�llarca bir s�r� True Type yaz�tipi kulland�ktan sonra, makinemdeki fontlar�
d�zenleme, kullanmad�klar�mdan kurtulma a�amas�na geldim. As�l yapmak istedi�im,
bir Excel ya da Word makrosu yaratarak var olan b�t�n yaz� tiplerinden �rnekler
al�p g�r�nt�lemek. �stelik her bir yaz�tipinin ad�n�n iyi okunabilen bir font ile
ve yaln�zca bir tek sat�r� kaplayarak g�r�nt�lenmesini istiyorum. Nas�l yapar�m?
Can Konyal� / �STANBUL
�?ekildeki program kodunun ilk sat�r�, Word uygulamas�n� bir nesne de�i�kenine
d�n�t�r�r. B�ylece, bu ilk komutu izleyen komutlar Word��n nesne modelini,
FontNames (Yaz�tipi Adlar�) se�kisi de dahil kullanabilir. For Each d�ng�s�, her
yaz�tipi ad�n� bir s�tuna ve bu yaz�tipine denk �rne�i de kom�u s�tuna yerle�tirir.
For Each d�ng�s�n�n devam�ndaki komut, sonu� tablosunda yaz�tipi adlar�n� ve onlara
ba�l� yaz�tipi �rneklerini alfabetik olarak dizmeye yarar.
Bu i�lemler s�ras�nda Word��n a��k olmas� gerekmez, sadece sistemde kurulu olmas�
yeterlidir. Bu makro, belgede ba�ka bir verinin olup olmad���na bakmayaca��ndan,
hesap tablosunun bo� bir sayfas�nda uygulanmal�d�r.
Microsof Destek Hatt� ile yapt���m g�r�mede EXCEL 97'nin font tan�mlar�n�
WIN.INI'den ald���n� s�ylediler.
WORD 97'nin de bu tan�mlar� REGISTRY den okudu�unu belirttiler. Microsoft FAX da
b�yle bir sorun yok. Yeni s�r�c�ler bulmam�z� �nerdiler. Acaba Word 97'nin de Excel
97 gibi fontlar� WIN.INI'den kullanmas�n�
sa�layabilir miyiz, yoksa ba�ka bir ��z�m var m�? Office 95 T�rk�e paketindeki WORD
95 de b�yle bir sorun yok. Bu sorun en son ald���m�z 56 K Usr Robotics modemin
RapiddComm. Faks yaz�l�m�nda da kar��m�za ��kt�. Konuyu bilgilerinize sunar,
yard�mlar�n�z i�in �imdiden te�ekk�r ederim.
BU sorunuzun cevab�n� daha �nce iki kez dergimizde vermi� olmakla birlikte, �ok
tekrarlanan bir soru oldu�u ve haber gruplar�m�za yazan Vedat Biner adl� okurumuzun
�nerdi�i yeni bir ��z�m bulundu�u i�in sorunuza yer veriyoruz. �?nce bizim
buldu�umuz ��z�m:
Arial Tur,162=Arial,162
Arial Tur,0=Arial,162
Arial,0=Arial,162
Okurumuzun g�nderdi�i ��z�m ise ��yle: �?nce Office 97 orijinal s�r�m� m� yoksa
�zerine SR1 yamas� y�klenmi� s�r�m� m� kulland���n�zdan emin olun. �?imdi s�ra
geldi Registry'de yap�lacak baz� ayarlara.
· · Regedit'i �al�t�r�n.
· · Bu de�eri 1 yap�n.
· · Regedit'i �al�t�r�n.
Bir Excel tablosunda MAX() fonksiyonunu kullanarak bir alan i�erisinde en b�y�k
de�ere ula�mak olduk�a kolay. Ama benim yapmak istedi�im sadece bu say�y�
belirlemek de�il. Bu say�y� al�p binlerce say� i�eren ba�ka bir hesap tablosuna
eklemek istiyorum. Bir alan i�erisindeki en b�y�k de�erli h�crenin adresini veren
bir form�l haz�rlad�m ama bu b�y�k de�er o alanda birden fazla kere ge�erse bu
form�l i�e yaram�yor. San�r�m en b�y�k de�ere rastlad���nda o h�creyi aktif yapan
bir form�le ihtiyac�m var. Ne yapmal�y�m?
A�a��da listelenmi� olan makroyu bir deneyebilirsiniz. Makromuz tek bir fare
t�klamas� ile bir tablonun en b�y�k de�erini veya bu de�erler birden fazla ise
aralar�ndan birini buluyor. Makro aktif h�crenin yak�nlar�ndan yola ��k�yor ve
aktif h�creden b�y�k bir de�er i�eren h�creye rastlad���nda bu h�creyi aktif h�cre
yap�yor. Makroyu olu�turmak i�in Insert * Makro * Module komutlar�n� �al�t�r�n ve
a�a��da g�r�lemn metni girin. Sat�r a��klamalar�n� girmenize gerek yoktur. Makroyu
�al�t�rmak i�in, say�lar i�eren bir tablonun i�erisinde bir yere t�klay�n, Tools
men�s�nden Macro komutunu �al�t�r�n ve ekrana gelecek olan listede ilgili makro
(burada BuyukBul) ismi �zerine �ift t�klay�n. E�er makroyu kullan�l� buluyorsan�z,
ara� �ubu�una bir d��me olarak atayabilir ve gerekti�inde kolayca eri�ebilirsiniz.
'
Sub FindBig()
FindArea.Find(What:=Application.Max(FindArea), After:=ActiveCell).Active
End Sub
Ofisimde �al�anlar�n �al�ma saatlerini bir grafikte g�rmek istiyorum. B�ylece kimin
hangi saatte ula��labilir oldu�unu anlayabilece�iz. �al�anlar�n saatleri s�k s�k
de�i�iyor bunun i�in her seferinde �izim yapmak zorla��yor. Bu t�r bir "dinamik"
�al�ma saati diyagram�n� Excel ile nas�l yaratabilirim?
Son bir �ey kald�. Grafi�in �zerine sa� fare d��mesi ile t�klay�n. Ekrana gelecek
olan men�den K�lavuz �izgileri ekle komutunu �al�t�r�n. Y de�er eksenine birincil
k�lavuz �izgileri ekleyin. �te bitti
Excel'deki ' K�lavuz �izgileri' ni, fonu beyaz renk ile boyayarak yok ediyorum.
Izgaray� ba�ka bir y�ntemle kald�rmam m�mk�n m�?
H�CRELER�N rahat takip edilmesini sa�layan k�lavuz �izgileri (grid) bazen de ayak
ba�� olur. Tablodaki k�lavuz �izgileri kald�rmak i�in; Ara�lar men�s�ndeki
Se�enekler k�sm�na girin. G�r�n�m tablosundaki K�lavuz �izgi se�ene�ine t�klay�n.
Bu y�ntemi kullanmak yerine size ba�ka bir teklifimiz var: K�lavuz �izgileri
kald�rmak i�in �ok daha pratik ve uzun vadeli bir ��z�m. Ekran�n �st taraf�ndaki '
Ara� �ubuklar�na' ekleyece�imiz simge ile tek t�klama ile k�lavuz �izgilerini yok
edebilir ya da ekrana getirebilirsiniz. Ekran�n �st taraf�ndaki ara� �ubuklar�ndan
(toolbar) birinin �zerine farenin okunu getirip sa� tu�a t�klay�n. ��kan men�n�n en
alt�ndaki ' �zelle�tir' se�ene�ine t�klay�n. Kategorilerden ' formlar' � se�in. Sa�
tarafta yer alan simgelerden �zerinde noktalar olan�na t�klay�n. Pencerenin alt
taraf�nda ' k�lavuz �izgileri de�i�tirir' ta n�m� ��kacakt�r. Simgeyi farenin sol
tu�u ile tutarak �stteki ara� �ubuklar�n�n sa� taraf�ndaki bo� alana ta��y�p,
b�rak�n. �?zelle�tir penceresini kapat�n. Bundan b�yle k�lavuz �izgilerini
kald�rmak veya koymak i�in bu simgeye t�klaman�z yeterli olacakt�r. Ayn� �ekilde
�ok kulland���n�z di�er �zellikleri de benzer �ekillerde ara� �ubuklar�na
ekleyebilirsiniz.
61-TABLOLAR KULLANMA
WORD'TE b�y�k ve komplike tablolar haz�rlamak Excel'e g�re zordur. Onun i�in k���k
tablolar d��nda Excel'i kullan�n. Excel'de haz�rlad���n�z bir tabloyu Word'�n i�ine
de aktarabilirsiniz. Kopyala ve yap�t�r komutlar� bunun i�in yeterlidir.
Size di�er bir tavsiyemiz de kulland���n�z Word'� terfi ettirip, en son s�r�m�n�
kullanman�zd�r. Ofis 97'nin Word'� i�inizi kolayla�t�racakt�r.
l E�er bir klas�rdeki birden fazla Office belgesini bir kerede a�mak istiyorsan�z
Dosya A� diyalog kutusunda dosya isimlerini g�r�nce Ctrl tu�u ile isimlere tek tek
t�klay�n, isimler se�ili duruma geleceklerdir. A� d��mesine bas�n, belgelerin hepsi
s�rayla a��lacaklard�r.
l Ara� �ubuklar�ndaki d��meleri ALT tu�una bas�p bas�l� tutup d��meyi fare ile
s�r�kleyerek yeni ara� �ubuklar�na ta��yabilirsiniz.
l Soyad� standart olmayan dosyalar� metin olarak kaydederken soyad�n�n arkas�na TXT
eklenmesini engellemek i�in dosya ad�n� "DENEME.XXX" gibi olacak �ekilde t�rnak
i�aretlerinin aras�na al�n.
l Excel'de bir dizi h�creye tek bir isimle referans vermek i�in h�creleri se�ili
duruma getirin ve CTRL + F3 tu�lar�na bas�n.
l Excel'de se�ti�iniz bir alan�n grafi�ini h�zl�ca g�r�nt�lemek i�in F11 tu�una
bas�n.
Excel'de oluturdu�um bir makro var. Rakamlar� yaz�ya d�n�t�r�yor (12 ---> on iki
gibi). Olu�turdu�um makronun ismini h�creye yazd���mda makro �al�m�yor. Makroyu
�al�t�rmak i�in her seferinde men�den Ara�lar * Makro komutunu kullanmak zorunda
kal�yorum. Excel 5.0 T�rk�e kullan�yorum. Acaba Excel makrolar�n� daha h�zl�
�al�t�rmak i�in bir yol var m�?
Evet var. Hesap tablosu i�inde bir d��me yarat�p, makronuzu bu olu�turaca��n�z bir
d��meye ba�layarak kolayca �al�t�rabilirsiniz. �e �nce d��me yaratarak ba�lamak
laz�m. Bunun i�in (e�er aktif de�ilse) �izim ara� �ubu�unu g�r�n�r hale getirin. Bu
ara� �ubu�undaki d��me yaratma ara� d��mesine bas�n. �al�ma sayfas�n�n uygun bir
yerine girin ve sol fare d��mesine bas�p bas�l� tutup s�r�kleyerek bir d��me �izin.
Sol fare d��mesinden elinizi �ekti�inizde ekrana "Makro Ata" penceresi gelecektir.
Bu pencereden d��meye atanacak olan makroyu belirleyin.
Giri�: 15/04/2005
Mesaj: 353
Varsay�lan
67-BO�? H�CRELER� KONTROL ETMEK
Windows 98 alt�nda Excel 97 kullan�yorum. �?�yle bir se�enek var m� merak ediyorum.
H�crelerden birinin de�erinin ba�ka bir h�creye ba��nt�l� olarak de�i�mesini
istiyorum. K�sacas� ��yle: B s�tunundaki h�crelerinin e�er A s�tununda ayn�
sat�rdaki h�cre bo�sa �rne�in "ahmet" olmas�n�, e�er bo� de�ilse "mehmet" olmas�n�
istiyorum. Bunu yapmak i�in nas�l bir form�l veya makro kullanmam gerekiyor?
Bunu yapmak i�in makroya gerek yok. Excel'in =EBO�?SA fonksiyonu istedi�iniz g�revi
yerine getirecektir. Bunun i�in yapaca��n�z �ey �yle. A�a��daki �rnek resimde
g�r�ld��� gibi bir hesap tablosuna sahip oldu�unuzu varsayal�m. E�er B s�tunundaki
h�crelere a�a��daki form�l� girersek
=E�?ER(EBO�?SA(A1);"ahmet";"mehmet")
Excel kullanana bir �niversite ��rencisiyim. Programa pek fazla hakim olabildi�imi
s�yleyemem ancak �devlerimizde kulland���m�z grafikleri g�zelce �izdirebiliyorum.
Bilgisayardan anlayan baz� arkada�lar�mdan ald���m bilgilere g�re Excel bir
grafi�in sonunda grafi�in e�imine g�re bundan sonra gelecek olan bilgileri tahmin
edebiliyormu�. Bu �zelli�e sahip oldu�unu duymak ho�uma gitti, �devlerimde
kullanabilirim. Ancak bunun nas�l yap�laca��n� bilmiyorum. Acaba bunu bana
anlatabilir misiniz?
�?imdi, bu grafikte 2000 senesinden 2005 senesine kadar olan ciro tahminlerini de
g�r�nt�lemek isteyelim. Bunun i�in �nce grafi�i �zerindeki herhangi bir s�tuna
gidin ve Sa� fare d��mesine bas�n. Ekrana gelecek men�den E�?�L�M ��ZG�S� EKLE
komutunu �al�t�r�n. Ekrana gelecek olan diyalog kutusunda ekleyece�iniz e�ilim
�izgisinin tipini belirleyebilirsiniz. Burada birinci se�enek olan DO�?RUSAL
se�ene�ini aktif hale getirin. Daha sonra ayn� diyalog kutusunun SE�ENEKLER
b�l�m�ne gelin. Burada ka� d�nem ileriye do�ru tahmin yapt�rtmak istedi�iniz
belirleyin ve e�ilim �izgisine "gelecek y�llar�n tahmini" filan gibisinden bir isim
verin. Ayn� diyalog kutusunda GRAF�K �ZER�NDE DENKLEM� G�?R�NT�LE se�ene�ini de
aktif hale getirin ve TAMAM d��mesine bas�n.
Not: Grafi�e eklenen verilerin form�l� ve tipi ile oynayarak tahminlerinizi daha da
rafine edebilirsiniz. �?rne�in denklemi do�rusaldan �S se�ene�ine de�i�tirerek
verilerin dikey olarak de�il de daha yumu�ak bir e�imle y�kselmesini
sa�layabilirsiniz.
69-OTOMAT�K TOPLAMA
Siz herhangi bir �eyi yanl� yapm�yorsunuz. Bu problem 123 for Windows�da da var,
Quattro Pro for Windows�da da. Nedeni ise otomatik toplaman�n yatay-dikey ayr�m�
yapmamas�. E2 sat�r�nda yukar�da yer olmad��� i�in soldakileri topluyor, E3
sat�r�nda yine yukar�da sadece tek bir say� oldu�u i�in soldakileri topluyor. E4�e
gelince i�ler kar��yor ��nk� burada hem yukar�da hem de solda say�lar var. �?ncelik
yukar�daki say�lara veriliyor (zaten biz de say�lar� alt alta yaz�p toplamaz
m�y�z?) ve E2:E3 aras� toplan�yor.
Probleminizin ��z�m� �ok basit ve b�t�n hesap tablosu programlar� i�in ge�erli.
B�t�n yapaca��n�z otomatik toplama tu�una basmadan �nce B2:E4 alan�n� se�ili duruma
getirmek. Daha sonra da otomatik toplama tu�una basmak. B�yle yap�nca aynen
istedi�iniz gibi B ile D aras�ndaki say�lar toplanacak ve E s�tununa yaz�lacakt�r.
Lotus halihaz�rda 3 tane set kullanm� size [SET 4] ile ba�lamak d��yor. Listemizde
kullanaca��m�z maddeleri ITEMx=,(x burada listedeki madde numaras�n� veriyor) diye
ayr� ayr� sat�rlara giriyoruz. Listenizin hep ayn� kalmas�n� istiyorsan�z bo� bir
sat�ra
case=exact yazman�z gerekiyor. Listeyi kullanmak art�k �ok kolay istedi�iniz bir
h�creye bir madde yaz�n ve alan� belirleyin daha sonra Range * Fill by Example
komutunu �al�t�r�n. Listeniz haz�r.
Excel 5.0'da b�yle bir i�lem yapmak i�in daha az u�ra��yorsunuz. Men�den Tools*
Options komutlar�n� ve hemen ard�ndan Custom List'i se�iyoruz. New Liste'e bir kere
t�klay�n ve listenizi olu�turun. Listeyi kaydetmek i�in Add'e t�klay�n.
Kullan�m ise 1-2-3 ile hemen hemen ayn�. Listeden bir maddeyi h�creye yaz�p,
h�crenin k�esinde + belirince s�r�kleyin. Ayr�ca bir yol daha var: Alan�
belirledikten sonra Edit * Fill komutlar�n� se�mek.
Quattro Pro'da da 1-2-3 ile hemen hemen ayn� yolu izliyoruz. Onun da QPW.INI isimli
bir dosyas� var. Kal�plar� bu dosyaya yz�p kaydediyorsunuz. �?rne�in
�al�anlar=Serkan, Fulya, Burak dedi�inizde �al�anlar listenin ismi oluyor. Art�k
kullan�m i�in geriye sadece isimlerden birini girip alan� belirlemek ve Speed Fill
komutunu vermek kal�yor.
��eri�i kar��k h�creler i�in a��klama yazmak Excel�de �ok s�k yap�lan bir i�lemdir.
�?zellikle karma��k fonksiyonlar i�eren h�crelerin yan�na genellikle o h�credeki
form�lleri a��klayan metinler girilir. Excel�de daha �nceki s�r�mlerde de bulunan
Not ekleme �zelli�i bu a��klama metinlerinin �al�ma sayfalar�nda ve ��kt�larda
gereksiz yer harcamalar�n� engeller. Herhangi bir h�creye bir not eklemek i�in
Insert/Note�u se�meniz ve istedi�iniz metni girmeniz yeterlidir. E�er isterseniz ve
ses kart�n�z varsa sesli bir mesaj da kaydedebilirsiniz. Bundan sonra not eklenmi�
h�crelerin sa� �s k�elerinde k���k k�rm�z� bir ��gencik belirecektir. Bu h�crelerin
�zerine geldi�inizde notu i�eren bir kutu a��lacakt�r. Hatta kaydetmi� oldu�unuz
ses dosyas� da otomatik olarak �al�n�yor. Eh, bu kadar kolayl�k sunulunca da
kullanmamak olmaz!
=EN�OK_OLAN(B2:B8)
Hesap Tablosu yaz�l�mlar�nda, alanlar� h�cre adresleri ile tan�mlamak yerine isim
de verilebildi�ini duydum. Bu konuda beni ayd�nlat�rsan�z �ok memnun olurum.
Qattro Pro'da Edit * Names * Create komutlar�n� se�ip alan ismini yaz�n. Burada
isim verilen alan, bazen bir h�cre bazen de birden fazla h�creden olu�an bir alan
olabilir. �smi TOP olan B1..B30 alan�nda toplamak istedi�iniz say�lar�n var
oldu�unu farz edelim. Bu i�lemi, Quattro Pro ve 1-2-3'te
@SUM(B1..B30) veya
76-E�?ER ��?LEV�N�N KULLANILMASI: Benim bir hesap tablom var, tablomun bir
s�tununda de�i�ik say�lar yer al�yor. Ben, bu say�lar�n tipine g�re yandaki
h�crelere de�i�ik bilgiler yaz�lmas�n� istiyorum. �?rne�in bu say� 1 ise "ali", 2
ise "veli" yaz�lmas� gibi. Bunu nas�l ba�arabilirim.
=E�?ER(A1=1;"ali";E�?ER(A1=2;"veli";"yok"))
�eklinde olacakt�r. Burada ilk �nce A1 h�cresinin de�erinin 1 olup olmad��� kontrol
ediliyor, e�er 1 ise "ali" metni g�r�nt�leniyor. E�er de�il ise bu sefer de yine A1
h�cresinin de�erinin 2 olup olmad��� kontrol ediliyor, e�er 2 ise "veli" metni
g�r�nt�leniyor. E�er bu iki se�enekten biri de�ilse A1 h�cresinin de�eri, o zaman
da "yok" metni g�r�nt�leniyor. De�i�ik se�eneklere g�re i� i�e daha fazla E�?ER
form�l� kullanarak istedi�iniz say�n�n kar��l���nda istedi�iniz metnin
g�r�nt�lenmesini sa�layabilirsiniz. �?rnek i�in a�a��daki resme bakabilirsiniz.
Sorunuzun cevab� altta g�r�len Excel dosyas�nda sakl�. Kullan�lan form�l ise E�?
ERSAY() form�l�. Bu form�l�n iki parametresi var. Birinci parametresinde say�lacak
s�tunun adresini, ikinci parametrede ise aranacak ve say�lacak say� veya metni
veriyorsunuz.
=E�?ERSAY(A:A;B1)
�eklinde. Yani diyor ki, "A s�tununda B1 h�cresi ile ayn� olan ka� tane h�cre var?
Bana g�ster!". Sonu� olarak ekran g�r�nt�s�nden de inceleyebilece�iniz gibi, B1
h�cresine "ali" yaz�lm�, bu s�tunda 2 tane "ali" oldu�u i�in B2 h�cresinde de 2
yaz�yor.
Excel'de uzun bir liste halinde say�lar girdim. �?yle bir form�le ihtiyac�m var ki;
ortalama say�ya en yak�n say�y� bulmal�. B�yle bir form�l var m�?
=INDEX(De�erler,MATCH(MIN(ABS(De�erler-AVERAGE(De�erler))),ABS(De�erler-AVERAGE_
(De�erler))),ABS(De�erler-AVERAGE(De�erler)),0)
Elbette m�mk�n. H�cre sonuna gelen metnin alt sat�rdan devam etmesi i�lemine
Microsoft T�rk�esinde �metin sarma� ad� veriliyor. Metni sard�raca��n�z h�creleri
se�ili duruma getirin. Se�ili h�crelerin �zerinde herhangi bir noktaya sa� fare
tu�uyla t�klay�p a��lan men�den H�creleri Bi�imle komutunu �al�t�r�n. Ekrana gelen
diyalog kutusunun Hizalama b�lmesinde Metni Sar se�ene�ini i�aretleyin ve Tamam
d��mesine t�klay�n. Bu diyalog kutusunda metnin hizalanmas� ile ilgili di�er
se�enekleri de bulacaks�n�z.
D��?MELERDEN ba�lad�k, d��melerden devam edelim derim. Herhangi bir Excel ara�
�ubu�undaki d��menin �zerine fare imlecini getirip biraz bekletirseniz sar� minik
bir a��klaman�n ekrana geldi�ini g�r�rs�n�z. Genelde komutun ad�n� i�eren bu
a��klamay� istedi�iniz gibi de�i�tirebilece�inizi biliyor musunuz.
Yine bir �nceki �rnekte olu�turdu�umuz "sadece g�r�n�r h�creleri se�me" d��mesinin
a��klamas�n� "bu d��meye t�klad���n�zda sadece g�r�n�r durumdaki h�creler se�ilir,
gizli h�creler se�ilmez" �eklinde bir pehlivan tefrikas� yapmak i�in a�a��daki
ad�mlar� izleyin:
�te bu kadar. art�k bu d��menin �zerine fare imlecini getirip biraz bekleyince
yazm� oldu�unuz a��klama g�r�nt�lenecektir. �?rnek i�in a�a��daki resme
bakabilirsiniz.
· Yeni bir belge a��n ve �rnek resimde g�r�len A117 h�creleri aras�ndaki veri
taban�n�n ayn�s�n� olu�turun
· C2:C17 aras�ndaki h�creleri i�aretleyin, sonra Ekle men�s�nden Ad * Tan�mla
komutunu �al�t�r�n. Alana isim olarak "dok_ad" girin ve Tamam tu�una bas�n. Ayn�
i�lemi D217 h�creleri i�in yap�n yaln�z burada alana isim olarak "kal_sure" ismini
verin.
· Veri taban�n�z i�inden herhangi bir h�creyi se�in ve men�den Veri * �?zet Tablo
komutunu �al�t�r�n. Ekrana �zet tablo sihirbaz�n�n penceresi gelecek. Burada ilk
iki ad�m� �zerinde "ileri" yazan d��melere basarak ge�in.
· 3.ad�mda, alan tu�lar�n� (d��melerini) sa� i� tarafa s�r�kleyerek a�a��daki
g�r�nt�y� olu�turun. �?rne�in "kal� s�resi" d��mesini �zet tablonun �zerine
s�r�kledi�inizde ekranda �zerinde "toplam kal� s�resi" yazan bir d��me
g�r�nt�lenecektir.
· �zet tabloyu �rnek resimdeki gibi haz�rlad�ktan sonra �?zet Tablo sihirbaz�n�n
"son" d��mesine bas�n. Pivot tablo haz�rlanacak ve Excel belgenize
yap�t�r�lacakt�r.
· Ortalama kal� s�resini de �zet tablonun yan�nda g�r�nt�lemek i�in �zet tablonun
B1 h�cresindeki, �zerinde Veri yazan d��menin �zerine bir kere t�klay�n ve elinizi
farenin d��mesinden �ekmeden d��meyi sa�a do�ru s�r�kleyin. S�r�kleme esnas�nda
fare simgesi dikey tablodan yatay tabloya d�n�ene kadar s�r�kleme i�lemine devam
edin.
· D2 h�cresine "Median" etiketini yaz�n. D3 h�cresine
=ORTANCA(E�?ER(dok_ad=A3;1*kal_sure;""))
form�l�n� girin. Bu form�l�n bir dizi form�l� olarak i�lenmesi i�in tu�lar�na
bas�n. Ayn� form�l� D4 ve D5 h�crelerine kopyalay�n. �te median de�erleriniz!
Bu �rnekte, E�?ER() fonksiyonu her hasta i�in vizite s�resini hesaplar. Daha sonra
kullan�lan ORTANCA() fonksiyonu her doktor i�in ayr� ayr� vizite s�resinin median
de�erlerini hesaplar.
Ben de bu t�r bir soru ne zaman gelecek diye bekleyip duruyordum. Internet ile o
kadar i� i�e ge�ti ki bilgisayar kullan�c�lar�, art�k hemen hemen b�t�n i�lerini e-
mail yolu ile halletmek istiyorlar. S�yledi�iniz se�ene�in olup olmad���n�
ara�t�rd�m ve buldum. Word ile bunu ba�arabiliyorsunuz, hem de �ok g�zel
ba�arabiliyorsunuz. Bunun i�in �nce sisteminizde de�i�ik programlardan gelen e-mail
isteklerine cevap verecek bir MAPI istemcisi bulunmal�. Hemen hemen b�t�n geli�kin
e-mail programlar�ndan MAPI istemcisi olma se�ene�i bulunuyor. siz mektubunuzda
Outlook Express kulland���n�z� yazm�s�n�z. Bu y�zden �nce Outlook Express'in nas�l
MAPI istemcisi yap�laca��n� anlatay�m. Ba�ka e-mail programlar�n� kullananlar da
kendi kullanmakta olduklar� e-mail program� ile benzer ayarlar yap�p buy MAPI i�ini
ayarlayabilirler.
Outlook Express program�n� MAPI istemcisi yapmak i�in �nce program� �al�t�r�n.
TOOLS men�s�nden OPTIONS komutunu �al�t�r�n. Ekrana gelecek olan diyalog kutusunun
GENERAL b�l�m�ne gelin. Burada MAKE OUTLOOK EXPRESS MY DEFAULT SIMPLE MAPI CLIENT
(Outlook Express'i basit MAPI istemcim yap) se�ene�ini aktif hale getirin. �?rnek
i�in a�a��daki resme bakabilirsiniz.
Bu ayar� yapt�ktan sonra TAMAM d��mesine bas�p diyalog kutusunu kapat�n. MAPI
ayarlar�n�z�n aktif olabilmesi i�in Windows'u kapat�p a��n. Windows tekrar
a��ld�ktan sonra art�k istedi�iniz i�lemi yapmaya ba�layabiliriz.
A�a��daki �rnek resimde g�r�ld��� gibi bir Excel dosyas� olu�turun. G�rd���n�z gibi
birinci s�tunda e-mail g�nderece�iniz ki�inin ad�, ikinci s�tunda da bu ki�inin e-
mail adresi bulunuyor. Ben �rnekte bizim edit�rlerin e-mail adreslerini kulland�m,
elbette sizin de listeniz de�i�ik olacakt�r. Dosyay� herhangi bir isim vererek
sabit diskte bir yerlere kaydedin.
Dosyay� kaydettikten sonra Word uygulamas�n� a��n. Bir belgeye e-mail mesaj�n�z�
yaz�n. Kullan�c� isminin yaz�laca�� b�l�m� bo� b�rak�n, oraya sonra d�nece�iz. E-
mail mesaj�n�z� yazd�ktan sonra dosyay� kaydedin. Daha sonra ARA�LAR men�s�nden
ADRES MEKTUP B�RLE�?T�R komutunu �al�t�r�n. Ekrana a�a��daki �rnek resimde de
g�r�ld��� gibi �� ad�ml� bir diyalog kutusu gelecektir.
Burada �nce g�nderilecek olan mesaj�n yer ald��� belgeyi belirtmelisiniz. Bunun
i�in birinci ad�mda YARAT * MEKTUP FORMLARI komutunu �al�t�r�n. Ve ekrana gelecek
olan diyalog kutusunda ETK�N PENCERE d��mesine bas�n.
�kinci ad�mda bilgilerin al�naca�� veri taban�n� yani bizim �rne�imizdeki Excel
dosyas�n� Word'e bildirmemiz gerekiyor. Bunun i�in VER� AL d��mesine bas�n.
A��lacak olan men�den VER� KAYNA�?I A� komutunu �al�t�r�n. Ekrana gelecek olan
diyalog kutusunu kullanarak adres ve isimlerin yer ald��� EXCEL belgesini
i�aretleyin. Belgeyi a�t���n�zda, Word sayfas�nda hi�bir veri alan�n�n
i�aretlenmedi�ini bildiren bir hata mesaj� ile kar��la�acaks�n�z. BELGEY� D�ZENLE
d��mesine bas�n. Bu d��meye bas�nca diyalog kutular�n�n kapat�ld���na �ahit
olacaks�n�z. Word'�n �st taraf�na da yeni bir ara� �ubu�u eklenecek. �?imdi bu ara�
�ubu�unu kullanarak belge i�erisinde arkada�lar�n�za yollayaca��n�z e-mail
i�erisinde yer alacak olan isim soyad� e-mail adresi gibi bilgilerin nereye
yaz�laca��n� ayarlayacaks�n�z.
Bir verinin yaz�lmas�n� istedi�iniz yere imleci getirin. Daha sonra ara�
�ubu�undaki B�RLE�?T�RME ALANI EKLE men�s�n� kullanarak eklemek istedi�iniz alan�
belgeye ekleyin. �iniz bitti�inde a�a�� yukar� �rnek resimde g�r�ld��� gibi bir
Word belgesi ile kar��la�acaks�n�z.
Veri vaziyetini b�yle ayarlad�ktan sonra tekrar ARA�LAR men�s�nden ADRES MEKTUP
B�RLE�?T�R komutunu �al�t�r�n. Art�k diyalog kutusunda B�RLE�?T�R d��mesine
basabilirsiniz. Bu d��meye bast�ktan sonra ekrana gelecek olan diyalog kutusunun
sol �st taraf�ndaki a�a�� do�ru a��lan listeden "Elektronik Posta" se�ene�ini aktif
hale getirin. Bu se�ene�i aktif hale getirdikten sonra KUR d��mesine bas�n ve
burada Excel dosyas�ndan e-mail adreslerinin al�naca�� s�tunun ba�l���n� se�ili
duruma getirin. Hemen alt�nda da g�nderilecek olan e-mail mesaj�n�n SUBJECT yani
konu b�l�m�nde yazacak olan metni ayarlay�n ve TAMAM d��mesine bas�n.
�?imdi Internet'e ba�lan�n. Daha sonra tekrar Word uygulamas�na d�n�n ve Adres
Mektup birle�tirme diyalog kutusunda B�RLE�?T�R komutunu �al�t�r�n. Mail
program�n�z kullan�larak yazm� oldu�unuz e-mail mesaj� Excel dosyas�nda ayarlam�
oldu�unuz e-mail adreslerine teker teker postalanacakt�r. Ge�mi� olsun.
E�er sisteminizde Web sayfas� yazma eklentisi yoksa bu eklentiyi sisteme y�klemek
i�in Office CD'nizi bilgisayar�n CD-ROM s�r�c�s�ne tak�n. Denetim Masas�n� a��n ve
Program Ekle/Kald�r simgesine �ift t�klay�n. Buradaki listede Microsoft Office'i
bulun ve �zerine �ift t�klay�n. Ekrana gelecek olan diyalog kutusunun (Office
CD'sini takman�z� ister) TAMAM d��mesine bas�n. Office kurulum program�
�al�acakt�r. Ekrana gelecek olan diyalog kutusunun Ekle/kald�r d��mesine bas�n.
Buradaki se�eneklerden Web Sayfas� Yazma se�ene�ini aktif hale getirin ve TAMAM
d��mesine bas�n.
Burada g�r�ld��� gibi dosyam�zda bir veri alan� ve bu veri alan�n� baz alarak
�izilmi� olan bir grafik s�z konusu. �?imdi dosyay� kaydedelim, daha sonra da HTML
format�na d�n�t�rmek i�in Dosya men�s�nden HTML olarak kaydet komutunu �al�t�ral�m.
Ekrana Internet yard�mc�s� sihirbaz� gelecek. D�rt ad�mda Web dosyas� yazman�za
imkan veren bu sihirbaz�n birinci ad�m�nda HTML dosyas�na kaydedece�iniz verilerin
girilmesi istenecektir. Basit Excel dosyalar�n�n veri alanlar�n� sihirbaz otomatik
olarak tan�r ve kaydeder. Ancak karma��k dosyalar s�z konusu oldu�unda burada baz�
ayarlamalar yapman�z gerekebilir. Bir alan�n HTML dosyas�nda tablo olarak
g�r�nt�lenmesi i�in bu diyalog kutusunda Ekle d��mesine bas�n, fare ile tablo
olarak g�rmek istedi�iniz alan� se�ili duruma getirin ve Enter tu�una bas�n. Bu
alan Aral�k$x$y �eklinde listeye eklenecektir. Alanlar yukar�dan a�a��ya
listelenecektir. Web sayfas�nda �stte g�r�lmesini istedi�iniz alanlar� yukar� ok
yard�m� ile listede yukar�ya a��yabilirsiniz.
HTML dosyas�na yaz�lacak olan veri alanlar�n� bu ad�mda belirledikten sonra �leri
d��mesine bas�n. Bu d��meye bast���n�zda yeni bir ad�m gelecek. Burada dosyalar�
varolan bir HTML dosyas�na eklemek veya s�f�rdan bo� bir HTML dosyas� yaratmak
kararlar�ndan birini verebilirsiniz. Bo� bir HTML dosyas� yaratmak en iyisi,
kar��kl��a meydan vermez en az�ndan. Tekrar �leri d��mesine basarak ���nc� ad�ma
ge�elim.
88-GRAF�K YARATMAK:
EXCEL� De istedi�iniz grafi�i yaratmak ve istedi�iniz de�erleri �zerinde
g�stermek .
Microsoft Office 95 & 97'de Grafik Sihirbaz� bir �ok grafik t�r� i�erir. Bu t�rler
ya da kategoriler i�inden, temel grafik t�r�n�n bir �ok �e�idini ( alt t�r�n� )
se�ebilirsiniz. �?rne�in k�lavuz �izgileri ya da etiketler i�eren bir �e�it
se�ebilirsiniz.
Bu, Excel'i yaratanlar�n bir azizli�i. Excel'de makrolar Word'den farkl� bir
�ekilde kaydedilir. Makrolar�n�z� t�m belgelerde ge�erli k�lmak i�in �u yolu
izlemelisiniz: Excel'de bir kitap (workbook) a��n. Ara�lar*Makro Kaydet*Yeni Makro
Kaydet (Tools*Record Macro*Record New Macro) komutuna t�klay�n. Kar��n�za gelen
diyalog kutusuna yeni makronuzun ad�n� girin ve Se�enekler (Options) d��mesine
t�klay�n. Saklama Yeri (Store in) k�sm�nda Ki�isel Makro �al�ma Kitab� (Personal
Macro Workbook)
Sub BoslukSil()
c.Value=Application.Trim(c.Value)
Next c
End Sub
Form�l (i�lev) kullanarak yapt���m hesaplar�n, form�l olarak de�il, rakamsal de�er
olarak g�r�nmesini istiyorum.
Sub Form2Deger()
c.Formula=c.Value
Next c
End Sub
Excel'de yazd���n�z bir metnin yaz�ld��� h�creye tam� tam�na uymas�n� sa�lamak i�in
Bi�im*S�tun*En Uygun Geni�lik (Format*Column*AutoFit) komutunu kullanabilirsiniz.
Bu i�lemin en pratik yolu ise, metni girdikten sonra fare imlecini h�crenin
bulundu�u s�tunun ba�l���na g�t�r�p, sa� h�cre s�n�r� �zerine �ift t�klamakt�r.
Ayn� �ey sat�rlar i�in de ge�erlidir.
Excel durum �ubu�u t�m sayfalar� ayn� anda g�r�nt�lemeye yetmez. T�m sayfalar�
g�rmek i�in durum �ubu�unun sa��ndaki sola sa�a kayd�rma d��melerinin �zerine sa�
fare tu�u ile t�klay�n ve istedi�inizi se�in.
95-OTOMAT�K TOPLAM.
Excel'de bir h�creye yazd�ktan sonra <Enter> tu�una basarsan�z, etkin h�cre
se�icisi bir alt h�creye, <Shift>+<Enter> tu�una basarsan�z bir �st h�creye ge�er.
Ama genelde alt alta h�creleri de�il yan yana h�creleri dolduruyorsan�z bu d�zeni
de�i�tirebilirsiniz. Ara�lar*Se�enekler*D�zen (Tools*Options*Edit) b�lmesine girin,
Y�n b�lmesini Sa� olarak belirleyin. Art�k <Enter> tu�una bast���n�zda bir sa�daki
h�cre se�ilecek.
97-HIZLI KOPYALAMA.
Bir h�crenin i�eri�ini bir alttaki h�creye kopyalamak istiyorsan�z, alt h�creye
gidip <Ctrl>+<"> tu�lar�na bas�n.
98-FORM�L KOPYALAMA.
Ayn� form�l� ayn� anda birden fazla h�creye girmek i�in, h�crelerin t�m�n� se�in,
form�l� yaz�n ve <Ctrl>+<Enter> tu�una bas�n.
B�y�k bir veri alan�n� fare ile kayd�rarak se�mek yerine bir anda geni� bir se�ili
alan olu�turabilirsiniz. Bunun i�in <Ctrl>+* tu�lar�na basman�z yeterli. Excel
sizin i�in bu b�y�k alan� se�ecektir.
Diyelim ki, Sayfa1'in D s�tununa mart ay� giderlerini kalem kalem girdiniz ve s�tun
sonunda t�m giderleri toplay�p mart ay� giderlerini buldunuz. Bu toplam� ba�ka
h�crelerde kullanacaksan�z kopyalay�p yap�t�rmak yetmez; ��nk� form�lde h�cre
adresleri yeni h�crenin konumuna g�re de�i�ir; yani bir anlamda de�erler de�il
form�l
�?rne�in mart ay� toplam�, Sayfa1'in D5 h�cresinde ise bunu ba�ka bir sayfadaki
ba�ka bir h�creye kopyalarken =Sayfa1!D5 form�l�n� kullanman�z gerekir. Bunun
pratik yolu ise, kaynak al�nacak h�crelere bir ad vermektir. �?rne�in, orijinal
mart ay� toplam�n�n bulundu�u h�creyi se�ip Ekle*Ad*Tan�mla (Insert*Name*Define)
komutunu �al�t�r�rsan�z, kar��n�za Ad Tan�mla (Define Name) diyalog kutusu ��kar.
�al�ma kitab�ndaki adlar (Names in workbook) k�sm�na bir ad girin (�rne�in
mart_toplam). Burada s�zc�kler aras�nda bo�luk b�rakmamaya dikkat edin. Tamam
d��mesine t�klad���n�zda o h�crenin bir ismi olur. Art�k o �al�ma kitab�n�n
herhangi bir sayfas�nda herhangi bir h�creye =mart_toplam yazd���n�zda, orijinal
h�credeki mart ay� toplam� g�r�necek.
#SAYI/0! (#DIV /0!) Form�l�n�z bir say�y� s�f�ra b�lmeye veya b�lme i�lemi i�in bo�
bir h�creye g�ndermeye �al��yor. Bildi�iniz gibi bir say� s�f�ra b�l�nemez.
#AD? (#NAME?) Form�l, �al�ma tablosunda bulunmayan bir alan ad�na ba�vuru yap�yor.
H�crelerinizi adland�rd�ysan�z, yaz�m yanl�� yapm� ta olabilirsiniz.
#SAYI! (#NUMBER!) Form�l�n�zde bir say� ile ilgili bir sorunla kar��la�t���n�z�
g�sterir. Bu, Excel form�l�nde yanl� t�rde bir ba��ms�z de�i�ken veya hesaplama
sonucu, �al�ma sayfas�nda g�r�nt�lenemeyecek kadar b�y�k veya k���k bir de�er
olabilir.
#REF! Excel, ge�ersiz bir h�cre ba�vurusu ile kar��la�t���nda belirir. Bu, form�l
i�inde ba�vurulmu� bir h�creyi sildi�inizde veya �zerine ba�ka bir h�cre
yap�t�rd���n�zda olabilir.
#DE�?ER! (#VALUE!) Bir form�lde yanl� t�rde bir ba��ms�z de�i�ken, yanl� t�r bir
i�lem kulland���n�zda veya metin giri�i i�eren h�crelere ba�vuru yapan matematik
i�lemler yapmaya kalk�t���n�zda belirir.
Excel'i her a�t���n�zda, kar��n�za bo� bir kitap sayfas� gelir. Mevcut bir Excel
dosyas�n� a�acaksan�z, bu sayfa bo�u bo�una a��lm� olur. Excel'in sayfas�z olarak
a��lmas�n�
istiyorsan�z, masa�st�nde bir Excel k�sayolu yarat�n. Bu k�sayola sa� fare tu�u ile
t�klay�p �?zellikler (Properties) komutunu �al�t�r�n.
K�sayol (Shortcut) b�lmesinin Hedef (Target) k�sm�nda yaz�l� program yolunun sonuna
/E parametresini ekleyin.
103-OTOMAT�K DOLDURMA:
i�lemi yaparsan�z, geri kalan h�creler (3, 4, 5,�) olarak dolar. Bu t�r verilerde
ilk iki h�creye birer atlamal� doldurma yaparsan�z (�rne�in 1 ve 3 ya da Ocak,
Mart) otomatik doldurma i�lemi de birer atlamal� devam eder (1, 3, 5, 7, 9� veya
Ocak, Mart, May�s,� gibi). Sadece g�n, ay ve rakamlarla da s�n�rl� de�ilsiniz.
Otomatik doldurulacak serileri
104-OTOMAT�K S�ZME:
Excel'de her s�tuna girdi�imiz veriler uzad�k�a uzuyor. Bazen tablonun tamam�n�
de�il, belirli bir de�ere sahip girdileri g�r�nt�lemek istiyoruz. Bunu nas�l
yapar�z?
Bunun �� yolu var: Basit Yap�t�rma (bkz. Bunlar� da Bilin!; xx. Tablo Yap�t�rma);
G�mme; ve Ba�lama. Basit yap�t�rma hesap tablosunun sadece bir g�r�nt�s�n�
yap�t�r�r. Excel'de bu hesap tablosunu a��p yapaca��n�z de�i�iklikler, Word'e
yap�t�r�lm� tabloya yans�maz. G�mme (Embedding) i�leminde ise, Excel tablosunda
yapaca��n�z de�i�iklikler Word'e yap�t�r�lm� tabloya yans�maz, ancak Word'deki
tablo �zerine �ift t�klad���n�zda, tablo ile birlikte Word'�n ara� �ubu�u ve
men�leri
Excel'de girdi�imiz verileri bir form halinde d�zenlemek, bu forma yeni veriler
girmek ve istedi�imiz verileri aratmak m�mk�n m�?
Yeni (New) komutuna t�klayarak ilgili alanlara yeni veriler eklerseniz, bunlar
Excel tablonuzda en alt sat�ra eklenecektir. Bu �ekilde b�y�k bir veritaban�
olu�turduysan�z, �?l��t (Criteria) komutuna t�klayarak istedi�iniz gibi arama
yapt�rabilirsiniz.
Excel'de bir zaman serisine g�re girdi�imiz verilerle bir �ubuk grafik haz�rlad�k.
Bu �ubuk grafik �zerinde serinin genel gidi�ini (trendini) g�sterebilir miyiz?
Excel'de Sayfa1 de haz�rlad���m bir formun ba�l��� A1 ile A10 h�creleri aras�nda
bulunmaktad�r. Sayfa1 de A s�tununa yaz�lm� bu verileri Sayfa2 de 1. sat�ra
kopyalamak istiyorum. Bu i�lemi yapabilece�im en k�sa yol hangisidir?
VBA ActiveCell
VBA Application.ScreenUpdating = False
VBA Application.ScreenUpdating = True
VBA Application.Wait(Now + TimeValue("00:00:01"))
VBA Sub MyProc
msgbox WorksheetFunctions.Average(Range("A1:A5"))
msgbox WorksheetFunctions.Max(Range("A1:A5"), _
Range("C1:C5))
End Sub
VBA NewWorkbook.Close
VBA Excel predefined procedure Workbook_Open() associated with the
workbook component
VBA Excel predefined procedure Workbook_BeforeClose() associated
with the workbook component
VBA Sub MyProc
ActiveWorkbook.Name
End Sub
VBA Range("B1").Value = 12
VBA MyNumber = Range("MyCell").Value
VBA Range("B1").Value = "DOG"
VBA MyString = Range("MyCell").Value
VBA Range("B1:E5").Cells(4,2).Value
'or
Range("B1:E5").Offset(3,1).Value
VBA Range("B1:E5").Cells(2,5).Value
Range("B1:E5").Offset(1,4).Value
VBA Sub MyProc
'Following will display $B$3
msgbox Range("B3").Address
'Following will display $B$3:$D$5
msgbox Range("B3:D5").Address
'Cell B5 is named "MyCell", following will display $B$5
msgbox Range("MyCell").Address
End Sub
VBA Range("B1:E5").ClearContents
VBA Rem The following will display "Sheet1MyCell"
Rem followed by "Sheet2MyCell"
Worksheets("Sheet1").Activate
MsgBox Range("MyCell").Value
Worksheets("Sheet2").Activate
MsgBox Range("MyCell").Value
VBA Sub SomeProcedure
Range("MyChartData").Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.Name = "Sample Chart"
ActiveChart.SetSourceData _
Source:=Sheets("Example3").Range("ChartData"), _
PlotBy:= xlColumns
ActiveChart.Location Where:=xlLocationAsObject, _
Name:="Example3"
With ActiveChart
.HasTitle = True
.HasLegend = False
.ChartTitle.Characters.Text = "Sample Chart"
.Axes(xlCategory, xlPrimary).HasTitle = True
.Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text =
Category
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text =
Amount
End With
End Sub
Sub MyButton_Click()
msgBox "Button Clicked"
MyButton.Enabled = False
End Sub
--------------------------------------------