Microsoft Office Excel ® Kod Kılavuzu

Microsoft Office Excel® Code Guide

20 Kasım 2005 Pazar

Another Of The Page In The Book Creating a Backup




'UserForm1

'AddTools on UserForm1: Image1, Label1, Label2, ListBox1, SpreadSheet1, CommandButton1
Option Explicit
Dim i As Single, ii As Single, No As Single
Dim Adet As Double
Dim Sayfa As Worksheet, Adı As String, Alan As Range, Adres As String

Private Sub UserForm_Initialize()
On Error Resume Next
With Me
.Caption = "[PBİD®]Another of the page in the book Creating a Backup"
.width = 491
.height = 296
End With
Application.Visible = True
End Sub
Private Sub UserForm_Activate()
On Error Resume Next
Call SayfalarıListele
End Sub
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
On Error Resume Next
Application.Visible = True
End Sub
Private Sub ListBox1_Click()
On Error Resume Next
No = ListBox1.ListIndex
Adı = ListBox1.List(No, 0)
Set Sayfa = ThisWorkbook.Sheets(Adı)
Sayfa.Select
'Set Alan = Sayfa.UsedRange
Set Alan = Sayfa.Cells
Adres = Alan.Address
Alan.Copy
With Spreadsheet1.Sheets(1)
.Cells.ClearContents
'.Range(Adres).Paste
.Cells(1, 1).Paste
.Range("A1").Select
Application.CutCopyMode = False
End With
'With Spreadsheet1
          ‘ .Cells.ClearContents
          ' .Sheets(1).Range(Adres) = Alan.Value
'End With
End Sub
Private Sub CommandButton1_Click() '[Another of the page in the book Creating a Backup]
On Error Resume Next
ActiveSheet.Copy
Application.Dialogs(xlDialogSaveAs).Show
End Sub
Sub SayfalarıListele()
On Error Resume Next
For Each Sayfa In ThisWorkbook.Worksheets
ListBox1.AddItem Sayfa.Name
Next Sayfa
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