Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

20 Temmuz 2006 Perşembe

FileName Property




'Module1

Sub FileName_Property()
On Error Resume Next
Dim Rapor As String
Set fs = Application.FileSearch
Rapor = Empty
With fs
.LookIn = "C:\windows\system32"
.Filename = "cmd*.*"
If (.Execute > 0) Then
MsgBox "C:\windows\system32" & " klasörüde " & .FoundFiles.Count & " dosya(s) bulundu." & VBA.Chr(13) & VBA.Chr(13) & "Mustafa ULUSARAÇ 01ulusarac@superonline.com", vbInformation, "[PBİD®] FileName Proıperty..."
For i = 1 To .FoundFiles.Count
Rapor = Rapor & VBA.Chr(13) & .FoundFiles(i)
Next i
MsgBox Rapor & VBA.Chr(13) & VBA.Chr(13) & "Mustafa ULUSARAÇ 01ulusarac@superonline.com", vbInformation, "[PBİD®] FileName Property.."
Else
MsgBox "Herhangi bir dosya bulunamadı."
End If
End With
End Sub

10 Temmuz 2006 Pazartesi

FileType Property


'UserForm1

Option Explicit
Dim i As Single
Dim DosyaSeçimi

Private Sub UserForm_Initialize()
On Error Resume Next
Me.Caption = "[PBİD®] MsoFileType Arşivi..."
Call MsoFileTypeArşivi
ListBox1.ListIndex = 0
End Sub
Private Sub ListBox1_Change()
On Error Resume Next
Set DosyaSeçimi = Application.FileSearch
With DosyaSeçimi
.LookIn = "C:\Windows"
.FileType = ListBox1.List(ListBox1.ListIndex, 0)
If .Execute > 0 Then
Label4.Caption = .FoundFiles.Count
For i = 1 To .FoundFiles.Count
ListBox2.AddItem .FoundFiles(i)
Next i
Else
ListBox2.Clear
Label4.Caption = 0
End If
End With
End Sub
Sub MsoFileTypeArşivi()
On Error Resume Next
ListBox1.AddItem msoFileTypeAllFiles: ListBox1.List(0, 1) = "msoFileTypeAllFiles"
ListBox1.AddItem msoFileTypeBinders: ListBox1.List(1, 1) = "msoFileTypeBinders"
ListBox1.AddItem msoFileTypeCalendarItem: ListBox1.List(2, 1) = "msoFileTypeCalendarItem"
ListBox1.AddItem msoFileTypeContactItem: ListBox1.List(3, 1) = "msoFileTypeContactItem"
ListBox1.AddItem msoFileTypeDatabases: ListBox1.List(4, 1) = "msoFileTypeDatabases"
ListBox1.AddItem msoFileTypeDataConnectionFiles: ListBox1.List(5, 1) = "msoFileTypeDataConnectionFiles"
ListBox1.AddItem msoFileTypeDesignerFiles: ListBox1.List(6, 1) = "msoFileTypeDesignerFiles"
ListBox1.AddItem msoFileTypeDocumentImagingFiles: ListBox1.List(7, 1) = "msoFileTypeDocumentImagingFiles"
ListBox1.AddItem msoFileTypeExcelWorkbooks: ListBox1.List(8, 1) = "msoFileTypeExcelWorkbooks"
ListBox1.AddItem msoFileTypeJournalItem: ListBox1.List(9, 1) = "msoFileTypeJournalItem"
ListBox1.AddItem msoFileTypeMailItem: ListBox1.List(10, 1) = "msoFileTypeMailItem"
ListBox1.AddItem msoFileTypeNoteItem: ListBox1.List(11, 1) = "msoFileTypeNoteItem"
ListBox1.AddItem msoFileTypeOfficeFiles: ListBox1.List(12, 1) = "msoFileTypeOfficeFiles"
ListBox1.AddItem msoFileTypeOutlookItems: ListBox1.List(13, 1) = "msoFileTypeOutlookItems"
ListBox1.AddItem msoFileTypePhotoDrawFiles: ListBox1.List(14, 1) = "msoFileTypePhotoDrawFiles"
ListBox1.AddItem msoFileTypePowerPointPresentations: ListBox1.List(15, 1) = "msoFileTypePowerPointPresentations"
ListBox1.AddItem msoFileTypeProjectFiles: ListBox1.List(16, 1) = "msoFileTypeProjectFiles"
ListBox1.AddItem msoFileTypePublisherFiles: ListBox1.List(17, 1) = "msoFileTypePublisherFiles"
ListBox1.AddItem msoFileTypeTaskItem: ListBox1.List(18, 1) = "msoFileTypeTaskItem"
ListBox1.AddItem msoFileTypeTemplates: ListBox1.List(19, 1) = "msoFileTypeTemplates"
ListBox1.AddItem msoFileTypeVisioFiles: ListBox1.List(20, 1) = "msoFileTypeVisioFiles"
ListBox1.AddItem msoFileTypeWebPages: ListBox1.List(21, 1) = "msoFileTypeWebPages"
ListBox1.AddItem msoFileTypeWordDocuments: ListBox1.List(22, 1) = "msoFileTypeWordDocuments"
End Sub

1 Temmuz 2006 Cumartesi

Using the Graphic object




'Module1

Sub PageSetup_LeftFooterPicture()
On Error Resume Next
ActiveSheet.PageSetup.LeftFooterPicture.Filename = "C:\Documents and Settings\PC\Belgelerim\Resimlerim\Excel.jpg"
ActiveSheet.PageSetup.PrintArea = "$A$1:$D$21"
With ActiveSheet.PageSetup
.LeftHeader = ""
.CenterHeader = ""
.RightHeader = ""
.LeftFooter = "&G"
.CenterFooter = ""
.RightFooter = ""
.LeftMargin = Application.InchesToPoints(0.75)
.RightMargin = Application.InchesToPoints(0.75)
.TopMargin = Application.InchesToPoints(1)
.BottomMargin = Application.InchesToPoints(1)
.HeaderMargin = Application.InchesToPoints(0.5)
.FooterMargin = Application.InchesToPoints(0.5)
.PrintHeadings = False
.PrintGridlines = False
.PrintComments = xlPrintNoComments
.PrintQuality = 600
.CenterHorizontally = False
.CenterVertically = False
.Orientation = xlPortrait
.Draft = False
.PaperSize = xlPaperA4
.FirstPageNumber = xlAutomatic
.Order = xlDownThenOver
.BlackAndWhite = False
.Zoom = 100
.PrintErrors = xlPrintErrorsDisplayed
End With
End Sub

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