Here's a test post. Not a true wysiwyg but good enough.
Private Sub closeMainPictures() On Error GoTo ErrorHandler 'closes the default main pictures if they are open. Dim objPicture As Object With frsvariables 'close the toolbar If frsobjexists(.gs_tb_current.CurrentValue, , objPicture) Then objPicture.Parent.Close 3 DoEvents End If 'main picture If frsobjexists(.gs_initial_main.CurrentValue, , objPicture) Then objPicture.Parent.Close 3 DoEvents End If 'alarm banner If frsobjexists(.gs_ab_current.CurrentValue, , objPicture) Then objPicture.Parent.Close 3 DoEvents End If 'toolbar 2 If frsobjexists(.gs_tb_current2.CurrentValue, , objPicture) Then objPicture.Parent.Close 3 DoEvents End If 'main picture 2 If frsobjexists(.gs_initial_main2.CurrentValue, , objPicture) Then objPicture.Parent.Close 3 DoEvents End If 'alarm banner 2 If frsobjexists(.gs_ab_current2.CurrentValue, , objPicture) Then objPicture.Parent.Close 3 DoEvents End If End With Exit Sub ErrorHandler: frsHandleError End Sub