View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default UserForm Data to Worksheet

You can use most worksheet functions in code by using 'Application.' in front
of them... Application.CountA(Range("A5:G5")
The above will tell you if there is anything entered in A5:G5 on the ActiveSheet.

To get text from a Text Box onto a worksheet use the value property of both...
Range("B5").Value = TextBox1.Value
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"maximillan" <u25565@uwe
wrote in message
Hello,
I've just started using Excel VBA. I've a little background on
programming VBA and I do mean "little". Anyway, I've been looking all over
about how to transfer data from UserForm in Excel VBA to a worksheet. Problem
is, I've still not grasped the idea nor understand the codes posted here. So
if anyone can help me with this and explain as simple as possible on how to
do this, please do so.

What I did so far:
Created a command button in the worksheet with the code:
Reg_Frm.Show < Which opens the UserForm

Then designed the UserForm with the following items:
3 Text Boxes
1 Combo Box (Not bound. Used ComboBox1.additem)
1 Quit button (Functional)
1 Reset button (Functional)
1 submit button (Problem)

I intend to fill a row with the data taken from UserForm but don't know where
to start. Also, if possible, someone explain to me how it'll check if the
cell is vacant or not.

I'm a complete noob when it comes to macros just so you know. Thank you in
advance for the help. ^__^