View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Delete a sheet and delete a module in Another Worksheet then s

You are missing the word "Dim" at the front of the line.

VBComp As VBIDE.VBComponent

should be

Dim VBComp As VBIDE.VBComponent

Cordially,
Chip Pearson
Microsoft MVP 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
[email on web site]




On Thu, 4 Feb 2010 06:38:05 -0800, Trev B
wrote:

Thanks Bob,

However, when I try and run it an error occurs on following line:-

VBComp As VBIDE.VBComponent

The error states:-

Statement Invalid Outside Type Block.

Can you please help me get over this error.

Thanks