Example info and codes from Magnificent Visual Basic files:

' There're more info and examples on the file. The below are only a few of them.
Magnificent Visual Basic dosyalarından örnek bilgi ve kodlar:

' Dosyada daha çok bilgi ve örnek var. Aşağıdakiler yalnızca birazıdır.

'___________________________________________________________________________________________________________________________
' To create a module and write a macro on it:
' Bir modül oluşturmak ve ona makro yazmak:

'___________________________________________________________________________________________________________________________
' Open the Word or Excel file which you want to write a macro on.
' Makro yazmak istediğiniz Word veya Excel dosyasını açın.

' Open Visual Basic Editor from Tools > Macro > Visual Basic Editor menu (Alt+F11).
' Araçlar > Makro > Visual Basic Düzenleyicisi menüsünden (Alt+F11) Visual Basic Düzenleyicisi'ni açın.

' If Project Explorer window doesn't appear automatically open from View > Project Explorer menu (Ctrl+r).
' Project Explorer penceresi otomatik olarak çıkmamışsa View > Project Explorer menüsünden (Ctrl+r) açın.

' Right click onto the name of the file on the Project Explorer window and select Insert > Module option.
' Project Explorer penceresinde dosya adına sağ tıklayın ve Insert > Module seçeneğini seçin.

' Right click onto the name of the module on the Project Explorer window and select View Code option.
' Project Explorer penceresinde modül adına sağ tıklayın ve View Code seçeneğini seçin.

' Write your macro onto the opened page. Write your code between Sub and End Sub lines like below unless otherwise specified. You can change makro name which is m1 in this example:
' Açılan sayfaya makronuzu yazın. Aksi belirtilmedikçe bütün kodları aşağıdaki gibi Sub ve End Sub satırları arasına yazın. Bu örnekte m1 olan makro adını değiştirebilirsiniz:

' For example the below macro shows a Hello message. You can delete the line between Sub and End Sub lines and write your code there:
' Örneğin aşağıdaki makro bir Merhaba iletisi gösterir. Sub ve End Sub satırları arasındaki satırı silip oraya kendi kodunuzu yazabilirsiniz:

Sub m1()
  MsgBox ("Hello. / Merhaba.")
End Sub
___________________________________________________________________________________________________________________________

'________________________________________________________________________________________________________

' Msgbox:

' İleti Kutusu:

'________________________________________________________________________________________________________

' Example / Örnek :

__n1 = MsgBox("How are you?" & vbCr & vbCr & "Nasılsınız?", vbQuestion, "Hello / Merhaba")

'________________________________________________________________________________________________________

' Asc, Chr:

'________________________________________________________________________________________________________

' Example / Örnek :

' Converts the lowercase letter to uppercase letter:

' Küçük harfi büyük harfe dönüştürür:

__n1 = InputBox("Please enter a lowercase letter." & vbCr & vbCr & "Lütfen küçük bir harf yazınız.", "Hello / Merhaba")

__n2 = Asc(n1)

__n3 = Chr(n2 - 32)

__MsgBox ("The uppercase letter of the entered letter / Girilen harfin büyük harfi: " & n3)

'________________________________________________________________________________________________________

' Mod

'________________________________________________________________________________________________________

' Writes odd numbers:

' Tek sayıları yazar:

__For n1 = 0 To 20

_____If (n1 Mod 2) <> 0 Then

________MsgBox (n1)

_____End If

__Next n1

'________________________________________________________________________________________________________

' Functions:

' Fonksiyonlar:

'________________________________________________________________________________________________________

' You can use a function which you created before in a macro and you can obtain the result of the function:

' Bir makro içinde daha önceden oluşturduğunuz bir fonksiyonu kullanarak fonksiyonun sonucunu elde edebilirsiniz:

Function f1()

__ f1 = 3 + 4

End Function

 

Sub m1()

__MsgBox f1()

End Sub

'________________________________________________________________________________________________________

' The codes for some keys and key combinations:

' Bazı tuşlar ve tuş kombinasyonları için kodlar:

'________________________________________________________________________________________________________

' Alt + Tab

__Dim n1, n2

__Set n1 = CreateObject("Wscript.Shell")

__n2 = "%{TAB}"

__n1.SendKeys n2

'________________________________________________________________________________________________________

' To run another macro in a macro:

' Makro içinde başka bir makro çalıştırmak:

'________________________________________________________________________________________________________

' Runs the indicated macro:

' Belirtilen makroyu çalıştırır:

__Call m1

' or / veya:

__Application.Run "m1"

'________________________________________________________________________________________________________

' To stop running of a macro for a indicated time:

' Bir makronun çalışmasını belirtilen süre kadar durdurmak:

'________________________________________________________________________________________________________

' Stops the running of the code for indicated time (here 2 seconds):

' Kodun çalışmasını belirtilen süre kadar (burada 2 saniye) durdurur:

__Application.Wait Now + TimeSerial(0, 0, 2)

' or / veya:

__Application.Wait Now + TimeValue("00:00:02")

'________________________________________________________________________________________________________

' Stops the running of the code for indicated time (here 0.1 seconds) and allows other applications can be done:

' Kodun çalışmasını belirtilen süre kadar (burada 0.1 saniye) durdurur ve başka uygulamaların yapılmasına izin verir:

__n1 = Timer

__Do While Timer - n1 < 0.1

_____DoEvents

__Loop

'________________________________________________________________________________________________________

' To find the elapsed time of a procedure:

' Bir işlem sırasında geçen süreyi bulmak:

'________________________________________________________________________________________________________

' Gets the elapsed time of the process in seconds with 6 decimal places:

' İşlem sırasında geçen süreyi saniye cinsinden 6 basamaklı ondalık sayı olarak elde eder:

__n1 = Timer

_____' Your code / Sizin kodunuz

__n2 = Timer

__n3 = n2 - n1

'________________________________________________________________________________________________________

' Resolution of the screen:

' Ekran çözünürlüğü:

'________________________________________________________________________________________________________

' Gets resolution of the screen in pixels:

' Ekran çözünürlüğünü piksel cinsinden elde eder:

Private Declare Function GetSystemMetrics Lib "user32" (ByVal nIndex As Long) As Long

 

Sub m1()

__n1 = GetSystemMetrics(0) ' horizontal resolution (width of the screen) in pixels

__n2 = GetSystemMetrics(1) ' vertical resolution (height of the screen) in pixels

__n3 = GetSystemMetrics(62) ' height of the screen excluding TaskBar in pixels

End Sub

'________________________________________________________________________________________________________

' Date and Time:

' Tarih ve Saat:

'________________________________________________________________________________________________________

' Gets both the date and the time in the format of the system:

' Tarih ve saati sistemde ayarlanan biçimde elde eder:

__n1 = Now

'________________________________________________________________________________________________________

' Gets the hour of now:

' Şu anın saatini elde eder:

__n1 = Hour(Now)

'_______________________________________________________________________________________________________

' To format numbers:

' Sayıları biçimlendirmek:

'________________________________________________________________________________________________________

' Gets the indicated number in indicated format and rounds it if necessary:

' Belirtilen sayıyı belirtilen biçimde elde eder, gerekiyorsa yuvarlama yapar:

__n1 = 102201.5435

__n2 = Format(n1, "#,###.##")

'________________________________________________________________________________________________________

' Random numbers:

' Rastgele sayılar:

'________________________________________________________________________________________________________

' Gets the millisecond of now. It can be used to get a random number between 0-100 and gives much better result than Rnd() code:

' Şu anın salisesini elde eder. 0-100 arası rastgele sayı elde etmek için kullanılabilir ve Rnd() kodundan çok daha iyi sonuç verir:

__n1 = (Timer * 100) Mod 100

'________________________________________________________________________________________________________

' Gets a random number between 0 and 9. You can write any number instead of 9:

' 0'dan 9'a kadar rastgele bir sayı verir. 9 yerine istediğiniz sayıyı yazabilirsiniz:

__n1 = Int(Rnd() * 9) + 1

'________________________________________________________________________________________________________

' The controls of the UserForm (TextBox, ListBox, ComboBox, CommandButton, CheckBox, OptionButton, Image, Label etc)

' Kullanıcı Arayüzü'ndeki denetimler (Yazı Kutusu, Liste Kutusu, Açılır Liste Kutusu, Komut Düğmesi, İşaret Kutusu, Seçenek Düğmesi, Resim, Etiket vb)

'________________________________________________________________________________________________________

CheckBox and OptionButton / İşaret Kutusu ve Seçenek Düğmesi:

'________________________________________________________________________________________________________

' Differences of CheckBox and OptionButton:

' İşaret Kutusu ve Seçenek Düğmesi'nin farkları:

 

' The sign of a checked CheckBox is deleted when it is clicked again but isn't deleted in case of OptionButton.

' İşaretlenmiş bir İşaret Kutusu'na yeniden tıklandığında işaret silinir, Seçenek Düğmesi'nde silinmez.

 

' Some or all of the CheckBoxes of a group can be selected. When a CheckBox is checked other checked CheckBoxes aren't cleared.

' Aynı gruptaki İşaret Kutularından bazıları veya hepsi seçilebilir. Bir İşaret Kutusu işaretlendiğinde işaretlenmiş diğer İşaret Kutuları temizlenmez.

 

' Only one of the OptionButtons of a group can be selected. When an OptionButton is checked other checked OptionButton is cleared.

' Aynı gruptaki Seçenek Düğmelerinden yalnızca bir tanesi seçilebilir. Bir Seçenek Düğmesi tıklandığında işaretlenmiş diğer Seçenek Düğmesi temizlenir.

'________________________________________________________________________________________________________

TextBox / Yazı Kutusu:

'________________________________________________________________________________________________________

' Runs the indicated macro if enter key is pressed when the cursor is in the indicated TextBox:

' İmleç, belirtilen Yazı Kutusu'ndayken enter tuşuna basılırsa belirtilen makroyu çalıştırır:

Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)

__If KeyCode = 13 Then

_____Call m1

__End If

End Sub

'________________________________________________________________________________________________________

ListBox / Liste Kutusu:

'________________________________________________________________________________________________________

' Writes the indicated values to the list of the indicated ListBox:

' Belirtilen Liste Kutusu'nun listesine belirtilen değerleri yazar:

__For n1 = 1 To 50

_____UserForm1.ListBox1.AddItem (n1)

__Next n1

'________________________________________________________________________________________________________

' Makes the indicated line (here line 6) of the indicated ListBox selected:

' Belirtilen Liste Kutusu'nun listesindeki belirtilen satırı (burada 6. satırı) seçili yapar:

__UserForm1.ListBox1.ListIndex = 5

'________________________________________________________________________________________________________

' To close the userform:

' Userform'u kapatmak:

'________________________________________________________________________________________________________

' Closes the active file when the UserForm is closed:

' Userform kapatıldığında etkin dosyayı da kaydedip kapatır:

 

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

__' ............... (See below # 1)

__' ............... (See below # 2)

End Sub

 

' The below lines can be used instead of the indicated lines. / Belirtilen satırlar yerine aşağıdaki satırlar kullanılabilir:

' in Excel files / Excel dosyalarında:

__ActiveWorkBook.Save ' (See above # 1)

__ThisWorkBook.Close ' (See above # 2)

' in Word files / Word dosyalarında:

__ActiveDocument.Save ' (See above # 1)

__ActiveDocument.Close ' (See above # 2)

' in both Excel and Word files / Excel ve Word dosyalarında:

__' Closes only the active file:

__' Yalnızca o dosyayı kapatır:

__ActiveWindow.Close ' (See above # 2)

__' Closes all opened files of the application:

__' Uygulamaya ait açık bütün dosyaları kapatır:

__Application.Quit ' (See above # 2)

'________________________________________________________________________________________________________

' File and folder names:

' Dosya ve klasör adları:

'________________________________________________________________________________________________________

' Gets the names of the files with their extensions in the indicated folder:

' Belirtilen klasördeki dosya adlarını uzantısıyla birlikte elde eder:

__Set n1 = CreateObject("Scripting.FileSystemObject")

__Set n2 = n1.GetFolder("D:\folder_2\")

__Set n3 = n2.Files

_____For Each n4 In n3

_____n5 = n5 & vbCr & n4.Name

_____Next n4

'________________________________________________________________________________________________________

' To take back up of files:

' Dosyaların yedeğini almak:

'________________________________________________________________________________________________________

' Copies all the files with indicated extension into the indicated folder:

' Belirtilen klasördeki uzantısı belirtilen bütün dosyaları belirtilen klasöre kopyalar:

__Set n1 = CreateObject("Scripting.FileSystemObject")

__n1.CopyFile "D:\folder_2\*.xls", "D:\"

'________________________________________________________________________________________________________

' Last saving time of a file:

' Bir dosyanın son kayıt zamanı:

'________________________________________________________________________________________________________

' Gets the last saving time of the indicated file:

' Belirtilen dosyanın son kayıt zamanını elde eder:

 

__n1 = "D:\folder_1\file_1.txt" ' (See below # 1)

__n2 = FileDateTime(n1)

 

' The below lines can be used instead of the indicated lines. / Belirtilen satırlar yerine aşağıdaki satırlar kullanılabilir:

' in Excel files / Excel dosyalarında:

__n1 = ActiveWorkbook.FullName ' (See above # 1)

' in Word files / Word dosyalarında:

__n1 = ActiveDocument.FullName ' (See above # 1)

 

___________________________________________________________________________________________________________________________

Opening of Magnificent Visual Basic files:

Magnificent Visual Basic dosyalarının açılması:

 

Magnificent Visual Basic includes macros (visual basic codes) and to make macros able to run you have to choose medium or low from Tools - Macro - Security - Security Level menu when another Word file is opened.

Magnificent Visual Basic, makrolar (Visual Basic kodları) içermektedir ve makroların çalışabilmesi için başka herhangi bir Word dosyası açıkken Araçlar - Makro - Güvenlik - Güvenlik Düzeyi menüsünden Orta veya Düşük seçeneğini seçmeniz gerekmektedir.

 

If you choose low option Magnificent Visual Basic can be opened easily each time. If you choose medium option you have to choose enable macros option from the window which will be opened.

Düşük seçeneğini seçerseniz Magnificent Visual Basic her defasında sorunsuz açılır. Orta seçeneğini seçerseniz Magnificent Visual Basic’i her açışınızda çıkacak pencereden makroları etkinleştir seçeneğini seçmeniz gerekir.

 

___________________________________________________________________________________________________________________________

magnificent_visual_basic.rar
File Size: 176 kb
File Type: rar
Download File

 

I worked for years to be able to reach the required level of English and Visual Basic for doing this program. Therefore "please" do not upload this file to another website. Just give link to this website.

 

 

You can freely download:

Magnificent Visual Basic

version: 2012-12-03

zipped size: 0.2 MB

 

This file will be updated soon.

 

You can freely download the updated version again from this website.

 

 

Bu programı yapabilmek için gerekli İngilizce ve Visual Basic seviyesine ulaşabilmek ve programı hazırlamak için yıllarca çalıştım. Bu nedenle bu dosyayı "lütfen" başka bir siteye yüklemeyiniz. Yalnızca bu siteye bağlantı veriniz.

 

Ücretsiz bir şekilde indirebilirsiniz:

Magnificent Visual Basic

sürüm: 2012-12-03

zipli boyutu: 0.2 MB

 

Bu dosya çok yakında güncellenecektir.

 

Güncellenmiş sürümü yine bu websitesinden ücretsiz olarak indirebilirsiniz.

___________________________________________________________________________________________________________________________

You can also freely download that file:

Şu dosyayı da ücretsiz olarak indirebilirsiniz:

 

Magnificent Dictionary

Magnificent Dictionary

 

It's an Upgradeable English-Turkish, Turkish-English Dictionary with sentences.

 

It's an Excel File with many useful and open Visual Basic macro codes with English and Turkish explanations.

Cümleler içeren İngilizce-Türkçe, Türkçe-İngilizce geliştirilebilir bir sözlüktür.

 

Birçok yararlı, açık, İngilizce ve Türkçe açıklamalı Visual Basic makro kodları içeren bir Excel dosyasıdır.

 

___________________________________________________________________________________________________________________________

This page will be updated soon. Please use site map to reach other pages.
Murat Sengulen, Ankara Turkey
___________________________________________________________________________________________________________________________