referencing the active cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After making a selection within ComBoBox7 I would like to post data to the
row selected using Commandbutton1. Cell $a$4 contains the list index address

Code should look something like this

Private Sub CommandButton1_Click()
Dim rngcell As Excel.Range
If TypeName(ActiveSheet) = "Worksheet" Then
Set rngcell = ActiveSheet.Range("$A$4")
'Cell $A$4 contains a cell address
rngcell.Select
'make rngcell the active cell
End If
ActiveCell.Offset(0, 3) = TextBox13.Value
End Sub
 
Do you mean?

Private Sub CommandButton1_Click()
Dim iRow as long
iRow = Application.Match(combobox1.value,Range("A1:A100"),0)
Cells(iRow,"A").Seelect
End Sub
 
--
Jim O


Bob Phillips said:
Do you mean?

Private Sub CommandButton1_Click()
Dim iRow as long
iRow = Application.Match(combobox1.value,Range("A1:A100"),0)
Cells(iRow,"A").Seelect
End Sub

--
HTH

Bob Phillips


Thank You
I was going about the task totally wrong manner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top