Thread: Macro code
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Macro code

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

--
Regards,
Tom Ogilvy


"rleonard" wrote in message
...
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!

Thanks
Bob Leonard