Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Changing specific Listbox value

Hey

Below is code that populates a listbox using the RowSource property.

Counter = Worksheets("Market IDs All
Regions").Range("A65536").End(xlUp).Row

ListBox1.ColumnCount = 3
ListBox1.ColumnHeads = True
ListBox1.RowSource = Workbooks("B2B Master.xls").Worksheets("Market IDs
All Regions").Range("A2:D" & Counter).Address


Lets say I need to change the value of row 6 column 2... How would I
specify this?


Thanks
Todd Huttenstine

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Changing specific Listbox value

Your question is imprecise as to exactly what you are asking, but here is a
guess:

First change
ListBox1.RowSource = Workbooks("B2B Master.xls").Worksheets("Market IDs
All Regions").Range("A2:D" & Counter).Address


to

ListBox1.RowSource = Workbooks("B2B Master.xls").Worksheets("Market IDs
All Regions").Range("A2:D" & Counter).Address(external:=true)


then

set rng = Range(Listbox1.RowSource)
Listbox1.RowSource = ""
rng(6,2).Value = "Dubois"
Listbox1.rowSource = rng.Address(external:=True)


--
Regards,
Tom Ogilvy

"Todd Huttenstine" wrote in message
ps.com...
Hey

Below is code that populates a listbox using the RowSource property.

Counter = Worksheets("Market IDs All
Regions").Range("A65536").End(xlUp).Row

ListBox1.ColumnCount = 3
ListBox1.ColumnHeads = True
ListBox1.RowSource = Workbooks("B2B Master.xls").Worksheets("Market IDs
All Regions").Range("A2:D" & Counter).Address


Lets say I need to change the value of row 6 column 2... How would I
specify this?


Thanks
Todd Huttenstine



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default Changing specific Listbox value

Hey

(external:=true)

What does the above part of the code do?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Changing specific Listbox value

try this in a test sub:

with activesheet.range("a1")
msgbox .address & vblf & .address(external:=true)
end with

And you'll see.


Todd Huttenstine wrote:

Hey

(external:=true)

What does the above part of the code do?


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Changing specific Listbox value

Tells it to build a full book/sheet/range address against just the range.

--
HTH

Bob Phillips

"Todd Huttenstine" wrote in message
oups.com...
Hey

(external:=true)

What does the above part of the code do?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default Changing specific Listbox value

See the response in the other thread.

--
HTH

Bob Phillips

"Todd Huttenstine" wrote in message
ps.com...
Hey

Below is code that populates a listbox using the RowSource property.

Counter = Worksheets("Market IDs All
Regions").Range("A65536").End(xlUp).Row

ListBox1.ColumnCount = 3
ListBox1.ColumnHeads = True
ListBox1.RowSource = Workbooks("B2B Master.xls").Worksheets("Market IDs
All Regions").Range("A2:D" & Counter).Address


Lets say I need to change the value of row 6 column 2... How would I
specify this?


Thanks
Todd Huttenstine



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
listbox shrinks to a line when changing between sheets if I use the visible property bikerchick Excel Programming 0 July 7th 04 04:07 PM
changing foreground color of listbox w/o losing selections PatFinegan[_13_] Excel Programming 0 May 10th 04 09:30 PM
Multicolumn ListBox in Userforms (selecting specific rows) wpllc2004 Excel Programming 1 April 6th 04 08:45 PM
ListBox Result to a Specific Cell Location Randal W. Hozeski Excel Programming 1 December 30th 03 02:23 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 09:59 PM.

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"