Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Please HELP me!!

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Please HELP me!!

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

"Alpineman2" wrote:

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.

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



All times are GMT +1. The time now is 03:02 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"