Two macros I have, one to size down a Word window down to 20% of the RH side of the screen, and the other to 80% on the LH side, have stopped working. (They are for reference files while I work on the other screen).
These are my macros:
Sub RestoreDown()
Dim myWindow1 As Window, myWindow2 As Window
Set myWindow1 = ActiveWindow
With myWindow1
.WindowState = xlNormal
.Top = 0
.Left = (Application.UsableWidth * 0.92) + 1
.Height = Application.UsableHeight
.Width = Application.UsableWidth * 0.2
End With
End Sub
Sub RestoreDown2()
Dim myWindow1 As Window, myWindow2 As Window
Set myWindow1 = ActiveWindow
With myWindow1
.WindowState = xlNormal
.Top = 0
.Left = (Application.UsableWidth * 0.12) + 1
.Height = Application.UsableHeight
.Width = Application.UsableWidth * 0.8
End With
End Sub
They have stopped working. I get the error message 'Object variable or With block variable not set'. I'm not aware of having changed anything.
I should point out that I'm not a technical geek. I use macros a lot for my work (copy-editing of texts) but I'm only at the 'I wish' stage of knowing a lot about VBA. Please kindly bear this in mind when responding!