Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wy get a and error
CompileError: can find the method or the fact member? Sub TabbladRechtsInvoegen() ' Find how many sheets are in the workbook Dim No_Sheets No_Sheets = Sheets.Count ' Add a new sheet Sheets.Add ' The new sheet is the active sheet. Move it to after the last Sheet ActiveSheet.Move After:=Sheets(No_Sheets + 1) End Sub JP |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The code works in a new workbook with Excel 2003. I would try opening a new
workbook like I did and run just the code you posted and see if you still get an error. "Pierre" wrote: Wy get a and error CompileError: can find the method or the fact member? Sub TabbladRechtsInvoegen() ' Find how many sheets are in the workbook Dim No_Sheets No_Sheets = Sheets.Count ' Add a new sheet Sheets.Add ' The new sheet is the active sheet. Move it to after the last Sheet ActiveSheet.Move After:=Sheets(No_Sheets + 1) End Sub JP |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using Excel 2003 and don't get an error. I would modify it a bit though.
Sub TabbladRechtsInvoegen() Dim aWB As Workbook Dim aWS As Worksheet Set aWB = ActiveWorkbook ' Add a new sheet Set aWS = aWB.Sheets.Add ' The new sheet is the active sheet. Move it to after the last Sheet aWS.Move After:=aWB.Sheets(awb.sheets.count) End Sub HTH, Barb Reinhardt "Pierre" wrote: Wy get a and error CompileError: can find the method or the fact member? Sub TabbladRechtsInvoegen() ' Find how many sheets are in the workbook Dim No_Sheets No_Sheets = Sheets.Count ' Add a new sheet Sheets.Add ' The new sheet is the active sheet. Move it to after the last Sheet ActiveSheet.Move After:=Sheets(No_Sheets + 1) End Sub JP |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Its work fine in a new workbook but not in the Personal workbook?
JP |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I get a compiler error on ".Count"?
JP |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 2 sep, 00:11, Pierre wrote:
I get a compiler error on ".Count"? JP Nobody? JP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
insert sheet tab is not functioning and can't add new sheet | Excel Worksheet Functions | |||
Insert Sheet | Excel Worksheet Functions | |||
insert query into excell sheet to update excell sheet and pivot table | Excel Discussion (Misc queries) | |||
Insert Sheet | Excel Programming | |||
Inserting a row in sheet A should Insert a row in sheet B, removing a row in Sheet A should remove the corresponding row in sheet B | Excel Programming |