View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default How can I use values in two separate cells to select a new cell?

Hi,

Is this what you want? This is for a button using the FORM toolbar
which calls macro "Button1_Click":

Sub Button1_Click()

Dim r as long, c as Integer

With Worksheets("Sheet1")
r = .Range("a1") ' Link cell for first listbox - row
c =. Range("b1") ' Link cell for second listbox - column
. Cells(r, c).Select
MsgBox ActiveCell
End with

End Sub


HTH

"nassetr" wrote:

I am using two user form list boxes to return values in two separate cells
(the cell link). I want one cell to correspond to a row, the other to a
column. I want a macro button that will automatically select the cell
corresponding with the values listed in the two cell links. Can anyone help?
Thanks.