+ Reply to Thread
Results 1 to 3 of 3

How to Parse Street, City, State, and Zip Code into Separate Values. In Textbox

  1. #1
    Registered User
    Join Date
    12-04-2016
    Location
    CHICAGO US
    MS-Off Ver
    Excel 2016
    Posts
    14

    How to Parse Street, City, State, and Zip Code into Separate Values. In Textbox

    Hi, so I am a beginner to VBA and I got the code how to separate state, city, and zip code, but I don't know the code for how to do the street? Here's the code on how to separate city, state and zip code, and an image to show how I want to be separated in the textbox.

    Enter the following code:
    Please Login or Register  to view this content.
    To test, create a form with four text boxes (txtAddress, txtCity, txtState, txtZip), and a command button. Add the following code:

    Please Login or Register  to view this content.
    userorm address 1.png

    I would appreciate if anyone can find the solution.
    Last edited by jarekmos; 07-17-2017 at 04:47 PM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: How to Parse Street, City, State, and Zip Code into Separate Values. In Textbox

    Code Tags Added
    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html



    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: How to Parse Street, City, State, and Zip Code into Separate Values. In Textbox

    Hi jarekmos

    Please don't ask us to recreate your Data File or User Form...upload yours so we can test it.

    Please attach a sample workbook the Structure of which is the same as your actual workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    INCLUDE ANY CODE YOU'RE USING OR HAVE TRIED.

    Remember to desensitize the data.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 17
    Last Post: 09-10-2016, 01:19 PM
  2. Separate city state and zip
    By cape in forum Excel General
    Replies: 7
    Last Post: 11-16-2015, 07:48 PM
  3. Pulling company name, street address, city, state, and zip from address
    By UNREAL2K4 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-13-2015, 12:53 PM
  4. Separating Street Address City State Zip that only contain spaces
    By tp5887 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-27-2015, 02:52 PM
  5. Separate Zip Code from City, State Zip Code
    By caunyd in forum Excel General
    Replies: 3
    Last Post: 08-04-2013, 05:14 PM
  6. I need Help to parse address city state zip and country if applicable for all fields
    By danpotash in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2013, 03:16 PM
  7. [SOLVED] Trying to seperate messy raw data, street, city, state, zip
    By KraXed112 in forum Excel General
    Replies: 2
    Last Post: 07-21-2012, 03:15 PM

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