Fenstergröße
26.12.2014 21:29:24
juergen_link_mail@web.de
Ich möchte Amazon.xlsm auf einer bestimmten Position und in einer bestimmten Größe öffnen.
Es zeigt mir aber das Möchten Sie diese Datei öffnen oder Speichern Fenster in der richtigen Position und Größe.
Und ein HMTL Hilfefenster erscheint.
MfG
Jürgen Link
Option Explicit
Private Declare
Sub SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, _
ByVal X As Long, _
ByVal Y As Long, _
ByVal cx As Long, _
ByVal cy As Long, _
ByVal wFlags As Long)
Private Declare
Function GetForegroundWindow Lib "user32" () As Long
Sub fensterposition()
Dim links As Integer, oben As Integer
Dim breite As Integer, hoehe As Integer
links = 100
oben = 100
breite = 500
hoehe = 200
Shell "hh.exe " & ActiveWorkbook.Path & "\" & "Amazon.xlsm", vbNormalFocus
SetWindowPos GetForegroundWindow, 0, links, oben, breite, hoehe, &H40
End Sub