LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Vba add data to cell from userform

Adrian,

It works in my tests. Are you sure your listboxes haven't been renamed from
the default?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"adrian" wrote in message
...
Bob,

I am getting a runtime error 1004
Application-defined or object-defined error

Come up when this code is run.

I have your code set as a commandbutton click event.
Eveything else seems to be OK
Any ideas what it could be?

Thanks for any further help you can offer

Adrian

-----Original Message-----
Thanks bob, just the job

adrian
-----Original Message-----

With Range("A" & Cells(Rows.Count,"A").End

(xlUp).Row+1)
.Offset(0,0).Value = Listbox1.Value
.Offset(0,1).Value = Listbox2.Value
.Offset(0,2).Value = Listbox3.Value
.Offset(0,3).Value = Listbox4.Value
End With

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"adrian" wrote in

message
.. .
Hi all,

I am new to Exell but have been tinkering with VBA in

Word.
I would be very grateful if someone could set me off in
the right direction with this little task.

I have a userform that has 4 listboxes in.

Any suggestions on how best to code exell so the the
result from each of the listboxes are entered into
worksheet cells on the next available row.

ie
Listbox1 result = "Dog"
Listbox2 result = "Cat"

Find first row with no data added. Add "Dog" to cell ?

1.
Add "Cat" to cell ?2 etc etc.

Any help with code would be much appreciated.

Adrian


.

.





 
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
Data Validation Cell - Move to UserForm thom hoyle Excel Worksheet Functions 0 April 28th 05 12:23 AM
Userform data Mark Excel Programming 3 April 5th 04 10:07 PM
View the data in a cell on a userform Henry[_5_] Excel Programming 0 January 8th 04 11:53 PM
UserForm with Cell Data Phil Hageman Excel Programming 2 October 7th 03 02:02 PM
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 06:51 AM.

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

About Us

"It's about Microsoft Excel"