View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
FClifton FClifton is offline
external usenet poster
 
Posts: 9
Default Hide worksheet changes when userform displayed

I have a userform that is displayed when the workbook is opened. After it is
displayed, I add a new sheet and fill it with data. I want for the userform
to stay displayed while the sheet is added and updated, but I am having
trouble making this happen. Here is what I have:

In ThisWorkbook module:

Private Sub Workbook_Open()
UserFormMain.Show
End Sub

In UserFormMain:
Public Sub UserForm_Initialize()

appH = Application.Height
appW = Application.Width
appName = Application.Name
winTop = ActiveWindow.Top
winUHeight = ActiveWindow.UsableHeight

Height = appH
Width = appW

Application.ScreenUpdating = False
' Add new sheet and fill with data
ThisWorkbook.FormGroups_Initialize
Application.ScreenUpdating = True

End Sub


Thanks,
Frank