Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default RowSource command


I have a Row Source which is working quite well, however I have two
columns.
I require that when I select, both of them are showed, for example A2
and B2 show next to each other with a comma (,)
------------------

Sheets("Sheet1").Select

LPC.RowSource = "a1:b12358"


--
bjorn
------------------------------------------------------------------------
bjorn's Profile: http://www.thecodecage.com/forumz/member.php?userid=897
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=137426

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default RowSource command

you' need either to add a third column c, where c1:= =A1 & "," & B1
then set your rowsource to column C
OR
don't set the rowsource , but load the listbox on the form's initialise
routine

for each cell in range("Aa:A12358")
listbox1.AddItem cell.value & "," & cell.offset(,1).value
next

"bjorn" wrote:


I have a Row Source which is working quite well, however I have two
columns.
I require that when I select, both of them are showed, for example A2
and B2 show next to each other with a comma (,)
------------------

Sheets("Sheet1").Select

LPC.RowSource = "a1:b12358"


--
bjorn
------------------------------------------------------------------------
bjorn's Profile: http://www.thecodecage.com/forumz/member.php?userid=897
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=137426


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default RowSource command


I am quite new... I didn't quite understand this.

How am I to create the sum? Using for each cell in A = (a1, b12358)...

or initialise?

Is it possible to help me abit more please?


--
bjorn
------------------------------------------------------------------------
bjorn's Profile: http://www.thecodecage.com/forumz/member.php?userid=897
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=137426

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default RowSource command

I assume you have a userform with a listbox control?

then in then simply add this code

Private Sub UserForm_Initialize()
For Each cell In Range("Aa:A12358")
listbox1.AddItem cell.Value & "," & cell.Offset(, 1).Value
Next
End Sub





"bjorn" wrote:


I am quite new... I didn't quite understand this.

How am I to create the sum? Using for each cell in A = (a1, b12358)...

or initialise?

Is it possible to help me abit more please?


--
bjorn
------------------------------------------------------------------------
bjorn's Profile: http://www.thecodecage.com/forumz/member.php?userid=897
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=137426


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
RowSource as a row Boba Excel Programming 4 July 16th 07 09:48 PM
Refreshing ROWSOURCE DKS Excel Programming 7 September 23rd 06 05:56 PM
RowSource Patrick Simonds Excel Programming 1 August 5th 06 01:25 AM
help with rowsource GMet Excel Programming 4 September 24th 04 02:30 PM
Using IF, Then with rowsource? CAA[_23_] Excel Programming 8 April 4th 04 08:56 PM


All times are GMT +1. The time now is 01:25 AM.

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"