Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to refresh sheet while UserForm is open


In the click even of a button in my form, I am writing code to write
data to the excel sheet behind the form. However, this data is not
refreshed as the form is modal. The data on the sheet is only
refreshed once the form is closed. Is there a way to allow the user to
see the data written to the sheet while the form is still open?

I do not need continuous refresh - only at the end of my click
event...something like this....

Private Sub Btn_Click()

' code to write data to the sheet visible behind the form

' refresh the sheet so that the user can see what was written to the
sheet

' back to form - allow user to click another button etc.

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 857
Default How to refresh sheet while UserForm is open

Jay,

Maybe try setting the userform to display as non-modal. If you don't want
the user to be able to make changes on the spreadsheet while the form is
visible, you can add this line to the Initialize event of the form:

Application.Interactive = False

Excel will block all keyboard and mouse input to the worksheets but not the
user form. When the user form terminates, make sure you turn it back on by
setting it back to True.



--
Hope that helps.

Vergel Adriano


"Jay" wrote:


In the click even of a button in my form, I am writing code to write
data to the excel sheet behind the form. However, this data is not
refreshed as the form is modal. The data on the sheet is only
refreshed once the form is closed. Is there a way to allow the user to
see the data written to the sheet while the form is still open?

I do not need continuous refresh - only at the end of my click
event...something like this....

Private Sub Btn_Click()

' code to write data to the sheet visible behind the form

' refresh the sheet so that the user can see what was written to the
sheet

' back to form - allow user to click another button etc.

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default How to refresh sheet while UserForm is open


Change Application.ScreenUpdating to True after writing the data.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)


"Jay"
wrote in message
In the click even of a button in my form, I am writing code to write
data to the excel sheet behind the form. However, this data is not
refreshed as the form is modal. The data on the sheet is only
refreshed once the form is closed. Is there a way to allow the user to
see the data written to the sheet while the form is still open?

I do not need continuous refresh - only at the end of my click
event...something like this....

Private Sub Btn_Click()
' code to write data to the sheet visible behind the form
' refresh the sheet so that the user can see what was written to the sheet
' back to form - allow user to click another button etc.
End Sub

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
Refresh Userform Jeff Excel Discussion (Misc queries) 1 July 31st 07 06:42 PM
userform open when sheet activated ADK Excel Programming 11 September 7th 06 06:36 PM
VBA+API refresh userForm Greg[_31_] Excel Programming 4 July 18th 06 07:58 AM
Refresh image on userform Graham S Excel Programming 2 March 22nd 06 09:45 PM
Add a button to a sheet to open a userform PokerZan Excel Discussion (Misc queries) 1 June 17th 05 11:55 PM


All times are GMT +1. The time now is 12:20 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"