Macro code

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

Guest

Need code to use within Macro to display value of a worksheet range

Sub golfScores(
Workbook range "A2" value is = ?
with above value then can edit rest of macro to enter golf score data in that row

Thank
Bob Leonard
 
Sub GolfScores()
Dim sAddr a sString, sVal as String
Dim vVal as Variant
Dim rng as Range
With Workbooks("Golfscores.xls").Worksheets("Scores")
sAddr = .Range("A2").Address
sVal = .Range("A2").Text
vVal = .Range("A2").Value
set rng = .Range("A2")
msgbox sAddr & " value is = " & sVal

..Cells(rng.row,"F").Value = vVal
End With
end Sub

Might give you some ideas
 

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