window creation

dwarek

Board Regular
Joined
Jul 15, 2016
Messages
79
I have assigned a work in my office , the scenario is when i click a start button on sheet 1 a new window should apperar where i can enter my data and the when i click ok button those values should be updated in the corresponding cells according to headings in the sheet 2.please help me how to do that because really urgent
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
I see your new to this forum.

One thing you may want to learn is proper excel terminology.

For example what is a "Window"

In Excel we have:
Workbooks
Worksheets
Columns
Rows
Cells

And you need to always give specific details like:
Workbook name
Sheet name
Criterial if needed

And normally it's best to tell us what columns we are dealing with like Column A or B
Do not say column with the header "Name" it then makes our job harder having to determine what column we are dealing with.

Now in your situation you may want to create a UserForm. Put some text boxes on your form to be filled in by user and then when you click a button on UserForm the proper cells on the Worksheet will be filled in with the values you entered into the UserForm.

Please check back in with more specific details and maybe we can help you.
 
Upvote 0
so how i should i create a use rform and add data to it and then those data should be filled to the cells ?
 
Upvote 0
Not sure how familiar you are with Excel and Vba.

And you said:
please help me how to do that because really urgent

Learning how to build a UserForm and use it may not be something you can learn in a day or two.

On the ribbon you can choose Developer>Visual Basic>Insert>UserForm

Then you have all sort of things. You would probable only need a few textbox's and a command button

The textbox's is where your user will enter their data and when done filling in box's they would click the command button that would place the data in the sheet where you want.

Take a look and see if you think you can get a grip on this quickly.

Then tell me where you want each box's data to go to.
Each textbox has a name like textbox1 and textbox2

The Userform would also have a name. By default it would be UserForm1

To Show UserForm you would need a modulue script like this:

Code:
Sub Open_Me
Userform1.Show
End sub

Let me know if you think you can do this and if so I will give you more help.
 
Upvote 0
Easier than a user form, would be to use the built in Data Form.

If your headers are on Sheet2!A1:E1, you could run this macro. (If not, adjust the sheet name and header address to match your situation)

Code:
Sub EnterData()
    With ThisWorkbook.Sheets("Sheet2")
        Application.Goto Range("A1:E1")
        .ShowDataForm
    End With
End Sub
 
Upvote 0
i have created a userform now but i don't know how to print the entered data from the userform in the spreadsheet.
 
Upvote 0
So tell me the name of the textbox and where you want that textbox data to go to.

For example Sheets(1).cells(1,1). value=Textbox1.value

And tell me how many textbox's you have and where everyone should go.


And I will write you a script that you will put in your Command Button

When you press the command button the script will enter all your data.
 
Upvote 0
Will the data always be going into the same row.
Or will it be going into the first empty row

For example textbox1.value may go into column A first empty row
Textbox2.value may go into column B first empty row
etc. etc.

Those are the type things I need to know.
 
Upvote 0
OK.

I need to go and will be back on here in maybe 10 hours.

I need exact details like I asked for in my previous post.

When you can provide my exact details I can help you. You will see in my previous post how I said I need exact details.

If you only have one textbox then put a line of script in your command button that would say something like this:

Sheets(1).Range("A2").value = Textbox1.value
 
Last edited:
Upvote 0

Forum statistics

Threads
1,217,371
Messages
6,136,180
Members
449,996
Latest member
duraichandra

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