Results 1 to 5 of 5

To get rid of some contents from the path location string

Threaded View

  1. #1
    Forum Contributor
    Join Date
    06-20-2011
    Location
    Auckland, NZ
    MS-Off Ver
    Excel 2013
    Posts
    165

    To get rid of some contents from the path location string

    hi guys,

    i am trying to convey something in the message box..which is as follows:

            ' Promt
            strPrompt = ".xls file location titled 'Test.xls' can be found in location " & filespec & "Test.xls" & "." & vbCrLf & _
            "Please click 'OK' or 'Cancel' to exit this message box."
            
            ' Dialog's Title
            strTitle = "Test.xls Location"
            
            'Display MessageBox
            iRet = MsgBox(strPrompt, vbOK, strTitle)
            
            ' Check pressed button
            If iRet = vbOK Then
                Range("A9").Select
            Else
                ' do nothing
            End If
    filespec is "C:\something_else.xls"

    so the message pops up as ".xls file location titled 'Test.xls' can be found in location C:\something_else.xlsTest.xls. Please click 'OK' or 'Cancel' to exit this message box." now

    i need the message to pop up as ".xls file location titled 'Test.xls' can be found in location C:\Test.xls. Please click 'OK' or 'Cancel' to exit this message box."

    i need to get rid of "something_else.xls" from the file location path.

    any suggestion guys..

    thanks in advance guys..

    best regards
    plasma33
    Last edited by plasma33; 12-28-2014 at 09:57 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Changing connection string path to a dynamic path
    By Shevi in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 11-11-2014, 05:16 AM
  2. List of Search file location path
    By mohan.r1980 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2013, 06:01 PM
  3. using cell contents as a string to define a folder path
    By RDS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2012, 04:16 PM
  4. Changing path to a network location
    By talksalot81 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-24-2011, 12:10 PM
  5. Use String Variables in File Path and create path if not existing
    By JanBang in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2007, 09:04 AM

Tags for this Thread

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