LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
RJH RJH is offline
external usenet poster
 
Posts: 44
Default Calling an inactive sheet...

This may be a dumb questions but here goes:
If I have 2 sheets open, is there a way to refer to the inactive sheet
without using it's name?
The problem I'm having is that this file is run locally by many people and
everybody wants to rename their file. If I use the original file name in
the macro and the file gets renamed, the macro fails.

If ActiveSheet.Name = Workbooks("XXX.xls").Sheets(1).Name Then
ActiveWorkbook.Close 'close doc sheet if date already exists
Else: 'insert sheet if new date
Sheets(1).Move Befo=Workbooks("XXX.xls").Sheets(1)
End If

Thanks in advance.

RJH


 
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
Adv. Filter - Want to copy to inactive sheet Maki Excel Discussion (Misc queries) 7 January 20th 10 12:59 PM
Adv. Filter - Want to copy to inactive sheet Maki Excel Discussion (Misc queries) 1 January 12th 10 10:50 PM
Hyperlink inactive if sheet protected Tome de Souza Links and Linking in Excel 1 June 1st 09 01:59 PM
macro to change data in inactive sheet Diana Excel Discussion (Misc queries) 1 April 28th 06 08:36 PM
macro to change data in inactive sheet Diana Excel Discussion (Misc queries) 1 April 28th 06 08:10 PM


All times are GMT +1. The time now is 11:59 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"