Best way to prompt user for time entry??

roscoe

Well-known Member
Joined
Jun 4, 2002
Messages
1,062
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I've built a crazy spreadsheet that uses VBA to extract data from our server to create a graph with time as the X axis. I need to provide a way for users to manually add data points to the graph. These points will be a time (X-value) and a constant (determined by the code based on a user-selected category) as the y value. The code will drop these onto a sheet in the right place. Problem is, I'd rather not just let them type one in (Excel is not robust to typos in date fields).

To create the initial graph, I currently use spin buttons coded to cells with dates. Spinners for month, week, day, and hour prevent the user from fat-fingering in an entry. They seem to like that, so I'd like to do something similar when I then ask them for the data points described above.

Some manual categories will require two times (start/stop), others just one. I'm envisioning a user form with two serial dates/times preloaded with spinners to adjust each (ignoring the second one if nor required). Also I'm thinking radio buttons to allow the user to select what series category the time should be placed in. As a final thought, I'd like to use the user form to edit values already entered, not just add new ones.

I've never done user forms, let alone spinners inside of one. Can somebody link me to an example somewhere to get me pointed in the right direction?

Thanks!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,224,561
Messages
6,179,522
Members
452,923
Latest member
JackiG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top