Hi Jeff
If you want to refer to the cell you need
Dim currentcell as Range
Then you will need to use
Set currentcell = something rather than currentcell = something
Regards
David Grugeon
On 4 April 2015 at 00:10, jeff.flanagan@duffcorp.ca [ExcelVBA] <ExcelVBA@yahoogroups.com> wrote:
Thanks all for your help. I found an alternate solution last night that worked. This morning I tried copy/paste my original formula and, surprise, it worked correctly with no errors, so I could not replicate the problem.
Lessons learned:
- Include errors in request for help so others can see what I see.
- No colon after "Else" statement. (FWIW VBA automatically placed colon).
- Do not code at 2 a.m. Brain no longer awake.
One other question, is "Dim CurrentCell As Long" correct? Or should it be "Dim CurrentCell As Range"?
__._,_.___
Posted by: David Grugeon <yahoo@grugeon.com.au>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (6) |
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar