ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   User Form - use of single form for multiple sheets (https://www.excelbanter.com/excel-programming/417297-user-form-use-single-form-multiple-sheets.html)

Roger on Excel

User Form - use of single form for multiple sheets
 
I have 10 sheets which contain identical tables for entering a chemical
process.

I use user forms for data entry, and would like to set up a single form for
use on each sheet.

I want to use a single form that can be activated on each sheet and will
enter data on the active sheet.

I dont want to have to recreate an individual user form for each of the
identical sheets but rather use a single form that will enter data for the
specific sheet the userform is activated.

Can anyone help with relevant the code to do this?

Thanks,

Roger

RB Smissaert

User Form - use of single form for multiple sheets
 
Not sure why that would be a problem.
If you have one form you can load it from any sheet with:
Load Form1
Form1.Show
etc.

You could do it from a button in the sheet or you could make a toolbar menu.

RBS


"Roger on Excel" wrote in message
...
I have 10 sheets which contain identical tables for entering a chemical
process.

I use user forms for data entry, and would like to set up a single form
for
use on each sheet.

I want to use a single form that can be activated on each sheet and will
enter data on the active sheet.

I dont want to have to recreate an individual user form for each of the
identical sheets but rather use a single form that will enter data for the
specific sheet the userform is activated.

Can anyone help with relevant the code to do this?

Thanks,

Roger



JLGWhiz

User Form - use of single form for multiple sheets
 
RB is correct that you can use the same form for different sheets. But be
careful/

While you can call the form for any sheet, your code behind the form that
sends the data entered by the user to the worksheet needs to be written so
that the data goes to the correct sheet. If no particular sheet is
specified, i.e.

Range("A4") = myControl.Value

It will post to the ActiveSheet. So make sure the active sheet is the one
you want to post to.

"Roger on Excel" wrote:

I have 10 sheets which contain identical tables for entering a chemical
process.

I use user forms for data entry, and would like to set up a single form for
use on each sheet.

I want to use a single form that can be activated on each sheet and will
enter data on the active sheet.

I dont want to have to recreate an individual user form for each of the
identical sheets but rather use a single form that will enter data for the
specific sheet the userform is activated.

Can anyone help with relevant the code to do this?

Thanks,

Roger


Roger on Excel

User Form - use of single form for multiple sheets
 
Thanks for the advice guys,

All the best,

Roger



"JLGWhiz" wrote:

RB is correct that you can use the same form for different sheets. But be
careful/

While you can call the form for any sheet, your code behind the form that
sends the data entered by the user to the worksheet needs to be written so
that the data goes to the correct sheet. If no particular sheet is
specified, i.e.

Range("A4") = myControl.Value

It will post to the ActiveSheet. So make sure the active sheet is the one
you want to post to.

"Roger on Excel" wrote:

I have 10 sheets which contain identical tables for entering a chemical
process.

I use user forms for data entry, and would like to set up a single form for
use on each sheet.

I want to use a single form that can be activated on each sheet and will
enter data on the active sheet.

I dont want to have to recreate an individual user form for each of the
identical sheets but rather use a single form that will enter data for the
specific sheet the userform is activated.

Can anyone help with relevant the code to do this?

Thanks,

Roger



All times are GMT +1. The time now is 11:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com