• DİKKAT

    DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
    Altın Üyelik Hakkında Bilgi

makro kaç saniye sürdü time uygulaması

snx111

Banned
Katılım
10 Ağustos 2010
Mesajlar
789
Excel Vers. ve Dili
2010 office tr
Makro bitince msxboxta makronun kaç saniye sürdügünü göstermesini istiyorum..
nasıl yazmamız lazım ?

sub sure_olcer ()

for x =1 to 1000
a = a + b
next

msgbox " makro TimeValue("00:00:01").. saniyede bitti "
end sub

gibi ....
 
Son düzenleme:
Makro bitince msxboxta makronun kaç saniye sürdügünü göstermesini istiyorum..
nasıl yazmamız lazım ?

sub sure_olcer ()

for x =1 to 1000
a = a + b
next

msgbox " makro TimeValue("00:00:01").. saniyede bitti "
end sub

gibi ....

Merhaba
Boş bir module kopyalayın ve deneyin.
Kod:
Option Explicit
Sub süreli_makro()
Dim asi As Date
asi = Time
'Kodu buraya yazın
MsgBox Format(Time - asi, "hh:mm:ss") & " Sürede İşlem Tamamlandı" & vbLf & Application.UserName, _
vbInformation, "asi_kral_1967"
End Sub
Kodun içindeki pasif yazının olduğu yere kodu yazınız.
 
Kod:
DIM StartTime, EndTime as Date

place

StartTime = Timer

at the place in your code you want to start meauring elasped time and put

EndTime = Timer

at the place to stop timing.

Then put in a

MsgBox Format(EndTime - StartTime, "0.0")

to get the elapsed time in tenths of a second.


tamamdır asi :) jet hızıyla yetiştin ....
 
Kod:
DIM StartTime, EndTime as Date

place

StartTime = Timer

at the place in your code you want to start meauring elasped time and put

EndTime = Timer

at the place to stop timing.

Then put in a

MsgBox Format(EndTime - StartTime, "0.0")

to get the elapsed time in tenths of a second.


tamamdır asi :) jet hızıyla yetiştin ....

Kolay Gelsin.
 
Alternatif:

Kod:
Sub Emre()
    Dim basla, bitir, süre
    Dim i As Long
    basla = Timer
'Yapılacak İşlemler
        For i = 1 To 30000
            Cells(i, 1) = i
        Next i
'İşlemlerin Sonu
    bitir = Timer
    süre = Format(bitir - basla, "Fixed") & " sn."
    Range("B1").Value = süre
End Sub
 
Kod:
Sub Emre()
    Dim basla, bitir, süre
    Dim i As Long
    basla = Timer
'Yapılacak İşlemler
        For i = 1 To 30000
            Cells(i, 1) = i
        Next i
'İşlemlerin Sonu
    bitir = Timer
    süre = Format(bitir - basla, "Fixed") & " sn."
    Range("B1").Value = süre
End Sub

1.48 saniyede 30.000 döngüyü tamamladı. :) amd phenom 4 x 960 black işlemcim
 
Geri
Üst