View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
ytayta555 ytayta555 is offline
external usenet poster
 
Posts: 247
Default Why doesn't this work?

On 25 Iul, 14:08, "michael.beckinsale"
wrote:
The code is failing at the 'sh.Copy' line. Can anybody tell me what is
wrong please?


Sub CreateXLFiles()


* * Dim sh As Worksheet


* * * * sh.Copy *<<<<<<<<<<<<<<<ERROR HERE
Michael


Maybe you Dim sh As Worksheet but forget to Set the sh :
Set sh = (your sheet) or Array(your sheets)