Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / November 2007

Tip: Looking for answers? Try searching our database.

selecting worksheet by its index.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ucanalways@gmail.com - 13 Nov 2007 18:32 GMT
Initially I have Sheet1(Sheet3). Later I rename the Sheet 3. Let's
assume it becomes Sheet1(AAA). The name changes periodically. So, I
would like to select it using the sheet's index. What would be the
macro/syntax for this? Thanks
Nigel - 13 Nov 2007 18:54 GMT
Sheets(1).Activate

However this relates to the first sheet in the workbook, change it's
position and index number changes. Consider using the codename which can be
set in the VBA Editor.

Signature

Regards,
Nigel
nigelnospam@9sw.co.uk

> Initially I have Sheet1(Sheet3). Later I rename the Sheet 3. Let's
> assume it becomes Sheet1(AAA). The name changes periodically. So, I
> would like to select it using the sheet's index. What would be the
> macro/syntax for this? Thanks
ucanalways@gmail.com - 13 Nov 2007 19:46 GMT
> Sheets(1).Activate
>
[quoted text clipped - 18 lines]
>
> - Show quoted text -

Hi.. could you please let me know how to tackle this problem using
something in the lines of

dim wsindex as integer
if wsindex = 1 then
'activate that sheet
end if

Thanks
JP - 13 Nov 2007 20:46 GMT
You can just delete the sheet directly by using "Sheets(1).Delete" or
"Sheet1.Delete"

HTH,
JP

On Nov 13, 2:46 pm, ucanalw...@gmail.com wrote:

> Hi.. could you please let me know how to tackle this problem using
> something in the lines of
[quoted text clipped - 5 lines]
>
> Thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.