hitch_hiker
Active Member
- Joined
- Feb 21, 2012
- Messages
- 294
In a combo box in a userform, I want the selection to go into the next available cell in a column , which is the variable adr. So I'm expecting something like
with frmProductList
ControlSource = adr
or maybe
ControlSource.value = adr
or maybe ???
with frmProductList
ControlSource = adr
or maybe
ControlSource.value = adr
or maybe ???
Code:
Private Sub cmdAddPart_Click()
Dim adr As String
Dim ws As Worksheet
Set ws = Worksheets("ORDER INPUT")
' find blank cell
'Dim adr As String, adrR1C1 As String
Range("c10").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
' load addr with blank cell reference
adr = ActiveCell.Address(ReferenceStyle:=xlA1)
'With frmProductList
' ControlSource = adr
'End With