Help about macros

psyclone

New Member
Joined
Oct 14, 2006
Messages
8
I'm trying to make an excel file where the main sheet would contain a button i could click and would popup an entry field where i will input my data. after supplyin the necessary information, i would just click submit or done and the data will be automatically populated in another sheet... i'm lost on the command which i can use. is there a way to do this without using macro? please help. thank you :(
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi-
Welcome to the board.
I dont think this can be handled without a macro as you have explain.
If you already have a codes for this, you can post here so that we can review.
 
Upvote 0
:)

thanks for the warm welcome kabayan. actually, all i have is raw data. say for example i have an item which has a code, something like an inventory type excel file. item 1 have a tracking code of 1234. what you need to enter is the code of the item, the description and the price and some other information. then after putting all the necessary information, click done and it will automatically save it to a designated sheet.

hope this helps. thank you
 
Upvote 0
ok. Hit Alt + F11 to open VBE.
from the left side, you can see VBA Project..., right click to it > insert Userform. from the toolbox, drag 3 textboxes and one button into userform1. double click the button and paste this code;
Code:
Private Sub CommandButton1_Click()
Sheets(1).Range("a" & Rows.Count).End(xlUp).Offset(1) = Me.TextBox1.Text
Sheets(1).Range("a" & Rows.Count).End(xlUp).Offset(, 1) = Me.TextBox2.Text
Sheets(1).Range("a" & Rows.Count).End(xlUp).Offset(, 2) = Me.TextBox3.Text
End Sub
then hit F5 to activate the userform.
hope you can start with this. the data you have entered into these textboxes will goes to Sheet1 columnA,B,C
 
Upvote 0
hi. This is really cool :)

i was able to create my file. just have one question though. is there a way to put a button on my main sheet to call up this form? sorry, this is all new to me. i'm not really familiar with VB codes and commands. but i'm digesting your codes. i tried to add 2 more text boxes. if you want, i can show you my file. :) thanks a lot.
 
Upvote 0
from your worksheet, click on view > toolbars > control toolbar ( if not yet tick ). then locate where a commandbutton is. left to it, then left click somewhere on the worksheet, hold and drag a little to the right and down then release. excel will create a commandbutton.
now double the commandbutton and put this code;
Code:
Private Sub CommandButton2_Click() 'change based on actual commandbutton named.
Userform1.show
End Sub
 
Upvote 0
i think i'm doing something wrong! i can't find the previous macro i created and the button that i created is not calling up the form. i'm not really familiar with the command. :(
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,652
Members
448,975
Latest member
sweeberry

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