Open two folders and size the windows to small and set position

rjplante

Well-known Member
Joined
Oct 31, 2008
Messages
569
Office Version
  1. 365
Platform
  1. 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.

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
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,214,940
Messages
6,122,356
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top