PDA

View Full Version : Solved: Optimize programming



Ann
01-09-2012, 04:07 AM
Hi,
I've already received help with the programming, but it's very slow.
I think it might be because of all the loops. But I'm not sure. Is there any easy way to optimize this code?

Thank you in advance:)

Kind regards,
Ann

Guide to workbook:
1. Press 'Team 1 Checkliste' button in sheet 'Udfyld skema'
2. A questionnaire pops up.
3. Output from questionnaire is printet to sheet 'Data_Team1'
4. Graphs automatically updates in sheet 'Grafisk'

Kenneth Hobs
01-09-2012, 10:41 AM
For speedup, try my routines. http://vbaexpress.com/kb/getarticle.php?kb_id=1035

I offer these recommendations:
1. Indent your code to build structure. It is easier to read and maintain then.
2. Do fewer loops. This will be easier to maintain. Select Case would probably help.
3. Use numbers rather than numbers as strings.

Ann
01-10-2012, 03:04 AM
thanks :)

Bob Phillips
01-10-2012, 04:17 AM
Ann,

as an aside, if I were to click that button and was presented with a monstrosity of a form like that, I would shut it down immediately. User-friendly it ain't.

IMO, questionnaires work much better if presented on a worksheet, it is psychological but they seem far less daunting than that form. If you feel you HAVE to have a form, I would suggest you just present one question at a time, with a little counter at the bottom. As an example, I have knocked up a quick example of my thinking. There is a lot more than can, and should, be done with it, but it shows a better approach in my view.

Ann
01-16-2012, 01:19 AM
You are absolutely right :)
I based the form on the questionnaire on paper, that has already been filled out, so it would be easy to recognize for the users. But I agree, it's not pretty.
It's a very good idea, thanks.