Bintang
Altın Üye
- Katılım
- 31 Ekim 2006
- Mesajlar
- 363
- Excel Vers. ve Dili
- Microsoft Office Professional Plus 2019,Türkçe
DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Merhaba üstad, özellikle excel çok ağırlaşmıştı sürekli excel de çalışırken hatalar veriyordu bende bilgisayarımda yüklü Office 32 yi Office 64 dönüştürdük. Ancak kayıtlı makrolarda hatalar vermeye başladı. Bu konuda yardımcı olmanızı rica ederim.
#if VBA7 then
Declare [COLOR=Red]PtrSafe[/COLOR] Sub MessageBeep Lib "User32" (ByVal N AS Long)
#else
Declare Sub MessageBeep Lib "User32" (ByVal N AS Long)
#end if
#If VBA7 Then
Private Declare PtrSafe Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long) As Long
Private Declare PtrSafe Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hWnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare PtrSafe Function DrawMenuBar Lib "user32" (ByVal hWnd As Long) As Long
#Else
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
#End If
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()
'ActiveCell = Calendar1.Value
'ActiveCell.NumberFormat = "dd.mm.yyyy"
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