View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default VBA Sheets.Add disabled

Try specifying the Workbook name

Workbooks("Book1").Sheets.Add
Workbooks("Book1").ActiveSheet.Name = "exporteren data"

If this post helps click Yes
---------------
Jacob Skaria


"Willem" wrote:

Hi,

We recently upgraded from Office 2003 to Office 2007. In some macro's errors
start occurring, e.g. the Excel macro that adds an extra sheet to a workbook,
and always worked flawless, now stops running.
Also i cannot add a worksheet manually; I can see the tab but it is disabled.
The workbook consists of several (protected) worksheets.
The macro is very simple:
Sub MakeSheet()
' Application.ScreenUpdating = False
Sheets.Add
ActiveSheet.Name = "exporteren data"
End Sub

What can be the problem?