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

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
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.
 

psyclone

New Member
Joined
Oct 14, 2006
Messages
8
:)

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
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
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
 

psyclone

New Member
Joined
Oct 14, 2006
Messages
8

ADVERTISEMENT

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.
 

agihcam

Well-known Member
Joined
Jan 16, 2006
Messages
1,624
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
 

psyclone

New Member
Joined
Oct 14, 2006
Messages
8

ADVERTISEMENT

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. :(
 

psyclone

New Member
Joined
Oct 14, 2006
Messages
8
still need help on this one. the button is not doing anything. it's not calling the form. :(
 

Forum statistics

Threads
1,136,650
Messages
5,677,000
Members
419,667
Latest member
MegEri

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
Top