rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 569
- Office Version
- 365
- Platform
- Windows
I am trying to use a macro to open two windows and position them side by side, as well as define the window size so they will fit on any monitor. I have the code below which will open both folders just fine, but they are stacked one on top of the other. I need help with the size and positioning of the folder windows. I have posted the question before and was able to implement the code, but it just did the same as my current code. I know I was running the correct macro, so that is not the issue. I am running windows 365 on 64 and 32 bit computers. How can I solve this issue. It would be great if I could change the values for the height and width in the code so that I could adjust the size as needed.
Thanks for the support.
Thanks for the support.
VBA Code:
Sub Final_Transfer()
Dim FinalPath As String
Dim DTPath As String
Dim AWind As Window
FinalPath = Sheets("Intro Page").Range("B20").Value
'DTPath = Sheets("Intro Page").Range("AA13").Value
DTPath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\Active Jobs\"
Application.ScreenUpdating = False
'Asks user to confirm choice.
i = MsgBox("Have all the required serial number data been scanned into this workbook?", vbYesNo + vbExclamation + vbDefaultButton2)
If i = 7 Then 'NO
'do some function.
Application.ScreenUpdating = True
Exit Sub
ElseIf i = 6 Then 'YES
Call Shell("explorer.exe " & FinalPath, vbNormalFocus)
hWnd
Call Shell("explorer.exe " & DTPath, vbNormalFocus)
Application.ScreenUpdating = True
End If
Application.ScreenUpdating = True
End Sub