|
-
September 29th, 1999, 08:36 AM
#1
Excel Object Library
Hi
I want to append 1 more Sheet to my Workbook.
And I have trouble using :
dim MyWorkbook as Workbook
MyWorkbook.Worksheets.Add ([Before],[After],[Count],[Type]) as Object
What am I supposed to pass to [Before] or [After] ?
Thanks
-
September 29th, 1999, 09:16 AM
#2
Re: Excel Object Library
these are all optional parameters. So, you can just omit them:
Set ws = ...WorkSheets.Add
-
September 29th, 1999, 09:22 AM
#3
Re: Excel Object Library
Thanks for the reply.
The thing is I want to add my sheet to the end of the existing Sheets.
If I omit those optional parameters, my sheet will added infront of the
existing ones. I'm sure there 's something to do with with those [Before],[After] parameters.
-
September 29th, 1999, 09:28 AM
#4
Re: Excel Object Library
OK, here is a sample from the online docs:
Worksheets("Sheet1").Move After:=Worksheets(Worksheets.Count)
-
September 29th, 1999, 09:51 AM
#5
-
September 29th, 1999, 11:08 AM
#6
Re: Excel Object Library
Lothar,
Can you tell me where that online docs are, I still have a
small problem with that Sheet insertion.
The first insertion and move is OK.
But right second insertion, seems like the move is executed automatically
with the old "Worksheets.count"
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|