LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

What would cause it to change, and how do you know?

--
HTH

Bob Phillips

"Jeff" wrote in message
...
If I set a variable equal to the sheet, the sheet will not change but I

need
to open the worksheet name. So I need the worksheet name, not the sheet.

My Code

ChDir "C:\Illustrator"

Workbooks.Open FileName:= _
"C:\Illustrator\COI.xls"
Sheets("MNS").Select

So the file "COI" is what could change.


"Bob Phillips" wrote:

Use the codename not the Excel name.

This is usually the same, Sheet1, Sheet2, etc, but it doesn't change if

the
user changes the Excel name.

You use it like

Sheet1.Range("A1")

instead of

Worksheets("Sheet1").Range("A1")


--
HTH

Bob Phillips

"Jeff" wrote in message
...
I have a VBA code - that opens a worksheet, then gets data. The

problem
is
that the worksheet name can change, then it won't open. Is there

anyway
to
save the worksheet name as some variable, that can reference the

worksheet
name/location + will automatically update?

Thanks






 
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
Open Excel App without a blank worksheet opening Chris Excel Discussion (Misc queries) 2 September 14th 05 01:46 AM
Using AutoFilter with worksheet protection in 2000 vs. 2003 gncook Excel Discussion (Misc queries) 3 July 25th 05 08:02 PM
opening worksheet is "packing list" usrofc Excel Worksheet Functions 1 February 24th 05 07:19 PM
Weekly Transaction Processing Ralph Howarth Excel Worksheet Functions 4 January 19th 05 05:37 AM
copyright and worksheet protection dow Excel Discussion (Misc queries) 2 January 3rd 05 03:07 PM


All times are GMT +1. The time now is 06:24 AM.

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"