Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

10 Temmuz 2009 Cuma

Digital Clock On Sheet




'Module1

Option Explicit
Dim Hücre As Range
Dim Durdur As Boolean, Renk As Boolean

Sub SaatiBaşlat() '[Start Clock]
On Error Resume Next
Durdur = False
Set Hücre = ThisWorkbook.Worksheets("Sayfa1").Range("A1")
With Hücre
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
.Interior.ColorIndex = 5
With .Font
.Bold = True
.Size = 24
.Name = "Arial Tur"
.Size = 24
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 6
End With
End With
ThisWorkbook.Sheets("Sayfa1").ScrollArea = "A1"
Call Saat
End Sub
Sub Saat() '[Clock]
On Error Resume Next
If Durdur = True Then Exit Sub
If Renk = False Then
With Hücre
.Interior.ColorIndex = 6
.Font.ColorIndex = 5
End With
Renk = True
Else
With Hücre
.Interior.ColorIndex = 5
.Font.ColorIndex = 6
End With
Renk = False
End If
ThisWorkbook.Sheets("Sayfa1").Cells(1, 1).Value = Format(Now, "hh:mm:ss")
Application.OnTime (Now + TimeSerial(0, 0, 1)), "Saat"
End Sub
Sub SaatiDurdur() '[Stop Clock]
On Error Resume Next
Durdur = True
Set Hücre = ThisWorkbook.Worksheets("Sayfa1").Range("A1")
With Hücre
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
.Interior.ColorIndex = xlNone
With .Font
.Bold = False
.Name = "Arial Tur"
.Size = 8
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 0
End With
End With
ThisWorkbook.Sheets("Sayfa1").ScrollArea = ""
End Sub

Hiç yorum yok:

Blog Arşivi

Bu gadget'ta bir hata oluştu

Bu Blogda Ara

Contributor

Contributor
Mustafa ULUSARAÇ İstanbul, TÜRKİYE
free counters
T. C. Central Bank Indicative Exchange Rates
Currency Exchange Rate Widget,Currency Converter Widget
Borsa İstanbul