Results 1 to 4 of 4

macro to create a hyperlink to another sheet, does not work on spaces or symbols

Threaded View

Glitch_ macro to create a hyperlink... 03-11-2015, 03:09 PM
Glitch_ Re: Getting a userform to... 03-11-2015, 04:18 PM
Glitch_ Re: macro to create a... 03-16-2015, 10:42 AM
AkaTrouble Re: macro to create a... 03-16-2015, 10:58 AM
  1. #1
    Registered User
    Join Date
    10-09-2014
    Location
    Longview, Texas
    MS-Off Ver
    2003
    Posts
    15

    macro to create a hyperlink to another sheet, does not work on spaces or symbols

    Any direction would be appreciated
    I have a userforum with macros that when a user types in the forum a code (such as "hm952336") and then clicks the add button, it creates a new row on one sheet with the code in Column C of that row, the code that is in column c is also a hyperlink to a newly created sheet in the same workbook.

      If zcode.Value <> "" Then 
        With Sheets("List").Select
          Sheets("List").Rows("2:2").Select
        Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
        Rows("2:2").EntireRow.AutoFit
        Rows("2:2").Select
        
       
          Range("C2").Value = zcode
    
     Rows("2:2").Select
     Selection.Font.Name = "Arial"
            Selection.Font.Size = 12
        Selection.Font.Bold = False
            End With
    
            With Sheets("MCR (BLANK)").Select
                Sheets("MCR (BLANK)").Range("E15").Value = zcode.Value 'UL
    
    Sheets("MCR (BLANK)").Copy Before:=Sheets(3)
                   ActiveSheet.Name = zcode.Value
    Sheets("List").Range("C2").Hyperlinks.Add Anchor:=Sheets("List").Range("C2"), Address:="", SubAddress:=zcode.Value & "!A1", TextToDisplay:=zcode.Value
            End With
        Else
            MsgBox "UL Code required"
        End If
       Sheets("List").Select
    End Sub
    The issue is if the code has a space or a symbol (such as "hm9522336 hm9522337" or "hm9522336-hm9522338"), no hyperlink is created.
    How can I get the macro to create a hyperlink when a space or a symbol is in it.
    Here is the file:
    Attached Files Attached Files
    Last edited by Glitch_; 03-11-2015 at 04:45 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] A problem with creating a formula to substitute given symbols
    By Arty_1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-17-2014, 08:52 AM
  2. [SOLVED] help creating conditional formatting symbols using a formula
    By SEMMatt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-22-2013, 10:27 AM
  3. format combobox in userform to accept dates
    By Brad in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2005, 06:20 PM
  4. [SOLVED] format combobox in userform to accept dates
    By Brad in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2005, 06:17 PM
  5. [SOLVED] Creating custom chart legen pallettes/styles symbols
    By ChartDummy in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 03-19-2005, 12:06 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