PDA

View Full Version : Daily Data for Entire Year - vba userform



teamhog
04-06-2016, 12:04 PM
I have a worksheet where a client is asked to enter daily data on a regular basis (every week or two).
The sheet is limited to the current year only (so it'll either have 365 or 366 rows).

The data is similar to this:



Date
TonsOfProduct
Color
GasUsage


01/01/2016
10,001
Y
255,666,666


01/02/2016
10,015
N
120,120,222


...
...
...
...


12/31/2016
10,020
Y
101,222,131




My plan is to create a userform where the entire contents of the year are loaded up on the form initialization.
Other than creating the text boxes by hand, is there another way/method to do this?
I looked at loading it up into a sheet control or a flex grid control but some of the computers that this would run on don't have those controls.

Paul_Hossler
04-06-2016, 12:45 PM
My plan is to create a userform where the entire contents of the year are loaded up on the form initialization.

Why? What do you want to do with the data on a user form?

teamhog
04-06-2016, 12:54 PM
Why? What do you want to do with the data on a user form?
It'll be easier to present it to the user and provide a platform for an automated method down the road.

The end user can enter data and if they make a mistake they can reload it with a simple button click.

Paul_Hossler
04-06-2016, 01:06 PM
All 365/366 days on the userform or just the ability to add one day or edit one day at a time?

SamT
04-06-2016, 03:35 PM
I have a worksheet where a client is asked to enter daily data on a regular basis (every week or two).That should be a simple UserForm, possibly with a TabStrip control to "hold" the four Data Entry Controls.


My plan is to create a userform where the entire contents of the year are loaded up on the form initialization. That calls for a different and much more complex Form. Personally, I would use a 12 page Multipage Control and add the other controls programmatically. One Sub should be able to add controls to each of the Multipage's "Month" Pages. Use one other Sub to fill the Control values on each Month Page.

teamhog
04-07-2016, 03:08 PM
That should be a simple UserForm, possibly with a TabStrip control to "hold" the four Data Entry Controls.

That calls for a different and much more complex Form. Personally, I would use a 12 page Multipage Control and add the other controls programmatically. One Sub should be able to add controls to each of the Multipage's "Month" Pages. Use one other Sub to fill the Control values on each Month Page.


Thanks for ideas.

I'm going to use a dynamic approach with the text boxes and data getting loaded upon form init.