How do you insert the contents of a variable into a cell?
Thanks Michael
Comment lines are preceded with '
Sub DemoVariable()
'Dimensions two variables
Dim sName1 As String, sName2 As String
'Assigns one a string value
sName1 = "Nick Hodge"
'Passes that string value to the
'range A1 on active sheet
Range("A1").Value = sName1
'Picks up a value from A2 on active sheet
'and assigns to 2nd variable
sName2 = Range("A2").Value
'Displays message box with 2nd variable value
MsgBox sName2
End Sub
--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
nick_hodge...@zen.co.uk.ANDTHIS
"Himszy" <n...@spam.com> wrote in message
news:hFyAd.19798$0W6....@fe2.news.blueyonder.co.uk...
Thanks Nick