Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Listbox to change value in cell

I have a listbox with 3 columns going (1, 2, 3). Feeding this listbox is a
sheet with three columns (A,B,C).

What I am trying to do is when the user clicks on a button, the value that
is currently selected in listbox column 3 is looked up on the sheet in Column
C and the value next to it, Column B is changed to "yes"...which would then
change the listbox column 2 to "yes"

I know I need to do an offset, but having a hard time getting started, I
appreciate anyone's help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Listbox to change value in cell

try this

Private Sub CommandButton1_Click()

If ListBox1.ListIndex < 0 Then Exit Sub

With Worksheets("Sheet2").Range("A6")
.Offset(ListBox1.ListIndex, 1) = "yes"
End With

End Sub


"Jeremy" wrote:

I have a listbox with 3 columns going (1, 2, 3). Feeding this listbox is a
sheet with three columns (A,B,C).

What I am trying to do is when the user clicks on a button, the value that
is currently selected in listbox column 3 is looked up on the sheet in Column
C and the value next to it, Column B is changed to "yes"...which would then
change the listbox column 2 to "yes"

I know I need to do an offset, but having a hard time getting started, I
appreciate anyone's help.

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
VBA dynamically change width listbox Frederik[_3_] Excel Programming 5 January 25th 09 04:48 PM
VBA dynamically change width listbox JLGWhiz Excel Programming 0 January 22nd 09 05:00 PM
Event change listbox ranswrt Excel Programming 1 July 14th 08 11:40 PM
Listbox linked cell does not change Dkline Excel Worksheet Functions 2 May 5th 07 03:57 PM
Can I change a controlbox to a listbox on a Form Post Tenebras Lux Excel Programming 5 August 10th 06 06:36 PM


All times are GMT +1. The time now is 11:14 PM.

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"