J
jkitzy
I have a form used to enter cash-drawer information. The information is
stored as data in a spreadsheet. There are about 50 discreet fields of data
in strings, dates, and currency.
But in trying to build this, there are some questions I have. I'm using
Excel 2003:
1. There doesn't seem to be a way put the *fields* into an array for easy
population. I put the data from the found range into an array to make it
easier to deal with, but I still have to use a For...Each loop to populate
the fields. Some of the fields are formatted as dates, most are currency, so
I have several If statements to format those as dates. Is there a better way?
2. If I can't make the array of controls, then is there any advantage for me
in using an array at all? I mean, what's the difference in performance of
putting that data into an array first, then cycling through the array versus
just cycling through the cells themselves.
3. I'm torn between assigning the field a value from cell or setting it up
as a control source. The advantage of the control source method, as I see it,
is that I can automagically update the cells and I don't have to cycle
through every cell to put the information back into the spreadsheet. But I'd
rather assign values than control source because... well... if someone makes
a mistake, they can more easily recover the *before* data.
4. *Is* there any way to assign a bunch of controls to an array and just
dump the data back into the spreadsheet? Again, I'm having to cycle through
each field and put it back into my array to dump it into the spreadsheet.
This seems wasteful.
5. Is there any way to automatically calculate fields on the form? I'd like
to have users enter in denominations and have a running total update. I don't
want to put something in *every* field's change script if I don't have to.
It's very redundant.
5. Because I'm dealing with currencies, I'd like each field to be formatted
as currency. Is there any way to do that, again, without having to put the
format script in the change event for every field? Again, this seems tres
repetitive.
Sorry for the long-winded stuff here, but some overall guidance would help.
And you all are the experts! Thanks all. I search this forum on a daily basis
when I'm working on an app because I'm *not* a programmer. I rarely post
because I usually find what I need, so I don't often get to thank you!
stored as data in a spreadsheet. There are about 50 discreet fields of data
in strings, dates, and currency.
But in trying to build this, there are some questions I have. I'm using
Excel 2003:
1. There doesn't seem to be a way put the *fields* into an array for easy
population. I put the data from the found range into an array to make it
easier to deal with, but I still have to use a For...Each loop to populate
the fields. Some of the fields are formatted as dates, most are currency, so
I have several If statements to format those as dates. Is there a better way?
2. If I can't make the array of controls, then is there any advantage for me
in using an array at all? I mean, what's the difference in performance of
putting that data into an array first, then cycling through the array versus
just cycling through the cells themselves.
3. I'm torn between assigning the field a value from cell or setting it up
as a control source. The advantage of the control source method, as I see it,
is that I can automagically update the cells and I don't have to cycle
through every cell to put the information back into the spreadsheet. But I'd
rather assign values than control source because... well... if someone makes
a mistake, they can more easily recover the *before* data.
4. *Is* there any way to assign a bunch of controls to an array and just
dump the data back into the spreadsheet? Again, I'm having to cycle through
each field and put it back into my array to dump it into the spreadsheet.
This seems wasteful.
5. Is there any way to automatically calculate fields on the form? I'd like
to have users enter in denominations and have a running total update. I don't
want to put something in *every* field's change script if I don't have to.
It's very redundant.
5. Because I'm dealing with currencies, I'd like each field to be formatted
as currency. Is there any way to do that, again, without having to put the
format script in the change event for every field? Again, this seems tres
repetitive.
Sorry for the long-winded stuff here, but some overall guidance would help.
And you all are the experts! Thanks all. I search this forum on a daily basis
when I'm working on an app because I'm *not* a programmer. I rarely post
because I usually find what I need, so I don't often get to thank you!