Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Design Best Practices: Form Control Code in Worksheet or Module | Excel Programming | |||
Copy VBA Module and Form from Workbook to another workbook | Excel Programming | |||
Help with Importing Form Module into external xls. file | Excel Programming | |||
Form.show error in module 3 | Excel Programming | |||
Updating form labels from code in a module | Excel Programming |