Home |
Search |
Today's Posts |
#4
![]() |
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open Excel App without a blank worksheet opening | Excel Discussion (Misc queries) | |||
Using AutoFilter with worksheet protection in 2000 vs. 2003 | Excel Discussion (Misc queries) | |||
opening worksheet is "packing list" | Excel Worksheet Functions | |||
Weekly Transaction Processing | Excel Worksheet Functions | |||
copyright and worksheet protection | Excel Discussion (Misc queries) |