Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2008

Tip: Looking for answers? Try searching our database.

Please HELP me!!

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alpineman2 - 27 Jan 2008 15:43 GMT
I have created a userform and understand how to populate data from a single
textbox/combobox to an 'ActiveCell', however, can't figure out how to
populate data from the single textbox/combobox to an entire area that I've
selected/highlighted.
-By single textbox/combobox I mean one control to one column and/or multi
column.

Your help is much appreciated.
FSt1 - 27 Jan 2008 17:28 GMT
hi
it's usually done one control at a time. avoid activecell.
Range("A1").value=textbox1.value
Range("A2").value=textbox2.value
Range("A3").value=textbox3.value
ect.

but this requires hard coding which may be unsuitable for all situations.
if your are creating a data base with your userform then you can use
variables.
dim  a as range
dim b as range
dim c as range
'this line will take you to the first empty cell in column A
set a = range("A1").end(xldown).offset(1,0)
'set the other variables
Set b = a.offset(0, 1)  'same row, 1 column to right
Set c = a.offset(0, 2)  'same row, 2 columns to right
'fill the cells
a.value=textbox1.value
b.value=textbox2.value
c.value=textbox3.value

may seem like a round about way but you have to tell xl where to go without
knowing where it's going.

post back if you need more info.
regards
FSt1

> I have created a userform and understand how to populate data from a single
> textbox/combobox to an 'ActiveCell', however, can't figure out how to
[quoted text clipped - 4 lines]
>
> Your help is much appreciated.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.