Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

10 Ağustos 2010 Salı

Workbook Customize


'Module1
'Windows XP® Office 2003® Normal Referance List
'Description: Visual Basic For Applications, FullPath: C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL
'Description: Microsoft Excel 11.0 Object Library, FullPath: C:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE
'Description: OLE Automation, FullPath: C:\WINDOWS\system32\stdole2.tlb
'Description: Microsoft Office 11.0 Object Library, FullPath: C:\Program Files\Common Files\Microsoft Shared\OFFICE11\MSO.DLL
'Description: Microsoft Forms 2.0 Object Library, FullPath: C:\WINDOWS\system32\FM20.DLL
Option Explicit
Private Declare Function GetActiveWindow32 Lib "USER32" Alias "GetActiveWindow" () As Integer
Private Declare Function SendMessage32 Lib "USER32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Declare Function ExtractIcon32 Lib "SHELL32.DLL" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long
Private i As Integer
Private WS As Worksheet
Private CB As CommandBar
Private CBP As CommandBarPopup
Private MNT(1 To 9999) As Object 'Menü Nesne Tercihi
Private AMNT(1 To 9999) As Object 'Alt Menü Nesne Tercihi
Private MSS As Integer 'Menü Sayfası Satırı
Private MH As Integer 'Menü Hiyerarşisi
Private SMH As Integer 'Sonraki Menü Hiyerarşisi
Private PvM As Variant 'Pozisyon Veya Makro
Private MB 'Menü Başlığı
Private MA 'Menü Ayırım
Private MS 'Menü Simgesi
Private MU 'Menü Uygulama
Private ExcelBaşlık As String, SayfaBaşlık As String
Private Simge As Long, Pencere As Long
Sub Auto_Open()

On Error Resume Next
Call Sayfa_Düzeni
Call Simge_Değiştir("C:\Program Files\Microsoft Office\OFFICE11\MSN.ico")
Call Exceli_Özel_Duruma_Getir
Call Menü_Boşalt
Call Menü_Yap
Sheets("Kapak").Select

End Sub
Private Sub Simge_Değiştir(SeçilenSimge As String)

On Error Resume Next
ExcelBaşlık = Application.Caption
SayfaBaşlık = ActiveWindow.Caption
ActiveWindow.Caption = "Program Bütçeleme ve İzleme Değerelendirme"
Application.Caption = "[PBİD®] "
Simge = ExtractIcon32(0, SeçilenSimge, 0)
Pencere = GetActiveWindow32()
SendMessage32 Pencere, &H80, 1, Simge 'Büyük Icon
SendMessage32 Pencere, &H80, 0, Simge 'Küçük Icon

End Sub
Private Sub Exceli_Özel_Duruma_Getir()

On Error GoTo Devam
Application.CommandBars("Toolbar List").Enabled = False 'CommandBars'daki Ters (RightClick) Tıkla PopUp Menü
For Each CB In Application.CommandBars

If CB.Type = msoBarTypePopup Then CB.Enabled = False 'Sheet'deki Ters Tıkla (RightClick) PopUp Menü

Next CB
Devam:
On Error Resume Next
With Application

.DisplayFormulaBar = False
.DisplayStatusBar = False
.ShowWindowsInTaskbar = False
.CommandBars("Standard").Visible = False
.CommandBars("Formatting").Visible = False
.CommandBars("Borders").Visible = False
.CommandBars("Chart").Visible = False
.CommandBars("Control Toolbox").Visible = False
.CommandBars("Drawing").Visible = False
.CommandBars("External Data").Visible = False
.CommandBars("Forms").Visible = False
.CommandBars("Formula Auditing").Visible = False
.CommandBars("List").Visible = False
.CommandBars("Picture").Visible = False
.CommandBars("PivotTable").Visible = False
.CommandBars("Protection").Visible = False
.CommandBars("Reviewing").Visible = False
.CommandBars("Stop Recording").Visible = False
.CommandBars("Text To Speech").Visible = False
.CommandBars("Visual Basic").Visible = False
.CommandBars("Web").Visible = False
.CommandBars("WordArt").Visible = False
.CommandBars("Microsoft Office Live Add-in").Visible = False
.OnKey "^c", ""
.OnKey "^v", ""
.OnKey "+{DEL}", ""
.OnKey "+{INSERT}", ""
.CellDragAndDrop = False

End With
Call Etkinlik(21, False) ' Cut
Call Etkinlik(19, False) ' Copy
Call Etkinlik(22, False) ' Paste
Call Etkinlik(755, False) 'Paste Special
With ActiveWindow

.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False

End With

End Sub
Private Sub Menü_Boşalt()

On Error GoTo Son
Do Until IsError(Application.CommandBars(1).Index)

i = Application.CommandBars(1).Index
Application.CommandBars(1).Controls(i).Delete

Loop
Son:

End Sub
Private Sub Menü_Yap()

On Error Resume Next
Set WS = ThisWorkbook.Sheets("Menü") 'Menü Sayfası
MSS = 2 'Menü Sayfası İlk Menü Satırı
For i = 1 To 999

Set MNT(i) = Nothing

Next i
Do Until VBA.IsEmpty(WS.Cells(MSS, 1))

With WS

MH = .Cells(MSS, 1) 'Menü Hiyerarşisi
MB = .Cells(MSS, 2) 'Menü Başlığı
PvM = .Cells(MSS, 3) 'Ana Menü Pozisyonu veya Menü Makro Adı
MA = .Cells(MSS, 4) 'Menüler Arası Ayrım
MS = .Cells(MSS, 5) 'Menü Simgesi
MU = .Cells(MSS, 6) 'Menü Uygulama [Enabled/Disabled]
SMH = .Cells(MSS + 1, 1) 'Sonraki Menü Hiyerarşisi

End With
Select Case MH

Case 1

Set MNT(MH) = Application.CommandBars(1).Controls.Add(Type:=msoControlPopup, Before:=PvM, Temporary:=True)
MNT(MH).Caption = MSS - 1 & ": " & MB
MNT(MH).BeginGroup = MA
MNT(MH).Enabled = MU

Case Is > 1

If SMH > MH Then

Set MNT(MH) = MNT(MH - 1).Controls.Add(Type:=msoControlPopup)
MNT(MH).Caption = MSS - 1 & ": " & MB
If MS <> "" Then MNT(MH).FaceId = MS
If MA <> "" Then MNT(MH).BeginGroup = MA
If MU <> "" Then MNT(MH).Enabled = MU

Else

Set MNT(MH) = MNT(MH - 1).Controls.Add(Type:=msoControlButton)
MNT(MH).Caption = MSS - 1 & ": " & MB
If MS <> "" Then MNT(MH).FaceId = MS
If MA <> "" Then MNT(MH).BeginGroup = MA
If MU <> "" Then MNT(MH).Enabled = MU
If PvM <> "" Then MNT(MH).OnAction = PvM

End If

End Select
MSS = MSS + 1

Loop

End Sub
Private Sub Exceli_Orjinal_Duruma_Getir()

On Error GoTo Devam
CommandBars("Toolbar List").Enabled = True 'CommandBars'daki Ters (RightClick) Tıkla PopUp Menü
For Each CB In CommandBars

If CB.Type = msoBarTypePopup Then CB.Enabled = True 'Sheet'deki Ters (RightClick) Tıkla PopUp Menü

Next CB
Devam:
On Error Resume Next
MenuBars(xlWorksheet).Reset
With Application

.DisplayFormulaBar = True
.DisplayStatusBar = True
.ShowWindowsInTaskbar = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
.CommandBars("Borders").Visible = False
.CommandBars("Chart").Visible = False
.CommandBars("Control Toolbox").Visible = False
.CommandBars("Drawing").Visible = False
.CommandBars("External Data").Visible = False
.CommandBars("Forms").Visible = False
.CommandBars("Formula Auditing").Visible = False
.CommandBars("List").Visible = False
.CommandBars("Picture").Visible = False
.CommandBars("PivotTable").Visible = False
.CommandBars("Protection").Visible = False
.CommandBars("Reviewing").Visible = False
.CommandBars("Stop Recording").Visible = False
.CommandBars("Text To Speech").Visible = False
.CommandBars("Visual Basic").Visible = False
.CommandBars("Web").Visible = False
.CommandBars("WordArt").Visible = False
.CommandBars("Microsoft Office Live Add-in").Visible = False
.OnKey "^c"
.OnKey "^v"
.OnKey "+{DEL}"
.OnKey "+{INSERT}"
.CellDragAndDrop = True

End With
Call Etkinlik(21, True) ' Cut
Call Etkinlik(19, True) ' Copy
Call Etkinlik(22, True) ' Paste
Call Etkinlik(755, True) 'Paste Special
With ActiveWindow

.DisplayGridlines = True
.DisplayHeadings = True
.DisplayOutline = True
.DisplayZeros = True
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True

End With
Call Simge_Değiştir("EXCEL.exe")
Application.Caption = ExcelBaşlık
ActiveWindow.Caption = SayfaBaşlık

End Sub
Private Sub Etkinlik(Id As Integer, Enabled As Boolean)

Dim CB As CommandBar
Dim C As CommandBarControl
For Each CB In Application.CommandBars

Set C = CB.FindControl(Id:=Id, recursive:=True)
If Not C Is Nothing Then C.Enabled = Enabled

Next CB

End Sub
Private Sub Sayfa_Düzeni()

On Error Resume Next
ThisWorkbook.Sheets("Menü").Select
If VBA.Err.Number > 0 Then 'Örnek menü sayfası kurar

ThisWorkbook.Worksheets.Add
ActiveSheet.Name = "Menü"
VBA.Err.Number = 0
ThisWorkbook.Sheets("Menü").Select
Range("A1").FormulaR1C1 = "Menü Hiyerarşisi": Range("B1").FormulaR1C1 = "Menü Başlığı": Range("C1").FormulaR1C1 = "Makro veya Pozisyonu": Range("D1").FormulaR1C1 = "Menü Ayırımı": Range("E1").FormulaR1C1 = "Menü Simgesi": Range("F1").FormulaR1C1 = "Menü Uygulama"
Range("A2").FormulaR1C1 = "1": Range("B2").FormulaR1C1 = "Dosya": Range("C2").FormulaR1C1 = "1": Range("D2").FormulaR1C1 = "": Range("E2").FormulaR1C1 = "": Range("F2").FormulaR1C1 = "TRUE"
Range("A3").FormulaR1C1 = "2": Range("B3").FormulaR1C1 = "Sakla ve Excel'e Dön": Range("C3").FormulaR1C1 = "Makro1": Range("D3").FormulaR1C1 = "": Range("E3").FormulaR1C1 = "3": Range("F3").FormulaR1C1 = "TRUE"
Range("A4").FormulaR1C1 = "2": Range("B4").FormulaR1C1 = "Sakla ve Excel'den Çık": Range("C4").FormulaR1C1 = "Makro2": Range("D4").FormulaR1C1 = "": Range("E4").FormulaR1C1 = "1640": Range("F4").FormulaR1C1 = "TRUE"
Range("A5").FormulaR1C1 = "1": Range("B5").FormulaR1C1 = "Menü1": Range("C5").FormulaR1C1 = "2": Range("D5").FormulaR1C1 = "": Range("E5").FormulaR1C1 = "": Range("F5").FormulaR1C1 = "TRUE"
Range("A6").FormulaR1C1 = "2": Range("B6").FormulaR1C1 = "Menü1.1": Range("C6").FormulaR1C1 = "Uyarı_Makrosu": Range("D6").FormulaR1C1 = "": Range("E6").FormulaR1C1 = "36": Range("F6").FormulaR1C1 = "TRUE"
Range("A7").FormulaR1C1 = "2": Range("B7").FormulaR1C1 = "Menü1.2": Range("C7").FormulaR1C1 = "Uyarı_Makrosu": Range("D7").FormulaR1C1 = "": Range("E7").FormulaR1C1 = "36": Range("F7").FormulaR1C1 = "TRUE"
Range("A8").FormulaR1C1 = "2": Range("B8").FormulaR1C1 = "Menü1.3": Range("C8").FormulaR1C1 = "Uyarı_Makrosu": Range("D8").FormulaR1C1 = "": Range("E8").FormulaR1C1 = "36": Range("F8").FormulaR1C1 = "TRUE"
Range("A9").FormulaR1C1 = "2": Range("B9").FormulaR1C1 = "Menü1.4": Range("C9").FormulaR1C1 = "": Range("D9").FormulaR1C1 = "": Range("E9").FormulaR1C1 = "": Range("F9").FormulaR1C1 = "TRUE"
Range("A10").FormulaR1C1 = "3": Range("B10").FormulaR1C1 = "Menü1.4.1": Range("C10").FormulaR1C1 = "Uyarı_Makrosu": Range("D10").FormulaR1C1 = "": Range("E10").FormulaR1C1 = "36": Range("F10").FormulaR1C1 = "TRUE"
Range("A11").FormulaR1C1 = "3": Range("B11").FormulaR1C1 = "Menü1.4.2": Range("C11").FormulaR1C1 = "Uyarı_Makrosu": Range("D11").FormulaR1C1 = "": Range("E11").FormulaR1C1 = "36": Range("F11").FormulaR1C1 = "TRUE"
Range("A12").FormulaR1C1 = "3": Range("B12").FormulaR1C1 = "Menü1.4.3": Range("C12").FormulaR1C1 = "Uyarı_Makrosu": Range("D12").FormulaR1C1 = "": Range("E12").FormulaR1C1 = "36": Range("F12").FormulaR1C1 = "TRUE"
Range("A13").FormulaR1C1 = "3": Range("B13").FormulaR1C1 = "Menü1.4.4": Range("C13").FormulaR1C1 = "": Range("D13").FormulaR1C1 = "": Range("E13").FormulaR1C1 = "": Range("F13").FormulaR1C1 = "TRUE"
Range("A14").FormulaR1C1 = "4": Range("B14").FormulaR1C1 = "Menü1.4.4.1": Range("C14").FormulaR1C1 = "Uyarı_Makrosu": Range("D14").FormulaR1C1 = "": Range("E14").FormulaR1C1 = "36": Range("F14").FormulaR1C1 = "TRUE"
Range("A15").FormulaR1C1 = "4": Range("B15").FormulaR1C1 = "Menü1.4.4.2": Range("C15").FormulaR1C1 = "Uyarı_Makrosu": Range("D15").FormulaR1C1 = "": Range("E15").FormulaR1C1 = "36": Range("F15").FormulaR1C1 = "TRUE"
Range("A16").FormulaR1C1 = "4": Range("B16").FormulaR1C1 = "Menü1.4.4.3": Range("C16").FormulaR1C1 = "Uyarı_Makrosu": Range("D16").FormulaR1C1 = "": Range("E16").FormulaR1C1 = "36": Range("F16").FormulaR1C1 = "TRUE"
Range("A17").FormulaR1C1 = "4": Range("B17").FormulaR1C1 = "Menü1.4.4.4": Range("C17").FormulaR1C1 = "": Range("D17").FormulaR1C1 = "": Range("E17").FormulaR1C1 = "": Range("F17").FormulaR1C1 = "TRUE"
Range("A18").FormulaR1C1 = "5": Range("B18").FormulaR1C1 = "Menü1.4.4.4.1": Range("C18").FormulaR1C1 = "Uyarı_Makrosu": Range("D18").FormulaR1C1 = "": Range("E18").FormulaR1C1 = "36": Range("F18").FormulaR1C1 = "TRUE"
Range("A19").FormulaR1C1 = "5": Range("B19").FormulaR1C1 = "Menü1.4.4.4.2": Range("C19").FormulaR1C1 = "Uyarı_Makrosu": Range("D19").FormulaR1C1 = "": Range("E19").FormulaR1C1 = "36": Range("F19").FormulaR1C1 = "TRUE"
Range("A20").FormulaR1C1 = "5": Range("B20").FormulaR1C1 = "Menü1.4.4.4.3": Range("C20").FormulaR1C1 = "Uyarı_Makrosu": Range("D20").FormulaR1C1 = "": Range("E20").FormulaR1C1 = "36": Range("F20").FormulaR1C1 = "TRUE"
Range("A21").FormulaR1C1 = "5": Range("B21").FormulaR1C1 = "Menü1.4.4.4.4": Range("C21").FormulaR1C1 = "": Range("D21").FormulaR1C1 = "": Range("E21").FormulaR1C1 = "": Range("F21").FormulaR1C1 = "TRUE"
Range("A22").FormulaR1C1 = "6": Range("B22").FormulaR1C1 = "Menü1.4.4.4.4.1": Range("C22").FormulaR1C1 = "Uyarı_Makrosu": Range("D22").FormulaR1C1 = "TRUE": Range("E22").FormulaR1C1 = "36": Range("F22").FormulaR1C1 = "FALSE"
Range("A23").FormulaR1C1 = "6": Range("B23").FormulaR1C1 = "Menü1.4.4.4.4.2": Range("C23").FormulaR1C1 = "Uyarı_Makrosu": Range("D23").FormulaR1C1 = "": Range("E23").FormulaR1C1 = "36": Range("F23").FormulaR1C1 = "FALSE"
Range("A24").FormulaR1C1 = "6": Range("B24").FormulaR1C1 = "Menü1.4.4.4.4.3": Range("C24").FormulaR1C1 = "Uyarı_Makrosu": Range("D24").FormulaR1C1 = "TRUE": Range("E24").FormulaR1C1 = "36": Range("F24").FormulaR1C1 = "FALSE"
Range("A25").FormulaR1C1 = "6": Range("B25").FormulaR1C1 = "Menü1.4.4.4.4.4": Range("C25").FormulaR1C1 = "Uyarı_Makrosu": Range("D25").FormulaR1C1 = "": Range("E25").FormulaR1C1 = "36": Range("F25").FormulaR1C1 = "FALSE"
Range("A26").FormulaR1C1 = "6": Range("B26").FormulaR1C1 = "Menü1.4.4.4.4.5": Range("C26").FormulaR1C1 = "Uyarı_Makrosu": Range("D26").FormulaR1C1 = "TRUE": Range("E26").FormulaR1C1 = "36": Range("F26").FormulaR1C1 = "FALSE"
Range("A27").FormulaR1C1 = "6": Range("B27").FormulaR1C1 = "Menü1.4.4.4.4.6": Range("C27").FormulaR1C1 = "Uyarı_Makrosu": Range("D27").FormulaR1C1 = "": Range("E27").FormulaR1C1 = "36": Range("F27").FormulaR1C1 = "FALSE"

Range("A28").FormulaR1C1 = "2": Range("B28").FormulaR1C1 = "Menü1.5": Range("C28").FormulaR1C1 = "": Range("D28").FormulaR1C1 = "": Range("E28").FormulaR1C1 = "": Range("F28").FormulaR1C1 = "TRUE"
Range("A29").FormulaR1C1 = "3": Range("B29").FormulaR1C1 = "Menü1.5.1": Range("C29").FormulaR1C1 = "Uyarı_Makrosu": Range("D29").FormulaR1C1 = "": Range("E29").FormulaR1C1 = "36": Range("F29").FormulaR1C1 = "TRUE"
Range("A30").FormulaR1C1 = "3": Range("B30").FormulaR1C1 = "Menü1.5.2": Range("C30").FormulaR1C1 = "Uyarı_Makrosu": Range("D30").FormulaR1C1 = "": Range("E30").FormulaR1C1 = "36": Range("F30").FormulaR1C1 = "TRUE"
Range("A31").FormulaR1C1 = "3": Range("B31").FormulaR1C1 = "Menü1.5.3": Range("C31").FormulaR1C1 = "Uyarı_Makrosu": Range("D31").FormulaR1C1 = "": Range("E31").FormulaR1C1 = "36": Range("F31").FormulaR1C1 = "TRUE"
Range("A32").FormulaR1C1 = "3": Range("B32").FormulaR1C1 = "Menü1.5.4": Range("C32").FormulaR1C1 = "Uyarı_Makrosu": Range("D32").FormulaR1C1 = "": Range("E32").FormulaR1C1 = "36": Range("F32").FormulaR1C1 = "TRUE"

Range("A33").FormulaR1C1 = "1": Range("B33").FormulaR1C1 = "Menü2": Range("C33").FormulaR1C1 = "3": Range("D33").FormulaR1C1 = "": Range("E33").FormulaR1C1 = "": Range("F33").FormulaR1C1 = "TRUE"
Range("A34").FormulaR1C1 = "2": Range("B34").FormulaR1C1 = "Menü2.1": Range("C34").FormulaR1C1 = "Uyarı_Makrosu": Range("D34").FormulaR1C1 = "": Range("E34").FormulaR1C1 = "36": Range("F34").FormulaR1C1 = "TRUE"
Range("A35").FormulaR1C1 = "2": Range("B35").FormulaR1C1 = "Menü2.2": Range("C35").FormulaR1C1 = "Uyarı_Makrosu": Range("D35").FormulaR1C1 = "": Range("E35").FormulaR1C1 = "36": Range("F35").FormulaR1C1 = "TRUE"
Range("A36").FormulaR1C1 = "2": Range("B36").FormulaR1C1 = "Menü2.3": Range("C36").FormulaR1C1 = "Uyarı_Makrosu": Range("D36").FormulaR1C1 = "TRUE": Range("E36").FormulaR1C1 = "36": Range("F36").FormulaR1C1 = "TRUE"
Range("A37").FormulaR1C1 = "2": Range("B37").FormulaR1C1 = "Menü2.4": Range("C37").FormulaR1C1 = "Uyarı_Makrosu": Range("D37").FormulaR1C1 = "": Range("E37").FormulaR1C1 = "36": Range("F37").FormulaR1C1 = "TRUE"
Range("A38").FormulaR1C1 = "2": Range("B38").FormulaR1C1 = "Menü2.5": Range("C38").FormulaR1C1 = "Uyarı_Makrosu": Range("D38").FormulaR1C1 = "": Range("E38").FormulaR1C1 = "36": Range("F38").FormulaR1C1 = "TRUE"
Range("A39").FormulaR1C1 = "2": Range("B39").FormulaR1C1 = "Menü2.6": Range("C39").FormulaR1C1 = "Uyarı_Makrosu": Range("D39").FormulaR1C1 = "TRUE": Range("E39").FormulaR1C1 = "36": Range("F39").FormulaR1C1 = "TRUE"
With Range("A1:F1")

.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = True
.ReadingOrder = xlContext
.MergeCells = False
.Font.Bold = True
.Font.ColorIndex = 2
With .Interior

.ColorIndex = 5
.Pattern = xlSolid

End With

End With
With Range("A1,D1,E1,F1")

.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.WrapText = True
.Orientation = 90
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = True
.ReadingOrder = xlContext
.MergeCells = False

End With
With Range("A2:F39")

.Font.ColorIndex = 5
.Locked = False
.FormulaHidden = False

End With
With Range("C1")

.AddComment
.Comment.Visible = False
.Comment.Text Text:="Menü Hiyerarşisi 1 olan satırlara 1 den başlamak üzere, ardışık numaralar verilir." & Chr(10) & ""
.ShapeRange.ScaleWidth 2.31, msoFalse, msoScaleFromTopLeft
.ShapeRange.ScaleHeight 0.5, msoFalse, msoScaleFromTopLeft

End With
Columns("A:A").ColumnWidth = 6
Columns("B:B").ColumnWidth = 72
Columns("C:C").ColumnWidth = 18
Columns("D:F").ColumnWidth = 6
Range("A1:F340").Font.Size = 8
Rows("1:1").RowHeight = 54
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

End If
ThisWorkbook.Sheets("Kapak").Select
If VBA.Err.Number > 0 Then 'Kapak Sayfasını kurar

ThisWorkbook.Worksheets.Add
ActiveSheet.Name = "Kapak"
VBA.Err.Number = 0
With ActiveWindow

.DisplayFormulas = False
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
.DisplayZeros = False

End With
ActiveSheet.DisplayAutomaticPageBreaks = False
With Range("A1")

.ColumnWidth = 0.01
.RowHeight = 1

End With
Sheets("Kapak").ScrollArea = "A1"

End If
With ActiveWindow

.DisplayFormulas = False
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayHorizontalScrollBar = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
.DisplayZeros = False

End With
ActiveSheet.DisplayAutomaticPageBreaks = False

End Sub
'Menü Makroları--------------------------------------------------------------------------------------
Private Sub Uyarı_Makrosu()

MsgBox "Bir sorgulama oluşturulmamıştır...."

End Sub
Private Sub Makro1()

ThisWorkbook.Save
Call Exceli_Orjinal_Duruma_Getir

End Sub
Private Sub Makro2()

Application.DisplayAlerts = False
ThisWorkbook.Save
Application.ScreenUpdating = False
Call Exceli_Orjinal_Duruma_Getir
Application.Quit

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