#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Macro code

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro Code cvgairport Excel Discussion (Misc queries) 2 April 20th 10 01:49 PM
Please Help with Macro Code Damil4real Excel Discussion (Misc queries) 1 August 12th 09 07:09 PM
VBA code for macro help Cam Excel Discussion (Misc queries) 0 September 7th 07 07:14 PM
Deleting code from a macro (by a macro) Brettjg Excel Discussion (Misc queries) 2 May 8th 07 10:14 PM
Macro code Shu of AZ Excel Discussion (Misc queries) 2 January 29th 07 06:29 PM


All times are GMT +1. The time now is 09:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"