Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default VBA Sheets.Add disabled

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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default VBA Sheets.Add disabled

Thanks for your prompt reaction, Jacob.
It won't work, because the file I.m talking about is a template (xltm) and
the users name it themselves.
I have another workbook using the same macro's, and this does not give this
problem. In the other wb i can add sheets, and in thois one it is disavbled
but i don't see how.


"Jacob Skaria" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 747
Default VBA Sheets.Add disabled

May be the workbook is protected.

Go to Revew tab | protect workbook | any tick is there for protect
structure and windows | then its protected.

If its not protected then, check the sheet named "exporteren data" is
already exist.

Sub makesheet()
Sheets.add.name = "exporteren data"
end sub

On May 1, 5:19*pm, 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?


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default VBA Sheets.Add disabled

yes, thanks. I feel so silly.......
the box for style protectiuon was ticked.
it works like it always did......

thanks again


"muddan madhu" wrote:

May be the workbook is protected.

Go to Revew tab | protect workbook | any tick is there for protect
structure and windows | then its protected.

If its not protected then, check the sheet named "exporteren data" is
already exist.

Sub makesheet()
Sheets.add.name = "exporteren data"
end sub

On May 1, 5:19 pm, 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?





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default VBA Sheets.Add disabled

Cheers. Good to hear that...

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


"Willem" wrote:

yes, thanks. I feel so silly.......
the box for style protectiuon was ticked.
it works like it always did......

thanks again


"muddan madhu" wrote:

May be the workbook is protected.

Go to Revew tab | protect workbook | any tick is there for protect
structure and windows | then its protected.

If its not protected then, check the sheet named "exporteren data" is
already exist.

Sub makesheet()
Sheets.add.name = "exporteren data"
end sub

On May 1, 5:19 pm, 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?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Right click disabled LiAD Excel Discussion (Misc queries) 3 April 22nd 09 02:00 PM
Hyperlinks disabled I Need help leerem Excel Discussion (Misc queries) 0 September 17th 08 08:56 PM
Interpolate is disabled Rajula Charts and Charting in Excel 5 December 20th 07 02:40 PM
Charts disabled AliSmith Setting up and Configuration of Excel 0 September 22nd 07 10:34 AM
Cut is disabled BSchmeltz Excel Discussion (Misc queries) 4 March 1st 07 02:30 PM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"