Using a worksheet value within a macro - please help me

  • Thread starter Thread starter FennisDuck
  • Start date Start date
F

FennisDuck

need the formula to obtain the value of Sheet : Sheet1 Cell: A23, the
value is being used to create an end total in `sheet2`

how do I input so that this value is reflected as myNum
is it
Activate.Worksheet:"Sheet1",A23 or ?????



counter = 0
myNum = ??? " need the formula here to collect value from worksheet
a = counter
Do While myNum > a
myNum = myNum - 1
counter = counter + 1

thanks in advance for any assistance or suggestions
 
myNum = Worksheets("Sheet1").Range("A23").Value

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
Thanks you very much , worked a treat ,
I even found out that if I show
Worksheets("Sheet1").Range("A23").Value=myNum
it then displays the value of mynum in the specfied worksheet & cell

also a big thank you to RNC for taking the time to post a reply
 
Back
Top