Why can't I use a string variable for a range location?
Private Sub getFreqCommandButton_Click()
Dim oneCellAboveStartFreq As Long
Dim cellStartLocation As String
Dim startFreq As Long
' search for the start freq indicator text
oneCellAboveStartFreq = Application.WorksheetFunction.Match("VAR_LIST_BEGIN", Range("A1:A1000"), 0)
' return numerical value of row in column A
' = 9 the row where the matched string is located
' writes row number in cell D1
ActiveSheet.Range("D1").Value = oneCellAboveStartFreq
' create actual cell range where the data is located
' this cell is one cell down - in this case A10
' places the formated data "A10" in cell D2
ActiveSheet.Range("D2").Value = """A" & oneCellAboveStartFreq + 1 & """"
' sets value of D2 to a string variable
cellStartLocation = Range("D2").Value
' now what I really want to get is the data value in cell range A10
' cellStartLocation is equal to "A10"
' so I want to use the variable as the range of the cell I want
startFreq = ActiveSheet.Range(cellStartLocation).Value
' now place the data from A10 in range D3
ActiveSheet.Range("D3") = startFreq