Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My assumption was that the cell content was an integer - I guess I should
have detailed that assumption. If the cell content type cannot be guaranteed, I would recommend setting variable to type of Variant. -- Rob van Gelder - http://www.vangelder.co.nz/excel "Bob Phillips" wrote in message ... Rob , Although it is not necessary, and looks odd, the OP's syntax is not wrong. What might be wrong is that the activecell might be a string or something, not an integer. Shamsul, also you don't need to initialise variables before setting i9t to a value. Try this Dim Z As Integer With ActiveCell.Range("A1") If IsNumeric(.Value) Then Z = .Value End If End With -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Rob van Gelder" wrote in message ... Z = ActiveCell.Value -- Rob van Gelder - http://www.vangelder.co.nz/excel "Shamsul Islam" wrote in message ... Hi I want a variable value, to be the value of the activecell. I've tried the following: Dim Z As Integer Z = 0 Z = ActiveCell.Range("A1").Value The code doesn't work. Please advise. Thanks Sham |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to use ActiveCell to mean a particular cell? | Excel Worksheet Functions | |||
If activecell.column = variable then activecell,offset (0,1) | Excel Discussion (Misc queries) | |||
activecell.formular1c1 | Excel Programming | |||
activecell offset | Excel Programming | |||
how to set activecell? | Excel Programming |