PC Review


Reply
Thread Tools Rate Thread

Excel 2003 - VBA - Forms

 
 
Craig Brandt
Guest
Posts: n/a
 
      8th Jul 2008
I am starting to use "userforms" to collect data. It can help ensure that
the data is valid and enforce placement.

When I inserted code "on field change" that transfered that data to the
spread sheet, there was a pause, unacceptable during data entry. I therefore
deferred changing the cells in the spreadsheet until all input was done in
the forms. This time the pause occured upon closure of the userforms, but at
17 secs, was a bit excessive.
My exit routine had a lot of the following types statements to transfer the
data: Sheets("AllAcct").Cells(2,3) = Userforms2.StartDate

Is there a better way of handling the data transfer?

Thanks,
Craig


 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      8th Jul 2008
Sounds like calc mode is automatic. If so, change to manual at least while
your code is putting data in the worksheet:

Application.Calculation = xlCalculationManual
...place data
Application.Calculation= xlCalculationAutomatic

Also, if you have any event code running, like Worksheet_Change, you might
want to turn that off too.

--
Jim
"Craig Brandt" <(E-Mail Removed)> wrote in message
news:SMMck.14996$(E-Mail Removed)...
|I am starting to use "userforms" to collect data. It can help ensure that
| the data is valid and enforce placement.
|
| When I inserted code "on field change" that transfered that data to the
| spread sheet, there was a pause, unacceptable during data entry. I
therefore
| deferred changing the cells in the spreadsheet until all input was done in
| the forms. This time the pause occured upon closure of the userforms, but
at
| 17 secs, was a bit excessive.
| My exit routine had a lot of the following types statements to transfer
the
| data: Sheets("AllAcct").Cells(2,3) = Userforms2.StartDate
|
| Is there a better way of handling the data transfer?
|
| Thanks,
| Craig
|
|


 
Reply With Quote
 
Craig Brandt
Guest
Posts: n/a
 
      8th Jul 2008
Jim:

In my younger years I sometimes tossed advice aside, assuming that it didn't
fit my application. As I get older, I find that it is best to restrict that
type thinking only to areas where I am an expert (still looking for that
area).

My first thought was that your advice didn't fit because the data being
transferred wasn't being used in any calculations. Still, following my own
advice, I tried it and it worked much better.

Excel sometimes defies logic.

Thanks a bunch,
Craig

"Jim Rech" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Sounds like calc mode is automatic. If so, change to manual at least

while
> your code is putting data in the worksheet:
>
> Application.Calculation = xlCalculationManual
> ..place data
> Application.Calculation= xlCalculationAutomatic
>
> Also, if you have any event code running, like Worksheet_Change, you might
> want to turn that off too.
>
> --
> Jim
> "Craig Brandt" <(E-Mail Removed)> wrote in message
> news:SMMck.14996$(E-Mail Removed)...
> |I am starting to use "userforms" to collect data. It can help ensure that
> | the data is valid and enforce placement.
> |
> | When I inserted code "on field change" that transfered that data to the
> | spread sheet, there was a pause, unacceptable during data entry. I
> therefore
> | deferred changing the cells in the spreadsheet until all input was done

in
> | the forms. This time the pause occured upon closure of the userforms,

but
> at
> | 17 secs, was a bit excessive.
> | My exit routine had a lot of the following types statements to transfer
> the
> | data: Sheets("AllAcct").Cells(2,3) = Userforms2.StartDate
> |
> | Is there a better way of handling the data transfer?
> |
> | Thanks,
> | Craig
> |
> |
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 Forms (Not User Forms) Lenny Microsoft Word Document Management 1 11th Feb 2010 09:57 AM
.NET Win Forms Application to Excel 2002, Excel 2003, and Excel 20 MaxGruven Microsoft Excel Programming 3 7th Mar 2008 02:47 AM
.NET Win Forms Application to Excel 2002, Excel 2003, and Excel 20 MaxGruven Microsoft Excel Programming 0 3rd Mar 2008 11:48 PM
Excel 2003: Forms Fields =?Utf-8?B?b2NlYW5taXN0?= Microsoft Excel Misc 0 15th Nov 2006 06:01 PM
Excel 2003: Forms =?Utf-8?B?b2NlYW5taXN0?= Microsoft Excel Misc 1 15th Nov 2006 05:44 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 AM.