ich habe folgende Fragen
1) Wie heißt der Code für Button, damit Excel beendet wird.
2) Kann man eine Userform so steuern das diese Bildschirmfüllend ist und Excel nicht mehr sichtbar ist, wenn ja wie.
Danke und einen schönen 3 Advent
Udo
Private Sub UserForm_Initialize()
Me.Height = Application.Height
Me.Width = Application.Width
End Sub
Private Sub UserForm_Initialize()
'Me.Height = Application.Height
'Me.Width = Application.Width
Dim sSize As String
sSize = ScreenResolution
With Me
.Width = Left(sSize, InStr(sSize, "x") - 1)
.Height = Right(sSize, Len(sSize) - _
InStr(sSize, "x"))
.Left = 0
.Top = 0
End With
End Sub
Private Sub UserForm_Initialize()
Me.Height = Application.Height
Me.Width = Application.Width
End Sub
Private Sub UserForm_Initialize()
'Me.Height = Application.Height
'Me.Width = Application.Width
Dim sSize As String
sSize = ScreenResolution
With Me
.Width = Left(sSize, InStr(sSize, "x") - 1)
.Height = Right(sSize, Len(sSize) - _
InStr(sSize, "x"))
.Left = 0
.Top = 0
End With
End Sub
Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, _
ByVal nIndex As Long) As Long
Declare
Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Declare
Function ReleaseDC Lib "user32" (ByVal hwnd As Long, _
ByVal hdc As Long) As Long
Const HORZRES = 8
Const VERTRES = 10
Function ScreenResolution()
'Funktion für die Darstellung der UF auf Bildschirmgröße, _
wird in "Userform_Initialize" aufgerufen:
Dim lRval As Long
Dim lDc As Long
Dim lHSize As Long
Dim lVSize As Long
lDc = GetDC(0&)
lHSize = GetDeviceCaps(lDc, HORZRES)
lVSize = GetDeviceCaps(lDc, VERTRES)
lRval = ReleaseDC(0, lDc)
ScreenResolution = lHSize & "x" & lVSize
End Function
Ende
Grüße
Franz