View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default running a Macro in 2007 which was created in 2003

Simon,

That line is fine in E2007 provided you have 'SET' Master_Wksht but if you
hadn't done that it wouldn't have run in earlier versions of Excel

Set Master_Wksht = Sheets("Sheet1")

What have you dimmed LastRow as it should be long.

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Simon" wrote:

Hi there, I hope you can help, I am not VB literate unfortunately but I am
trying to run a macro with the following line of code which creates an error:

LastRow = Master_Wksht.Range("N" & Rows.Count).End(xlup).Row

Is there a change between versions which means this line won't work any more?