gino59
Active Member
- Joined
- Jul 26, 2010
- Messages
- 496
Hi all!
Trying to make sure that a value chosen from a userform listbox gets placed in the proper worksheet table cell (xl2007). After selecting one item from the list box and clicking enter, the value selected should get placed in the next designated cell.
I get Compile error: Argument not optional on Range. But offset is listed as a valid argument. Any ideas?
Many thanks!
Gino
Trying to make sure that a value chosen from a userform listbox gets placed in the proper worksheet table cell (xl2007). After selecting one item from the list box and clicking enter, the value selected should get placed in the next designated cell.
Code:
Private Sub btnEnter_Click()
Dim NextRow As Long
Sheets("Sheet1").Activate
NextRow = Range.Offset _
(Range)("Table1[[#totals],[account]],-1,5"))
Cells(NextRow, 5) = lstAccount.Text
End Sub
I get Compile error: Argument not optional on Range. But offset is listed as a valid argument. Any ideas?
Many thanks!
Gino