+ Reply to Thread
Results 1 to 4 of 4

macro - creating URLs

  1. #1
    Registered User
    Join Date
    02-01-2007
    Posts
    5

    macro - creating URLs

    hey everyone,

    i'm trying to create a macro that will put together some URLs for me. i haven't gotten it down - i'm still new at this.

    i've got three columns and i have two pieces of code that fit between the three columns.. so it's like this:

    columnA + code1 + column B + code2 + column C

    the tricky part is that column B and column C may have spaces, which need to be replaced with a + (plus sign). (i used "While Not IsEmpty" for these.)


    i'd like to get the new URL to be put into columnE..

    my code isn't working - it's my first stab at it. i'm copying it below (and i attached it as a txt file). i'd appreciate any help.. and if you can keep comments in the code then i'll know where i went wrong.


    (I would be placing my cursor into column C - which will be the active cell. There are comments beside each step.)


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by morgonzola; 03-20-2007 at 05:47 PM.

  2. #2
    Registered User
    Join Date
    02-01-2007
    Posts
    5
    maybe i'm not being clear - it's not as hard as it seems, i know that i'm just missing something.

    so, what i'm looking for is this:

    if i have this in my worksheet with these values:
    columnA = http://www.excel.com/
    column B = help forum
    column C = programming macro

    then, code1 = ?a=1=
    code2 = &b=5=

    i want my end result to be placed into a brand new column (like columnE):
    http://www.excel.com/?a=1=help+forum...gramming+macro


    does this make sense? i'd really appreciate any help.

  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please wrap your code. See Forum rules below

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  4. #4
    Registered User
    Join Date
    02-01-2007
    Posts
    5
    sorry.. i wrapped the code in my original post.

    last note - the "code1" and "code2" will be the same throughout the whole URL generation - only the values in columns A - C are changing.
    Last edited by morgonzola; 03-20-2007 at 05:46 PM.

+ 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