Question about textbox on userform being able to get some data from sheet

supermom28115

New Member
Joined
May 9, 2022
Messages
43
Office Version
  1. 365
Platform
  1. Windows
I am trying to determine if I am just doing this wrong or if this is just not possible. I have a userform set up with multipage with 3 pages, the first page has 6 textbox items and I would like to have a procedure pull those details from the sheet that initiates the userform and just have the user verify that the data is correct. Then the user will use records to add data to pages 2 and 3, then a sub takes that data and transfers it all to a second sheet.
The data on page 1 is identifying data for the subject of the data on pages 2 and 3. I have code all over the place trying to make this work, so the whole thing is kind of a mess right now, however this part is the section that doesn't work and I have tried to write code to this operation many different ways. I have been writing the code in the userform code sheet because I was attaching it to a toggle switch for the user to verify that the data is correct. Then I tried to write the code in the sheet code window and call it to the toggle switch code. I have read 4 different books over the last two days and all the information the provided regarding userforms and have not found an answer. Is this even possible? Can I use code similar to textbox4.value = x.offset(52,0).value to get those identifiers onto page 1? If I have to use input boxes and select each cell then I might as well just write code to just copy those 6 data points separately by macro or command button. I was just hoping to automate it as a group and not have to do two different operations to get the task done. I have not found a reference anywhere that says this can not be done, however I also have not found a reference showing how to do this, only how to do a list box or hard set a value into the box that would only change through user input or a change in the properties of the text box. A list would be way to involved and constantly be added to so I would be updating it or some linked table regularly.
Here is the breakdown of what I have been trying to accomplish:
1 - user inputs data into a sheet and may or may not need to add additional notes for each record
2 - If user needs to add additional notes they would use the button on the sheet where they entered the original data which brings up a input box asking for the column name
3 - user puts in the column letter giving the code a cell reference for the data on page one of the form and some later code on the chance the process gets cancelled so that a sub can clear the cell the user puts data in to indicate they have added additional data
4 - At this point the form shows and page 1 should show the identifying data and the user would use the toggle button to indicate if the data is correct
5 - if true the toggle does nothing if false the toggle cancels the task
6 - the user adds the data on page 2 and page 3 and presses a command button to add the data
7 - the command button goes to sheet2 finds the next empty row and puts the data from the form into the cells
8 - then the form unloads and closes until triggered again
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I looked at your post and there is a whole lot to read here.

And one thing I notice is you give details about what you want but provide nearly no specific details

When we write a script the script must be very specific.

Like you said:
I have a userform set up with multipage with 3 pages, the first page has 6 textbox items and I would like to have a procedure pull those details from the sheet that initiates the userform and just have the user verify that the data is correct. Then the user will use records to add data to pages 2 and 3, then a sub takes that data and transfers it all to a second sheet.

There are no specifics here:

Again like here you said
pull those details from the sheet

Like what is the name of the Multipage.
What are the names of the multipage pages
What are the names of the Texboxes

pull those details? what details"

And there is more.
 
Upvote 0
Hi,

Userforms can be wonderful feature to add to a project until you discover that every aspect of its operation has to be coded by the programmer which can end up being very complex as generally, they require a lot of additional coding to ensure that users enter only valid data (dates, numbers etc)

From your long post what you want to do is probably doable but not be easy for those on forum to give a definitive answer to your questions without seeing the project itself.

Suggest either publish the code you already have (using code tags) or better still with a complex project, place copy of your workbook (with dummy data) on a file sharing site like dropbox & provide a link to it & maybe, some here will be able assist you further.

Hope helpful

Dave
 
Upvote 0
I looked at your post and there is a whole lot to read here.

And one thing I notice is you give details about what you want but provide nearly no specific details

When we write a script the script must be very specific.

Like you said:
I have a userform set up with multipage with 3 pages, the first page has 6 textbox items and I would like to have a procedure pull those details from the sheet that initiates the userform and just have the user verify that the data is correct. Then the user will use records to add data to pages 2 and 3, then a sub takes that data and transfers it all to a second sheet.

There are no specifics here:

Again like here you said
pull those details from the sheet

Like what is the name of the Multipage.
What are the names of the multipage pages
What are the names of the Texboxes

pull those details? what details"

And there is more.
Thank you for your response and my goal was to detail what I want to do and find out if it is possible. I love reading the post on this forum and getting ideas or answers to my questions. However, my goal was not to throw my project (not that it is top secret) on the site and have you guys write a code that will do the job. I want to learn how to write the code myself and as you can see in my post finding a book, website, or youtube channel that does a decent job of teaching VBA has been my biggest struggle.
 
Upvote 0
Hi,

Userforms can be wonderful feature to add to a project until you discover that every aspect of its operation has to be coded by the programmer which can end up being very complex as generally, they require a lot of additional coding to ensure that users enter only valid data (dates, numbers etc)

From your long post what you want to do is probably doable but not be easy for those on forum to give a definitive answer to your questions without seeing the project itself.

Suggest either publish the code you already have (using code tags) or better still with a complex project, place copy of your workbook (with dummy data) on a file sharing site like dropbox & provide a link to it & maybe, some here will be able assist you further.

Hope helpful

Dave
Thank you for responding to my post. I knew it was a slim chance anyone would respond since I did not put the code in the post. I was most encouraged by the part where you stated that my goal "is probably doable". I am reading the posts on this site and learning a lot of technically correct code writing just not a lot of why am I writing it this way. I will definitely keep working on it and continue trying to find a source that will help me learn so that I may write the code myself and not have to pass it off to others. I love what you guys do, you help lots of people and that includes me, but I want to learn how to get the answer not just get the answer.
 
Upvote 0
Hi,
even the best here sometimes post for guidance so no shame in doing so if feel need some assistance to help you along with your project.

If not already found it yourself, here is one site always worth a visit when searching out answers: How to Create Excel UserForm for Data Entry
Site has plenty of examples most you can download for free but there are others you can look at.

Good luck with project & do post when help needed - plenty here to assist you.

Dave
 
Upvote 0
I am trying to determine if I am just doing this wrong or if this is just not possible. I have a userform set up with multipage with 3 pages, the first page has 6 textbox items and I would like to have a procedure pull those details from the sheet that initiates the userform and just have the user verify that the data is correct. Then the user will use records to add data to pages 2 and 3, then a sub takes that data and transfers it all to a second sheet.
The data on page 1 is identifying data for the subject of the data on pages 2 and 3. I have code all over the place trying to make this work, so the whole thing is kind of a mess right now, however this part is the section that doesn't work and I have tried to write code to this operation many different ways. I have been writing the code in the userform code sheet because I was attaching it to a toggle switch for the user to verify that the data is correct. Then I tried to write the code in the sheet code window and call it to the toggle switch code. I have read 4 different books over the last two days and all the information the provided regarding userforms and have not found an answer. Is this even possible? Can I use code similar to textbox4.value = x.offset(52,0).value to get those identifiers onto page 1? If I have to use input boxes and select each cell then I might as well just write code to just copy those 6 data points separately by macro or command button. I was just hoping to automate it as a group and not have to do two different operations to get the task done. I have not found a reference anywhere that says this can not be done, however I also have not found a reference showing how to do this, only how to do a list box or hard set a value into the box that would only change through user input or a change in the properties of the text box. A list would be way to involved and constantly be added to so I would be updating it or some linked table regularly.
Here is the breakdown of what I have been trying to accomplish:
1 - user inputs data into a sheet and may or may not need to add additional notes for each record
2 - If user needs to add additional notes they would use the button on the sheet where they entered the original data which brings up a input box asking for the column name
3 - user puts in the column letter giving the code a cell reference for the data on page one of the form and some later code on the chance the process gets cancelled so that a sub can clear the cell the user puts data in to indicate they have added additional data
4 - At this point the form shows and page 1 should show the identifying data and the user would use the toggle button to indicate if the data is correct
5 - if true the toggle does nothing if false the toggle cancels the task
6 - the user adds the data on page 2 and page 3 and presses a command button to add the data
7 - the command button goes to sheet2 finds the next empty row and puts the data from the form into the cells
8 - then the form unloads and closes until triggered again
here is the workbook, and again, I appreciate everything you guys do to help
 
Upvote 0
Hi,
even the best here sometimes post for guidance so no shame in doing so if feel need some assistance to help you along with your project.

If not already found it yourself, here is one site always worth a visit when searching out answers: How to Create Excel UserForm for Data Entry
Site has plenty of examples most you can download for free but there are others you can look at.

Good luck with project & do post when help needed - plenty here to assist you.

Dave
I shared the workbook
 
Upvote 0
I looked at your post and there is a whole lot to read here.

And one thing I notice is you give details about what you want but provide nearly no specific details

When we write a script the script must be very specific.

Like you said:
I have a userform set up with multipage with 3 pages, the first page has 6 textbox items and I would like to have a procedure pull those details from the sheet that initiates the userform and just have the user verify that the data is correct. Then the user will use records to add data to pages 2 and 3, then a sub takes that data and transfers it all to a second sheet.

There are no specifics here:

Again like here you said
pull those details from the sheet

Like what is the name of the Multipage.
What are the names of the multipage pages
What are the names of the Texboxes

pull those details? what details"

And there is more.
 
Upvote 0
I am trying to determine if I am just doing this wrong or if this is just not possible. I have a userform set up with multipage with 3 pages, the first page has 6 textbox items and I would like to have a procedure pull those details from the sheet that initiates the userform and just have the user verify that the data is correct. Then the user will use records to add data to pages 2 and 3, then a sub takes that data and transfers it all to a second sheet.
The data on page 1 is identifying data for the subject of the data on pages 2 and 3. I have code all over the place trying to make this work, so the whole thing is kind of a mess right now, however this part is the section that doesn't work and I have tried to write code to this operation many different ways. I have been writing the code in the userform code sheet because I was attaching it to a toggle switch for the user to verify that the data is correct. Then I tried to write the code in the sheet code window and call it to the toggle switch code. I have read 4 different books over the last two days and all the information the provided regarding userforms and have not found an answer. Is this even possible? Can I use code similar to textbox4.value = x.offset(52,0).value to get those identifiers onto page 1? If I have to use input boxes and select each cell then I might as well just write code to just copy those 6 data points separately by macro or command button. I was just hoping to automate it as a group and not have to do two different operations to get the task done. I have not found a reference anywhere that says this can not be done, however I also have not found a reference showing how to do this, only how to do a list box or hard set a value into the box that would only change through user input or a change in the properties of the text box. A list would be way to involved and constantly be added to so I would be updating it or some linked table regularly.
Here is the breakdown of what I have been trying to accomplish:
1 - user inputs data into a sheet and may or may not need to add additional notes for each record
2 - If user needs to add additional notes they would use the button on the sheet where they entered the original data which brings up a input box asking for the column name
3 - user puts in the column letter giving the code a cell reference for the data on page one of the form and some later code on the chance the process gets cancelled so that a sub can clear the cell the user puts data in to indicate they have added additional data
4 - At this point the form shows and page 1 should show the identifying data and the user would use the toggle button to indicate if the data is correct
5 - if true the toggle does nothing if false the toggle cancels the task
6 - the user adds the data on page 2 and page 3 and presses a command button to add the data
7 - the command button goes to sheet2 finds the next empty row and puts the data from the form into the cells
8 - then the form unloads and closes until triggered again
I think I found the answer. Thank you guys for your advice.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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