+ Reply to Thread
Results 1 to 3 of 3

Generic Window/Workbook text

  1. #1
    jase
    Guest

    Generic Window/Workbook text

    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. #2
    Tom Ogilvy
    Guest

    Re: Generic Window/Workbook text

    always use the example.xls which works regardless of settings.

    --
    Regards,
    Tom Ogilvy


    "jase" <biggest.ears@talk21.com> wrote in message
    news:1135766039.534238.164400@o13g2000cwo.googlegroups.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. #3
    Martin Fishlock
    Guest

    RE: Generic Window/Workbook text

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1