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

Hello all, and good morning.

can anyone please help, usually my programming is very
logical so when i break it down and program it, it works!

BUT...

at the moment, i need to try and figure out how to get a
form to update the correct data.

when a listbox is selected i need the contents of the
listbox to be a list of values from the spreadsheet that
contain a "" cell in column "G"

once this value has been selected, the after effect needs
to be that the row containing this value will put a "2" in
(.row, "G")

so if anyone can help, please do so!!

Thank you,

Robert Couchman
)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default thought process

Are the values you are adding to the listbox unique - is there only one row
that contains that value. If so, then just loop through column G, looking
for "" and do an additem to the listbox. Then when a selection is made,
use the match function to find the offset into that range or loop through
the cells to find a match.

For each cell in Range("G1:G200")
if cell.Value = "" then
Listbox1.AddItem cell.offset(0,5).Value
end if
Next


Private Sub Listbox1_Click()
for each cell in Range("L1:L200")
if cell.Value = Listbox1.Value then
cell.offset(0,-5).Value = 2
end if
Next
End Sub

--
Regards,
Tom Ogilvy

"Robert Couchman" wrote in message
...
Hello all, and good morning.

can anyone please help, usually my programming is very
logical so when i break it down and program it, it works!

BUT...

at the moment, i need to try and figure out how to get a
form to update the correct data.

when a listbox is selected i need the contents of the
listbox to be a list of values from the spreadsheet that
contain a "" cell in column "G"

once this value has been selected, the after effect needs
to be that the row containing this value will put a "2" in
(.row, "G")

so if anyone can help, please do so!!

Thank you,

Robert Couchman
)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default thought process

Hi Tom,

i wish it was that simple!!!

the only unique value in the row is the ID, but i do not
want this present in the listbox, then the other problem
is that when i loop through column G i find that it stops
when it gets to a cell with a value, then writes over the
list when it continues!

thank you,

Robert Couchman
)
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default thought process

It is that simple actually. You just use a two column listbox and make the
width of the second column 0. You put the address of the cell in the second
column.

I am not sure how you overwrite the list when you loop through cells in L if
you are changing G to 2.

--
Regards,
Tom Ogilvy

"Robert Couchman" wrote in message
...
Hi Tom,

i wish it was that simple!!!

the only unique value in the row is the ID, but i do not
want this present in the listbox, then the other problem
is that when i loop through column G i find that it stops
when it gets to a cell with a value, then writes over the
list when it continues!

thank you,

Robert Couchman
)



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
harder than i thought Tomkat743 Excel Discussion (Misc queries) 2 March 9th 09 02:37 PM
Don't think it's possible, but I thought I would ask. smaumau Excel Worksheet Functions 1 April 3rd 06 11:20 PM
I THOUGHT I knew what I was doing RJB Charts and Charting in Excel 7 September 12th 05 08:37 PM
This is A LOT harder than I thought it would be Robert Excel Discussion (Misc queries) 13 August 24th 05 12:20 AM
On second thought ... Jerry Kinder New Users to Excel 0 November 26th 04 02:38 AM


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