View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Todd Huttenstine[_2_] Todd Huttenstine[_2_] is offline
external usenet poster
 
Posts: 237
Default Referencing a cell for a value in VBA code

Below I have 2 lines of a code I am using. I have a value
in cell A1 on sheet2 anda value in cell A2 an sheet2. I
would like to specify for the first code to look in cell
A1 sheet2 to get the value "Your Stats" instead of hard
coding it in the actual VBA code like done below. I would
also like to specifiy the second code to look in cell A2
sheet2 to get the value "Here are your stats " instead of
hard coding it in the VBA code. How do I do this?
Thank you

Todd Huttenstine

objMessage.Subject = "Your Stats"

objMessage.Text = "Here are your stats " & cell.Offset(0,
1).Value