Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a series of comboboxes in a sheet (REFI1, REFI23 etc). How can I make
the second line of code generic (i.e pass the value of rw into Me.REFI & rw)? Dim rw As Long: rw = 51 Range("AG" & rw) = Me.REFI51 I tried: Range("AG" & rw) = Me.REFI & rw but it debugs with "REFI" data member not found. Thanks in advance, Brett. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you have your combo box in your Activesheet..
Dim rw As Long: rw = 51 'To assign the value from cell to combo ActiveSheet.REFI51 = Range("AG" & rw) 'To assign the value from combo to cell Range("AG" & rw) = ActiveSheet.REFI51 -- If this post helps click Yes --------------- Jacob Skaria "Brett" wrote: I have a series of comboboxes in a sheet (REFI1, REFI23 etc). How can I make the second line of code generic (i.e pass the value of rw into Me.REFI & rw)? Dim rw As Long: rw = 51 Range("AG" & rw) = Me.REFI51 I tried: Range("AG" & rw) = Me.REFI & rw but it debugs with "REFI" data member not found. Thanks in advance, Brett. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Jacob, I think you may have missed my point. The procedure is a generic
one that is called by each of the comboboxes REFI1 through REFI100, so I want to refer to REFI & rw, where rw is the value passed into the procedure. Regards, Brett "Jacob Skaria" wrote: If you have your combo box in your Activesheet.. Dim rw As Long: rw = 51 'To assign the value from cell to combo ActiveSheet.REFI51 = Range("AG" & rw) 'To assign the value from combo to cell Range("AG" & rw) = ActiveSheet.REFI51 -- If this post helps click Yes --------------- Jacob Skaria "Brett" wrote: I have a series of comboboxes in a sheet (REFI1, REFI23 etc). How can I make the second line of code generic (i.e pass the value of rw into Me.REFI & rw)? Dim rw As Long: rw = 51 Range("AG" & rw) = Me.REFI51 I tried: Range("AG" & rw) = Me.REFI & rw but it debugs with "REFI" data member not found. Thanks in advance, Brett. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Combobox.value reference | Excel Programming | |||
Dynamic ComboBox Reference | Excel Programming | |||
Generic reference in a Macro | Excel Discussion (Misc queries) | |||
Reference A Combobox On The First page. | Excel Programming | |||
Generic ComboBox change event | Excel Programming |