InputBox Türleri - Microsoft Excel


InputBox türlerinin ayrı ayrı kod olarak verildiği VBA kodudur.

Kod


Option Explicit

Sub FormulInputBox()
    Dim deger As String
    
    deger = Application.InputBox("Bir formül girin:", Type:=0)
    MsgBox deger
End Sub

Sub SayiInputBox()
    Dim deger As Long
    
    deger = Application.InputBox("Bir sayı girin:", Type:=1)
    MsgBox deger
End Sub

Sub MetinInputBox()
    Dim deger As String
    
    deger = Application.InputBox("Bir metinsel ifade girin:", Type:=2)
    MsgBox deger
End Sub

Sub BoolInputBox()
    Dim deger As Boolean
    
    deger = Application.InputBox("Bir mantıksal ifade girin:", Type:=4)
    MsgBox deger
End Sub

Sub AlanInputBox()
    Dim deger As Range
    
    deger = Application.InputBox("Bir hucre ya da alan girin:", Type:=8)
    MsgBox deger
End Sub

Sub HataInputBox()
    Dim deger As String
    
    deger = Application.InputBox("Bir metinsel ifade girin:", Type:=16)
    MsgBox deger
End Sub

Sub DiziInputBox()
    Dim deger As String
    
    deger = Application.InputBox("Bir dizi ifade girin:", Type:=64)
    MsgBox deger
End Sub

Etiketler
microsoft excel microsoft excel vba microsoft excel vba inputbox işlemleri