Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
When I add a workbook I get only 1 sheet, not sure why it's not 3, but
nonetheless there's the 1. I use the Item( 1 ) method to get the pointer of the worksheet. I store it for future use. If I add a worksheet, I store the pointer as well. All is fine. Item, Index, Name both work fine and I can select between the two without problems. If I do a Move of a sheet then a call to get the Name, Item, Index properties fails. Any ideas? Thanks. -G- |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jim Cone
San Francisco, USA http://www.realezsites.com/bus/primitivesoftware Sub MakeAnotherAndMoveIt() Dim objFirst As Excel.Worksheet Dim objSecond As Excel.Worksheet Dim objWB As Excel.Workbook 'Create new workbook Set objWB = Workbooks.Add 'Get reference to the first sheet. Set objFirst = objWB.Worksheets(1) 'Add new sheet after the first sheet and secure a reference to it.. Set objSecond = objWB.Worksheets.Add(after:=objFirst, Count:=1) 'Move the new sheet to the first position again. objSecond.Move befo=objFirst End Sub '------------------- "Grasshopper" wrote in message When I add a workbook I get only 1 sheet, not sure why it's not 3, but nonetheless there's the 1. I use the Item( 1 ) method to get the pointer of the worksheet. I store it for future use. If I add a worksheet, I store the pointer as well. All is fine. Item, Index, Name both work fine and I can select between the two without problems. If I do a Move of a sheet then a call to get the Name, Item, Index properties fails. Any ideas? Thanks. -G- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Editting xml format sheets stored in database. | Excel Discussion (Misc queries) | |||
move cursor on one sheet moves cursor on all sheets | Excel Discussion (Misc queries) | |||
Is this a joke or Microsoft screws up again? | Excel Discussion (Misc queries) | |||
referencing to a sheet that it`s name is stored on a cell | Excel Worksheet Functions | |||
Getting data from sheet stored on LAN | Excel Programming |