View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default New object/automation error

Hi Stephen,

Try:

Dim SH As Worksheet

Set SH = Worksheets.Add

---
Regards,
Norman


"Stephen" wrote in message
...
I need to create a new sheet in my macro. So far the code I've been using
looks something like this:

Dim sheet7 as worksheet
sheet7 = new worksheet

But I keep getting error saying that the object doesn't support
automation.
I'm still a new programmer and I'm not sure what automation is. I can't
seem
to find any documentation to tell me what I'm doing wrong.