ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   referencing the active cell (https://www.excelbanter.com/excel-programming/334684-referencing-active-cell.html)

Jim O[_4_]

referencing the active cell
 
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


--
Jim O

Bob Phillips[_7_]

referencing the active cell
 
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

"Jim O" wrote in message
...
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


--
Jim O




Jim O[_4_]

referencing the active cell
 

--
Jim O


"Bob Phillips" wrote:

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

"Jim O" wrote in message
...
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


--
Jim O

Thank You
I was going about the task totally wrong manner







All times are GMT +1. The time now is 04:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com