Hi Jim
I have looked through the code and the only thing i can think of is
the code to check the screen resolution and make the userforms fill
the screen may be the problem. Below is the code to one of the loops
where it opened userform 12, then 13, then 14, then 15 from a menu
userform 16. This code is to show the userforms only, there is more
code to the userforms themselves.
Any coments or alternitive ideas would be grafully recieved
Many thanks
Sub repeat()
Sheets("hide").Visible = True
Sheets("Hide").Select
' Adjusts userform size to compensate for screen resolution changes.
' Jim Cone - San Francisco, USA - Dec 2006
Dim RatioX As Single
Dim RatioY As Single
Dim ActualX As Long
Dim ActualY As Long
'Screen resolution in development environment.
'Adjust as necessary.
Const BaseX As Long = 1280
Const BaseY As Long = 800
'Call function to get actual screen resolution
Dim R As RECT
Dim hWnd As Long
Dim RetVal As Long
hWnd = GetDesktopWindow()
RetVal = GetWindowRect(hWnd, R)
ActualX = (R.x2 - R.x1)
ActualY = (R.y2 - R.y1)
'Determine ratio of actual screen resolution to
'the original or base resolution.
RatioX = ActualX / BaseX
RatioY = ActualY / BaseY
'Adjust userform magnification and size.
UserForm12.Zoom = (100 * ((RatioX + RatioY) / 2))
UserForm12.Width = UserForm12.Width * RatioX
UserForm12.Height = UserForm12.Height * RatioY
UserForm12.Show
Unload UserForm12
Set UserForm12 = Nothing
End Sub
Sub repeatparts()
Dim strRowSource As String
strRowSource = Sheets("hide").Range("b10",
Sheets("hide").Range("b65536").End(xlUp)).Address
With UserForm12.ListBox1
..RowSource = vbNullString
..RowSource = strRowSource
End With
End Sub
Sub repeatpart()
' Adjusts userform size to compensate for screen resolution changes.
' Jim Cone - San Francisco, USA - Dec 2006
Dim RatioX As Single
Dim RatioY As Single
Dim ActualX As Long
Dim ActualY As Long
'Screen resolution in development environment.
'Adjust as necessary.
Const BaseX As Long = 1280
Const BaseY As Long = 800
'Call function to get actual screen resolution
Dim R As RECT
Dim hWnd As Long
Dim RetVal As Long
hWnd = GetDesktopWindow()
RetVal = GetWindowRect(hWnd, R)
ActualX = (R.x2 - R.x1)
ActualY = (R.y2 - R.y1)
'Determine ratio of actual screen resolution to
'the original or base resolution.
RatioX = ActualX / BaseX
RatioY = ActualY / BaseY
'Adjust userform magnification and size.
UserForm13.Zoom = (100 * ((RatioX + RatioY) / 2))
UserForm13.Width = UserForm13.Width * RatioX
UserForm13.Height = UserForm13.Height * RatioY
UserForm13.Show
Unload UserForm13
Set UserForm13 = Nothing
End Sub
Sub repeatmaterial()
' Adjusts userform size to compensate for screen resolution changes.
' Jim Cone - San Francisco, USA - Dec 2006
Dim RatioX As Single
Dim RatioY As Single
Dim ActualX As Long
Dim ActualY As Long
'Screen resolution in development environment.
'Adjust as necessary.
Const BaseX As Long = 1280
Const BaseY As Long = 800
'Call function to get actual screen resolution
Dim R As RECT
Dim hWnd As Long
Dim RetVal As Long
hWnd = GetDesktopWindow()
RetVal = GetWindowRect(hWnd, R)
ActualX = (R.x2 - R.x1)
ActualY = (R.y2 - R.y1)
'Determine ratio of actual screen resolution to
'the original or base resolution.
RatioX = ActualX / BaseX
RatioY = ActualY / BaseY
'Adjust userform magnification and size.
UserForm14.Zoom = (100 * ((RatioX + RatioY) / 2))
UserForm14.Width = UserForm14.Width * RatioX
UserForm14.Height = UserForm14.Height * RatioY
UserForm14.Show
Unload UserForm14
Set UserForm14 = Nothing
End Sub