|
-
Oct 29th, 2003, 02:36 PM
#1
Thread Starter
New Member
what does this statement do
Can somebody please explain what the below line does:
Worksheets.Add.Move after:=Worksheets(Worksheets.Count)
Thank You.
-
Oct 29th, 2003, 02:55 PM
#2
Thread Starter
New Member
I just figured out what this statement does. I am new to MS programming. Sorry for the trouble.
-
Oct 29th, 2003, 07:39 PM
#3
Fanatic Member
The Move method is not needed inthis case because the dd method accepts an After parameter. The above code will add a sheet after the Activesheet (because no parameters are passed to the Add method) and then move the sheet to the end of the Sheets collection. If you watch close, you will see Excel flicker as it adds the sheet to the middle then moves it to the end. This gets the same result without the extra Move method:
VB Code:
Worksheets.Add After:=Worksheets(Worksheets.Count)
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
|