Selam arkadaşlar aşağıdaki kodu Sayın Evren_Gizlen arkadaşın hazırladığı bir sayfadan almıştım kırmızı yazan yerdeki kod sıralı olmayan 80 adet textboxta geçerli olması için nasıl düzenlenebilir. (Sıralı olmayandan kastım tarih içeren textboxlar TextBox1,2,3,4, gibi sıralı değil yani Me olayına gelmiyor demek istedim)
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal HWND As Long, ByVal nIndex As Long) As Long
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal HWND As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal HWND As Long) As Long
Private TitleBarState As String
Public Property Get HWND() As Long
HWND = FindWindow(lpClassName:=IIf(Val(Application.Version) > 8, "ThunderDFrame", "ThunderXFrame"), lpWindowName:=Me.Caption)
End Property
Private Sub Calendar1_Click()
UserForm1.TextBox1.Text = Format(Calendar1.Value, "dd.mm.yyyy")
Unload Me
End Sub
Private Sub UserForm_Activate()
For a = 0 To 176.25 Step 0.05
DoEvents
Me.Height = a
Next
End Sub
Private Sub UserForm_Initialize()
Dim Userform_Style As Long
Const GWL_STYLE = (-16)
Const WS_CAPTION = &HC00000
Userform_Style = GetWindowLong(HWND:=Me.HWND, nIndex:=GWL_STYLE)
If bShow = True Then
Userform_Style = Userform_Style Or WS_CAPTION
Else
Userform_Style = Userform_Style And Not WS_CAPTION
End If
Call SetWindowLong(HWND:=Me.HWND, nIndex:=GWL_STYLE, dwNewLong:=Userform_Style)
Call DrawMenuBar(HWND:=Me.HWND)
Calendar1.Value = Date
Me.Height = 0
End Sub