Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default form and module

Hi,

i wrote a function into a module and when i start my excel document, i
display a form.
this form allow me to perform some actions, especially to run a function.
when this function is executed, i want to hide my main form and display
progression of my function calculation on another form.
this second form should just display a progress bar and display a message
progression text like "150 records done over 40000..."

questions are :
1. how can i display on the excel document opening, my main form ?
2. how can i force user to have only access to the main form and not to
excel menu itself ?
3. how to actualize my 2nd form (progression form) with the progression bar
and the text ? usually excel doesn't update it and seems to be frozen, but
behind this it works normally but use 100% of CPU.

thanks a lot,

Maileen
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default form and module

1. The Workbook_Open event procedure happens as soon as you open the file, so
in the VB editor, in the project explorer select "ThisWorkbook" and add the
event procedu
Private Sub Workbook_Open()
MyUserForm.Show
End Sub

2. The CommandBars collection is a collection of all the menus and toolbars
- each one has an enabled and visible property - set one of these to false
for each of the commandbars you want to keep your users from accessing.

3. Excel keeps processing your code without updating the screen - so it is
"updating" just not repainting the screen so you can see the updates. I
assume you are using some sort of loop to do the calculations and update the
form - each time through the loop add these lines and I think you will be
able to watch the progress:
DoEvents
MyUserForm.Repaint

HTH
K Dales

"Maileen" wrote:

Hi,

i wrote a function into a module and when i start my excel document, i
display a form.
this form allow me to perform some actions, especially to run a function.
when this function is executed, i want to hide my main form and display
progression of my function calculation on another form.
this second form should just display a progress bar and display a message
progression text like "150 records done over 40000..."

questions are :
1. how can i display on the excel document opening, my main form ?
2. how can i force user to have only access to the main form and not to
excel menu itself ?
3. how to actualize my 2nd form (progression form) with the progression bar
and the text ? usually excel doesn't update it and seems to be frozen, but
behind this it works normally but use 100% of CPU.

thanks a lot,

Maileen

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
Design Best Practices: Form Control Code in Worksheet or Module Bing Excel Programming 2 December 23rd 04 02:31 PM
Copy VBA Module and Form from Workbook to another workbook topaiva Excel Programming 1 November 25th 04 03:47 PM
Help with Importing Form Module into external xls. file Kevin Daly[_2_] Excel Programming 1 October 19th 04 12:09 AM
Form.show error in module 3 GMet Excel Programming 3 September 9th 04 07:44 PM
Updating form labels from code in a module news.verizon.net[_2_] Excel Programming 2 October 29th 03 04:03 AM


All times are GMT +1. The time now is 10:38 AM.

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"