Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default data from userform into worksheet cells

Hi everyone

I am trying to create an Excel database.
I have created a userform with several text boxes and combo boxes. This
runs on opening the file.
My plan is to be able to click on a command button and have the boxes
contents go to the next empty row on the sheet.
I have managed to create code to select the first cell of the empty row and
fill "A" with a sequential number.
How do I fill the row with the data from the boxes???

All advice accepted!

Kenny


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default data from userform into worksheet cells

assume you have the cell with A selected

SeqNo = SeqNo + 1
Cells(rows.count,1).End(xlup).Offset(0,1).Select
With Userform1
ActiveCell.Value = SeqNo
ActiveCell.offset(0,1).Value = .Textbox2.Text
ActiveCell.Offset(0,2).Value = .Combobox1.Value
ActiveCell.Offset(0,3).Value = .Textbox3.Text
End With

--
Regards,
Tom Ogilvy

"Newbie1" wrote in message
...
Hi everyone

I am trying to create an Excel database.
I have created a userform with several text boxes and combo boxes. This
runs on opening the file.
My plan is to be able to click on a command button and have the boxes
contents go to the next empty row on the sheet.
I have managed to create code to select the first cell of the empty row

and
fill "A" with a sequential number.
How do I fill the row with the data from the boxes???

All advice accepted!

Kenny




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default data from userform into worksheet cells

Thanks guys for the code and links - just what I needed

Kenny

"Newbie1" wrote in message
...
Hi everyone

I am trying to create an Excel database.
I have created a userform with several text boxes and combo boxes. This
runs on opening the file.
My plan is to be able to click on a command button and have the boxes
contents go to the next empty row on the sheet.
I have managed to create code to select the first cell of the empty row

and
fill "A" with a sequential number.
How do I fill the row with the data from the boxes???

All advice accepted!

Kenny




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Worksheet form vs. Userform...which is better? Webtechie Excel Discussion (Misc queries) 5 August 24th 08 09:23 AM
How can I use a worksheet while running a userform? Leo Excel Programming 4 December 17th 03 02:58 PM
autorun userform from worksheet paradise Excel Programming 1 October 30th 03 08:38 AM
Populate Userform text boxes in VBA with VLookup data from #2 worksheet Laz[_2_] Excel Programming 4 October 8th 03 02:15 AM
Taking Data of cell from worksheet to a userform window Mete Kavruk - EXPARTIZ Excel Programming 2 September 5th 03 02:33 PM


All times are GMT +1. The time now is 01:45 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"