Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default Hide worksheet changes when userform displayed

Frank,
Put the worksheet changes in a separate sub within the form module.
Call that sub from the UserForm Activate event.
Put multiple Repaint statements in the sub.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"FClifton"
wrote in message
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Hide worksheet changes when userform displayed

Thanks Jim, that seems to work

"Jim Cone" wrote:

Frank,
Put the worksheet changes in a separate sub within the form module.
Call that sub from the UserForm Activate event.
Put multiple Repaint statements in the sub.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware


"FClifton"
wrote in message
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format problem in displayed userform Anthony Excel Worksheet Functions 8 June 30th 08 02:52 PM
Userform to have Last Updated Values Time & Date Displayed ?? Corey Excel Programming 2 December 14th 06 03:15 AM
Userform is blank when displayed SteelDetailer[_2_] Excel Programming 1 October 31st 05 05:54 AM
How to hide the column headings displayed by Excel at the left of. pc300 Excel Discussion (Misc queries) 1 January 28th 05 07:11 PM
How to have a userform displayed and be able to work in a different spreadsheet Valeria[_2_] Excel Programming 1 January 19th 04 05:22 PM


All times are GMT +1. The time now is 05:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"