Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Maybe I'm missing something obvious here!
I wrote the following code as part of a routine: Workbooks(myName).Close False Kill "I:\" & myName & ".xls" Problem I have encountered is that in my Window dropdown it says "Example" whereas in the Window dropdown of other people who use the spreadsheet it says "Example.xls" ! What would people suggest without changing the settings on either machine? Any help greatly appreciated. Jason |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
always use the example.xls which works regardless of settings.
-- Regards, Tom Ogilvy "jase" wrote in message oups.com... Maybe I'm missing something obvious here! I wrote the following code as part of a routine: Workbooks(myName).Close False Kill "I:\" & myName & ".xls" Problem I have encountered is that in my Window dropdown it says "Example" whereas in the Window dropdown of other people who use the spreadsheet it says "Example.xls" ! What would people suggest without changing the settings on either machine? Any help greatly appreciated. Jason |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you need to check the string and I suggest this:
Workbooks(myName).Close False Kill "I:\" & myname & IIf(LCase(Right(myname, 4)) = ".xls", "", ".xls") There may be problems with the drive if it is not saved on I and therefore I suggest using the following: mynamefull = Workbooks(myName).FullName Workbooks(myName).Close False Kill mynamefull & IIf(LCase(Right(myname, 4)) = ".xls", "", ".xls") ' may even add the .xls on in all cases. -- HTHs Martin "jase" wrote: Maybe I'm missing something obvious here! I wrote the following code as part of a routine: Workbooks(myName).Close False Kill "I:\" & myName & ".xls" Problem I have encountered is that in my Window dropdown it says "Example" whereas in the Window dropdown of other people who use the spreadsheet it says "Example.xls" ! What would people suggest without changing the settings on either machine? Any help greatly appreciated. Jason |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
generic macro on close of excel workbook | Excel Programming | |||
Storing generic objects in workbook via automation | Excel Programming | |||
Generic Workbook Select | Excel Programming | |||
Generic Window Activate | Excel Programming | |||
Printing to Generic / Text printer | Excel Programming |