LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default ActiveWorksheet vs Worksheets.Item(1)

Thanks Peter and JE
Good points and infomation...

"Peter T" <peter_t@discussions wrote in message
...
Seeing JE McGimpsey's response makes me realize I didn't fully digest your
question, in particular that you want to reference the first worksheet
irrespective as to which is the Activsheet. Your code was right first
time,
stick with -

Set oWs = oWb.Worksheets.Item(1)


Guess I'll stick with this to avoid possibility someone saved template with
different sheet active...
Thanks for the pointer

or
Set oWs = oWb.Worksheets(1)


I always try to avoid default properties...lots of experts advise against
that on vb groups...in case of future revisions to object model I
suppose(however unlikely that might be)
:-)


and for future refernce keep in mind your 'ActiveWorkSheet' should have
read
ActiveSheet


Yeah! Duh! :-)


Regards,
Peter T




 
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
Linking item between two worksheets CD Excel Worksheet Functions 1 February 24th 10 02:06 PM
Keyboard Shortcut to toggle b/w Find and Replace and ActiveWorksheet? Brooks Excel Discussion (Misc queries) 0 November 25th 08 02:20 PM
Copy ActiveWorksheet Columns B,C,F to Another Worksheet in Workboo Joe K. Excel Programming 1 October 5th 07 01:38 AM
Automating a line item for several worksheets? tpmax Excel Worksheet Functions 1 June 26th 07 03:56 AM
hyperlink item#'s across worksheets Matt Hughes Excel Programming 2 March 10th 06 11:59 PM


All times are GMT +1. The time now is 01:20 PM.

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"