Paul Sansom
Board Regular
- Joined
- Jan 28, 2013
- Messages
- 178
- Office Version
- 2021
- 2016
- Platform
- Windows
Is there a simple was to control the position of the cmd shell window.
I am using this to position userforms and popups(msgbox) and this works well.
I am using a shell cmd window for my users to choose supplementary documents sand save to a given location and would like to control the position the shell window.
This also works fine, but i have no control on shell window position?
There is more code between the lines below but these are just choosing the files and settting the path and I dont believe have a relevance to the window position?
Guidance most welcomed
I am using this to position userforms and popups(msgbox) and this works well.
Code:
' Simple "with" to put Userform in centre of monitor when I'm using 2 monitors
With MYUSERFORM
.StartUpPosition = 0
.Left = Application.Left + (0.5 * Application.Width) - (0.5 * .Width)
.Top = Application.Top + (0.5 * Application.Height) - (0.5 * .Height)
.Show
End With
I am using a shell cmd window for my users to choose supplementary documents sand save to a given location and would like to control the position the shell window.
This also works fine, but i have no control on shell window position?
There is more code between the lines below but these are just choosing the files and settting the path and I dont believe have a relevance to the window position?
Code:
ShellID = "cmd.exe"
retVal = Shell(ShellID, vbNormalFocus)
waitTime (1)
Guidance most welcomed