Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Need hyperlink in macro

  1. #1
    Guest

    Default

    In the code below I need to make For all you needs - contact Brian" red and bold also I need to link it to a html page - please help


    Sub Insert10()
    '
    ' Insert10 Macro
    ' Macro recorded 3/9/2002 by David Lisowski
    '
    ' Keyboard Shortcut: Ctrl+i
    '
    Position = 10
    Count = 0
    RangeString = "A0"

    Do While Count < 100
    RangeString = "A" & Position
    Range(RangeString).Select
    Application.CutCopyMode = False
    Selection.EntireRow.Insert
    ActiveCell.FormulaR1C1 = "For all you needs - contact Brian"
    Position = Position + 10
    Count = Count + 1
    Loop

    End Sub


  2. #2
    MrExcel MVP Barrie Davidson's Avatar
    Join Date
    Feb 2002
    Location
    Winnipeg
    Posts
    2,330
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-11 17:18, Anonymous wrote:
    In the code below I need to make For all you needs - contact Brian" red and bold also I need to link it to a html page - please help


    Sub Insert10()
    '
    ' Insert10 Macro
    ' Macro recorded 3/9/2002 by David Lisowski
    '
    ' Keyboard Shortcut: Ctrl+i
    '
    Position = 10
    Count = 0
    RangeString = "A0"

    Do While Count < 100
    RangeString = "A" & Position
    Range(RangeString).Select
    Application.CutCopyMode = False
    Selection.EntireRow.Insert
    ActiveCell.FormulaR1C1 = "For all you needs - contact Brian"
    Position = Position + 10
    Count = Count + 1
    Loop

    End Sub


    ActiveCell.FormulaR1C1 = "For all you needs - contact Brian"
    ActiveSheet.Hyperlinks.Add Anchor:=ActiveCell, Address:= _
    "http://www.mrexcel.com"
    With ActiveWorkbook.Styles("Hyperlink").Font
    .Bold = True
    .ColorIndex = 3
    End With


    Regards,
    Barrie Davidson

    "You're only given a little spark of madness. You mustn't lose it." - Robin Williams

  3. #3
    Legend NateO's Avatar
    Join Date
    Feb 2002
    Location
    Minneapolis, Mn, USA
    Posts
    9,700
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Answered in the other post...Nice Barrie. Hey, Anon, if you post this a few more times, maybe we can get more people to try and help solve this quandary.

    Cheers, Nate

    [ This Message was edited by: NateO on 2002-03-11 17:36 ]

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •