|
-
Apr 30th, 2004, 08:16 AM
#1
Thread Starter
Don't Panic!
Excel - Experimenting with User Forms
Hello,
Doing some processing, well reformatting in Excel of a large amount of data.
I'd prefer to use Access but thats not an option, so...
I have some code that works fairly fast, considering.
Now I have tried a userform as an information gathering form before styling the data (copying and styling) but it appears to be running slower from the code beind the button on the form than if I used the similar code but have a pop up word art to let the user know whats happening.
Is this usual?
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
May 1st, 2004, 06:32 PM
#2
Addicted Member
Repaints of the form my be causing delays.
You could try adding in some screenupdating toggles to manually refresh the screen every so often (so the user doesn't think things have crashed.
Code:
Application.ScreenUpdating = False
'code
Application.ScreenUpdating = True
Application.ScreenUpdating = False
'code
Application.ScreenUpdating = True
If you are only using a form to gather data before a run, I would suggest that you hide the form and then run the code.
Code:
Private Sub MySub1()
userform1.show
'userform gathers data and the hides when something like a "RUN" button is clicked.
'code picks up here
End Sub
Lets say the user is filling in a textbox. When the code in a module starts up again (when the form is hidden,) just refer to the textbox on the form:
Code:
MyTempString = UserForm1.MyTextbox1.value
etc.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|