+ Reply to Thread
Results 1 to 4 of 4

Inserting a backslash into a string of text (a path, actually)?

  1. #1
    Registered User
    Join Date
    08-27-2012
    Location
    Santa Ana, CA USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Inserting a backslash into a string of text (a path, actually)?

    I'm sure this is really simple, but I've tried different syntax (guessing) to no avail. Basically, I have a userform that will allow people to choose a folder location from a combobox and then specify their own file name, with the rest of the path being predetermined in the macro. I did this to reduce the number of mistakes people make when filling out a template form and saving it as a regular .xlsx. The macro also does a few simple things such as deleting the commandbutton and resizing/un-freeze paning the first row before it gets saved.

    Please Login or Register  to view this content.
    The issue lies within the "\" between the combobox and textbox values (I get a syntax error). What would be the proper way of phrasing it to insert the backslash?


    Thanks, all!

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Inserting a backslash into a string of text (a path, actually)?

    Just need another ampersand after ComboBox1.Value

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Inserting a backslash into a string of text (a path, actually)?

    Missing "&"

    ComboBox1.Value & "\" & TextBox1.Value

  4. #4
    Registered User
    Join Date
    08-27-2012
    Location
    Santa Ana, CA USA
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: Inserting a backslash into a string of text (a path, actually)?

    D'oh!

    I'm glad the weekend's here as I apparently am in need of rest.

    Thank you for the help, guys!

+ 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