excel数据输入窗体控件
If you're building an Excel workbook, in which users with basic Excel skills will enter data, would you create a worksheet data entry form? In the screen shot below, you can see an example.
如果您正在构建Excel工作簿,具有基本Excel技能的用户将在其中输入数据,那么您是否会创建工作表数据输入表单 ? 在下面的屏幕快照中,您可以看到一个示例。
Or, do you prefer to build an Excel UserForm? In the screen shot below, you can see a simple UserForm.
或者,您更喜欢构建Excel用户窗体 ? 在下面的屏幕快照中,您可以看到一个简单的用户窗体。
工作表数据输入 (Worksheet Data Entry)
With the worksheet method, you can
使用工作表方法,您可以
- hide the data sheets, and protect the data entry sheets, so users can only enter data in the unlocked cells. 隐藏数据表,并保护数据输入表,因此用户只能在未锁定的单元格中输入数据。
- add a few navigation and function buttons, to help users with basic Excel skills. 添加一些导航和功能按钮,以帮助用户掌握基本的Excel技能。
An advantage is that you're using built-in Excel features, like data validation and formulas, so you can reduce the development time.
优点是您正在使用内置的Excel功能,例如数据验证和公式,因此可以减少开发时间。
Excel用户表单 (Excel UserForm)
The UserForm method takes longer to develop, because you're adding another layer to the project. Advantages to this method include:
UserForm方法需要花费更长的开发时间,因为您要在项目中添加另一层。 该方法的优点包括:
- combo boxes, which can be formatted, and have autocomplete (unlike data validation drop downs) 组合框,可以格式化并具有自动完成功能(与数据验证下拉菜单不同)
- tab order control, which isn't available on the worksheet, where pressing the Tab key simply takes you to the next unlocked cell. 选项卡顺序控件(该选项卡在工作表上不可用),按Tab键只是将您带到下一个未锁定的单元格。
您会选择哪一个? (Which Would You Pick?)
Both methods work well, and can be customized to be user-friendly and fool-resistant (nothing in Excel is fool-proof!) Programming would be required in both versions, to help with navigation, and to move data to the storage worksheets.
两种方法都可以很好地工作,并且可以自定义为用户友好和防呆的工具(Excel中没有什么是防呆的!)两个版本都需要进行编程,以帮助导航以及将数据移至存储工作表。
- The worksheet method is quicker and easier to create and maintain, and a project might take 4-5 hours to complete. 工作表方法更快,更容易创建和维护,并且一个项目可能需要4-5个小时才能完成。
- The UserForm method is more sophisticated, and takes longer to build and maintain. The UserForm version of the same project might take 8-10 hours. UserForm方法更加复杂,并且需要花费更长的时间来构建和维护。 同一项目的UserForm版本可能需要8到10个小时。
Which method would you use?
您会使用哪种方法?
翻译自: https://contexturesblog.com/archives/2011/05/18/worksheet-data-entry-or-excel-userform/
excel数据输入窗体控件